Skip to main content
IBM Quantum Platform
Diese Seite stammt aus einer alten Version von Qiskit SDK Zur neuesten 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.

War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.