- eval_observables(quantum_instance, quantum_state, observables, expectation, threshold=1e-12)¶
Pending deprecation: Accepts a list or a dictionary of operators and calculates their expectation values - means and standard deviations. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold.
This function has been superseded by the
qiskit.algorithms.observables_evaluator.eval_observables()function. It will be deprecated in a future release and subsequently removed after that.
ExpectationBase) – An instance of ExpectationBase which defines a method for calculating expectation values.
float) – A threshold value that defines which mean values should be neglected (helpful for ignoring numerical instabilities close to 0).
- Return type
A list or a dictionary of tuples (mean, standard deviation).
ValueError – If a
quantum_statewith free parameters is provided.