QMLEstimator¶
- class QMLEstimator(*, default_precision=0.0, seed=None, **kwargs)[source]¶
Bases:
StatevectorEstimatorV2-based estimator primitive with two modes.
Modes are selected at construction time:
default_precision == 0.0(default): exact mode: Results are deterministic (analytic expectation values) withstds == 0. Any per-callprecisionoverride is accepted for API compatibility but ignored.default_precision > 0.0: delegate mode: Execution is delegated toStatevectorEstimator, which interprets the precision parameter according to the reference primitive behavior.
- Parameters:
Attributes
- default_precision¶
Return the default precision
- seed¶
Return the seed or Generator object for random number generation.
Methods
- run(pubs, *, precision=None)[source]¶
Evaluate a collection of estimator PUBs.
- Parameters:
pubs (Iterable[EstimatorPub | Tuple[QuantumCircuit, str | Pauli | SparsePauliOp | SparseObservable | Mapping[str | Pauli, float] | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | bytes | _NestedSequence[bool | int | float | complex | str | bytes]] | Tuple[QuantumCircuit, str | Pauli | SparsePauliOp | SparseObservable | Mapping[str | Pauli, float] | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | bytes | _NestedSequence[bool | int | float | complex | str | bytes], Mapping[Parameter | str | Tuple[Parameter | str, ...], _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]] | Tuple[QuantumCircuit, str | Pauli | SparsePauliOp | SparseObservable | Mapping[str | Pauli, float] | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | bytes | _NestedSequence[bool | int | float | complex | str | bytes], Mapping[Parameter | str | Tuple[Parameter | str, ...], _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Real]]) – Iterable of PUB-like inputs describing circuits, observables, and parameter values.
precision (float | None) – Target precision for V2-style estimation. In exact mode, this value is ignored and results are deterministic.
- Returns:
A job that yields a
PrimitiveResult[PubResult].- Return type: