qrunch.quantum.estimators.third_party_estimators.qiskit_state_vector_estimator

Module containing an estimator which uses Qiskit’s state vector estimator.

Classes

QiskitStateVectorEstimator

Class for estimating observables using Qiskit's state vector simulation.

class QiskitStateVectorEstimator

Bases: Estimator

Class for estimating observables using Qiskit’s state vector simulation.

__init__(compiler: Compiler | None = None) None

Initialize qiskit estimator using state vector simulation.

Parameters:

compiler (Compiler | None) – Compiler used for compiling the circuit into a UniversalGateCircuit.

Return type:

None

clear_cache() None

Clear the measurement cache.

Return type:

None

has_spin_particle_conservation() bool

Return True, if the estimator is set to use spin particle conservation.

Return type:

bool

has_total_particle_conservation() bool

Return True, if the estimator is set to use total particle conservation.

Return type:

bool

run(observables: Sequence[int | float | complex | Expression[PauliOperators]] | int | float | complex | Expression[PauliOperators] | Sequence[HermitianPauliSum] | HermitianPauliSum, circuits: Circuit | Sequence[Circuit], shots: int | None) ExpectationValue | list[ExpectationValue] | EstimatorResults

Estimate the value of the observables using the circuit state.

For each observable the following will be calculated: <circuit|observable|circuit>.

Parameters:
Return type:

ExpectationValue | list[ExpectationValue] | EstimatorResults

supports_shots_equals_none() bool

Return whether the estimator supports shots = None.

The QiskitStateVectorEstimator can only estimate for shots equal to None.

Return type:

bool