qiskit-documentation/docs/api/qiskit-addon-mpf/backends-quimb-circuit-circ...

63 lines
2.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: CircuitState (latest version)
description: API reference for qiskit_addon_mpf.backends.quimb_circuit.CircuitState in the latest version of qiskit-addon-mpf
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_addon_mpf.backends.quimb_circuit.CircuitState
---
# CircuitState
<Class id="qiskit_addon_mpf.backends.quimb_circuit.CircuitState" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/quimb_circuit/state.py#L27-L78" signature="CircuitState" modifiers="class">
Bases: [`State`](backends#state "qiskit_addon_mpf.backends.interface.State")
An MPO-like representation of a time-evolution state based on quantum circuits.
This time-evolution state can be evolved on its left- and right-hand side as required by the [`DynamicMPF`](dynamic#dynamicmpf "qiskit_addon_mpf.dynamic.DynamicMPF") algorithm.
Initialize a [`CircuitState`](#qiskit_addon_mpf.backends.quimb_circuit.CircuitState "qiskit_addon_mpf.backends.quimb_circuit.CircuitState") instance.
## Attributes
### lhs
<Attribute id="qiskit_addon_mpf.backends.quimb_circuit.CircuitState.lhs" attributeTypeHint="Circuit | None">
The left-hand side circuit in form of a tensor network.
</Attribute>
### rhs
<Attribute id="qiskit_addon_mpf.backends.quimb_circuit.CircuitState.rhs" attributeTypeHint="Circuit | None">
The right-hand side circuit in form of a tensor network.
</Attribute>
## Methods
### overlap
<Function id="qiskit_addon_mpf.backends.quimb_circuit.CircuitState.overlap" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/quimb_circuit/state.py#L41-L78" signature="overlap(initial_state)">
Compute the overlap of this state with the provided initial state.
<Admonition title="Warning" type="caution">
This implementation only supports instances of [`qiskit.circuit.QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.4)") for `initial_state`.
</Admonition>
**Parameters**
**initial\_state** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")) the initial state with which to compute the overlap.
**Raises**
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") if the provided initial state has an incompatible type.
**Returns**
The overlap of this state with the provided one.
**Return type**
[complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")
</Function>
</Class>