EstimatorV2#

class EstimatorV2(*, options: dict | None = None)[source]#

Bases: BaseEstimatorV2

Evaluates expectation values for provided quantum circuit and observable combinations.

Run a fast simulation using Aer. Sampling from a normal distribution N(expval, precison) when set to precision.

  • default_precision: The default precision to use if none are specified in run(). Default: 0.0.

  • backend_options: Options passed to AerSimulator. Default: {}.

  • run_options: Options passed to AerSimulator.run(). Default: {}.

Parameters:

options – The options to control the default precision (default_precision), the backend options (backend_options), and the runtime options (run_options).

Attributes

options#

Return the options

Methods

classmethod from_backend(backend, **options)[source]#

make new sampler that uses external backend

run(pubs: Iterable[EstimatorPubLike], *, precision: float | None = None) PrimitiveJob[PrimitiveResult[PubResult]][source]#

Estimate expectation values for each provided pub (Primitive Unified Bloc).

Parameters:
  • pubs – An iterable of pub-like objects, such as tuples (circuit, observables) or (circuit, observables, parameter_values).

  • precision – The target precision for expectation value estimates of each run Estimator Pub that does not specify its own precision. If None the estimator’s default precision value will be used.

Returns:

A job object that contains results.