Skip to main content
IBM Quantum Platform
This page is from a dev version of Qiskit SDK. This is a new interface that does not exist in the stable version.

EstimatorPub

class qiskit.primitives.EstimatorPub(circuit, observables, parameter_values=None, precision=None, validate=True)

GitHub

Bases: ShapedMixin

Primitive Unified Bloc for any Estimator primitive.

An estimator pub is essentially a tuple (circuit, observables, parameter_values, precision).

If precision is provided this should be used for the target precision of an estimator, if precision=None the estimator will determine the target precision.

Initialize an estimator pub.

Parameters

  • circuit (QuantumCircuit) – A quantum circuit.
  • observables (ObservablesArray) – An observables array.
  • parameter_values (BindingsArray | None) – A bindings array, if the circuit is parametric.
  • precision (float | None) – An optional target precision for expectation value estimates.
  • validate (bool) – Whether to validate arguments during initialization.

Raises

ValueError – If the observables and parameter_values are not broadcastable, that is, if their shapes, when right-aligned, do not agree or equal 1.


Attributes

circuit

A quantum circuit.

ndim

observables

An observables array.

parameter_values

A bindings array.

precision

The target precision for expectation value estimates (optional).

shape

size


Methods

coerce

classmethod coerce(pub, precision=None)

GitHub

Coerce EstimatorPubLike into EstimatorPub.

Parameters

  • pub (EstimatorPubLike) – A compatible object for coercion.
  • precision (float | None) – an optional default precision to use if not already specified by the pub-like object.

Returns

An estimator pub.

Return type

EstimatorPub

validate

validate()

GitHub

Validate the pub.

Was this page helpful?
Report a bug, typo, or request content on GitHub.