- eval_observables(quantum_instance, quantum_state, observables, expectation, threshold=1e-12)¶
Deprecated: 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.
버전 0.24.0부터 폐지됨: The function
qiskit.algorithms.aux_ops_evaluator.eval_observables()is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. Instead, use the function
qiskit.algorithms.observables_evaluator.estimate_observables. See https://qisk.it/algo_migration for a migration guide.
observables (ListOrDict[OperatorBase]) – A list or a dictionary of operators whose expectation values are to be calculated.
expectation (ExpectationBase) – An instance of ExpectationBase which defines a method for calculating expectation values.
threshold (float) – A threshold value that defines which mean values should be neglected (helpful for ignoring numerical instabilities close to 0).
A list or a dictionary of tuples (mean, standard deviation).
- 예외 발생
ValueError – If a
quantum_statewith free parameters is provided.
- 반환 형식