EstimatorBackend#
Module: iqm.qaoa.backends
- class iqm.qaoa.backends.EstimatorBackend[source]#
Bases:
ABCThe
ABCfor estimator backends, i.e., those calculating the expected value of the Hamiltonian.Methods
The abstract method for
estimate()of backends subclassed fromEstimatorBackend.The abstract method for estimating the exp.
- abstract estimate(qaoa_object)[source]#
The abstract method for
estimate()of backends subclassed fromEstimatorBackend.The input
qaoa_objectincludes the training parameters (angles), which are typically used in estimation of the energy.
- abstract estimate_correlations_z(qaoa_object, target_qubits)[source]#
The abstract method for estimating the exp. value of products of Z operators on
target_qubits.The input
qaoa_objectincludes the training parameters (angles), which are used in estimation of the correlations. Some estimators (subclasses ofEstimatorBackend) may only be able to estimate the expectation values of at most quadratic products of Z’s.- Parameters:
qaoa_object (QUBOQAOA) – The
QAOAobject whose correlations are to be estimated.target_qubits (set[LogQubit] | list[set[LogQubit]]) – The set of qubits on which the operators act. For example if one is interested in \(\langle Z_1 Z_4 Z_5 \rangle\), then
target_qubits == {1, 4, 5}. If one is interested in multiple different correlations, they may settarget_qubitsas a list of sets and get out a list of correlations. This is likely to be more efficient than repeatedly callingestimate_correlations_z()with each one set of qubits at a time.
- Returns:
The estimated expected value of product of Z operators on given
target_qubits. Or a list of those, iftarget_qubitswas given as a list.- Return type:
Inheritance
