QrEstimatorV2 module

class QrEstimatorV2

Given an observable of the type \(O=\sum_{i=1}^Na_iP_i\), where \(a_i\) is a complex number and \(P_i\) is a Pauli operator, the estimator calculates the expectation \(\mathbb{E}(P_i)\) of each \(P_i\) and finally calculates the expectation value of \(O\) as \(\mathbb{E}(O)=\sum_{i=1}^Na_i\mathbb{E}(P_i)\). The reported std is calculated as

\[\frac{\sum_{i=1}^{n}|a_i|\sqrt{\textrm{Var}\big(P_i\big)}}{\sqrt{N}}\:,\]

where \(\textrm{Var}(P_i)\) is the variance of \(P_i\), \(N=O(\epsilon^{-2})\) is the number of shots, and \(\epsilon\) is the target precision [1].

Each tuple of (circuit, observables, <optional> parameter values, <optional> precision), called an estimator primitive unified block (PUB), produces its own array-based result. The run() method can be given a sequence of pubs to run in one call.

QrEstimatorV2(*, backend=None, options=None, run_options=None)
Args:
backend (QrBackendV2) : The Quantum Rings backend to run the primitive on.
options (dict) : The options to control the defaults shots (shots)
run_options (dict) : See options.
QrEstimatorV2.options: Options

Returns the options

run(pubs, *, precision=None)

Executes the pubs and estimates all associated observables.

Args:
pubs [pub]: The pub to preprocess.
precision (float): None
Returns:

The job associated with the exection