---
title: CircuitState (latest version)
description: API reference for qiskit_addon_mpf.backends.quimb_circuit.CircuitState in the latest version of qiskit-addon-mpf
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit-addon-mpf/backends-quimb-circuit-circuit-state
---

# CircuitState

*class* `CircuitState`

[GitHub](https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/quimb_circuit/state.py#L27-L78)

Bases: [`State`](/docs/api/qiskit-addon-mpf/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`](/docs/api/qiskit-addon-mpf/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

Type: `Circuit | None`

The left-hand side circuit in form of a tensor network.

### rhs

Type: `Circuit | None`

The right-hand side circuit in form of a tensor network.

## Methods

### overlap

`overlap(initial_state)`

[GitHub](https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.3/qiskit_addon_mpf/backends/quimb_circuit/state.py#L41-L78)

Compute the overlap of this state with the provided initial state.

> **Warning**
>
> This implementation only supports instances of [`qiskit.circuit.QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) for `initial_state`.

**Parameters**

**initial\_state** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – the initial state with which to compute the overlap.

**Raises**

[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – 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)
