qrunch.quantum.estimators

Module with implementations of base classes for estimators.

Classes

EstimatorCreator

Builder for all types of estimators available.

class EstimatorCreator

Bases: object

Builder for all types of estimators available. Default is the ExcitationGateEstimator.

static backend() BackendEstimatorCreator

Narrow the estimator type to a backend estimator.

A backend estimator uses sampling from the quantum circuit using one of the available quantum or simulation backends to estimate expectation values of observables. Because the estimation is done using samples, it is not an exact calculation and requires shots != None when performing the estimation. Also if used with a simulated backend, it is typically slower than using the other available estimators directly.

Return type:

BackendEstimatorCreator

static create() ExcitationGateEstimator

Create an instance of ExcitationGateEstimator.

Return type:

ExcitationGateEstimator

static excitation_gate() ExcitationGateEstimatorCreator

Narrow the estimator type to an excitation gate estimator.

This estimator uses Kvantify’s proprietary simulator optimized for circuits built from excitation gates, and thus tailored specifically for quantum chemistry applications. It is thus the recommended estimator for simulating quantum algorithms for quantum chemistry.

Return type:

ExcitationGateEstimatorCreator

static memory_restricted() MemoryRestrictedEstimatorCreator

Narrow the estimator type to a memory restricted estimator.

This estimator is a memory-efficient version that uses Kvantify’s of proprietary simulator optimized for circuits built from excitation gates, and thus tailored specifically for quantum chemistry applications. It uses a configurable maximum amount of memory to enable simulation of larger systems than the excitation gate estimator, switching to a more memory-efficient mode when the limit is reached.

For small systems where the full state vector can be stored in memory, the excitation gate estimator will typically be faster, but for larger systems where the full state vector cannot be stored in memory, or is too slow, this simulator will enable simulation of larger systems at the cost of some precision.

Return type:

MemoryRestrictedEstimatorCreator

static qiskit_statevector() QiskitStateVectorEstimatorCreator

Narrow the estimator type to an estimator using the Qiskit statevector simulator.

This is a facade around Qiskit’s state vector simulator for exact circuit simulation.

Return type:

QiskitStateVectorEstimatorCreator

estimator_creator() EstimatorCreator

Start creating an estimator.

An estimator is an object capable of estimating expectation values of quantum observables with respect to the state of a quantum circuit.

Return type:

EstimatorCreator

Modules

backend_estimator

Module with implementations of estimator.

creators

Contains builders for all available estimators .

estimator

Protocols for estimators.

estimator_call_counter

Module for implementing Estimator that counts objective function evaluations.

estimator_shot_counter

Module for implementing Estimator for counting shots of running on quantum hardware.

excitation_gate_estimator

Module with implementations of excitation gate estimator.

memory_restricted_estimator

Module containing the a memory restricted estimator.

third_party_estimators

Third-party estimators for estimation of quantum observables.