qiskit-documentation/docs/api/qiskit/1.2/qiskit.primitives.BaseEstim...

42 lines
2.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: BaseEstimatorV2 (v1.2)
description: API reference for qiskit.primitives.BaseEstimatorV2 in qiskit v1.2
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.primitives.BaseEstimatorV2
---
# BaseEstimatorV2
<Class id="qiskit.primitives.BaseEstimatorV2" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/primitives/base/base_estimator.py#L220-L252" signature="qiskit.primitives.BaseEstimatorV2" modifiers="class">
Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")
Estimator V2 base class.
An estimator estimates expectation values for provided quantum circuit and observable combinations.
An Estimator implementation must treat the [`run()`](#qiskit.primitives.BaseEstimatorV2.run "qiskit.primitives.BaseEstimatorV2.run") method `precision=None` kwarg as using a default `precision` value. The default value and methods to set it can be determined by the Estimator implementor.
## Methods
### run
<Function id="qiskit.primitives.BaseEstimatorV2.run" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/primitives/base/base_estimator.py#L237-L252" signature="run(pubs, *, precision=None)" modifiers="abstract">
Estimate expectation values for each provided pub (Primitive Unified Bloc).
**Parameters**
* **pubs** (*Iterable\[EstimatorPubLike]*) An iterable of pub-like objects, such as tuples `(circuit, observables)` or `(circuit, observables, parameter_values)`.
* **precision** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) The target precision for expectation value estimates of each run Estimator Pub that does not specify its own precision. If None the estimators default precision value will be used.
**Returns**
A job object that contains results.
**Return type**
[BasePrimitiveJob](qiskit.primitives.BasePrimitiveJob "qiskit.primitives.BasePrimitiveJob")\[[PrimitiveResult](qiskit.primitives.PrimitiveResult "qiskit.primitives.PrimitiveResult")\[[PubResult](qiskit.primitives.PubResult "qiskit.primitives.PubResult")]]
</Function>
</Class>