qiskit.aqua.algorithms.VQE.construct_expectation¶
-
VQE.
construct_expectation
(parameter)[source]¶ Generate the ansatz circuit and expectation value measurement, and return their runnable composition.
- Parameters
parameter (
Union
[List
[float
],List
[Parameter
],ndarray
]) – Parameters for the ansatz circuit.- Return type
OperatorBase
- Returns
The Operator equalling the measurement of the ansatz
StateFn
by the Observable’s expectationStateFn
.- Raises
AquaError – If no operator has been provided.