WeightedPauliOperator.evaluate_with_result¶
- WeightedPauliOperator.evaluate_with_result(result, statevector_mode, use_simulator_snapshot_mode=False, circuit_name_prefix='')[source]¶
This method can be only used with the circuits generated by the
construct_evaluation_circuit()
method with the same circuit_name_prefix name since the circuit names are tied to some meanings.Calculate the evaluated value with the measurement results.
- Parameters
result (qiskit.Result) – the result from the backend.
statevector_mode (bool) – indicate which type of simulator are used.
use_simulator_snapshot_mode (bool) – if aer_provider is used, we can do faster evaluation for pauli mode on statevector simulation
circuit_name_prefix (str) – a prefix of circuit name
- Returns
the mean value float: the standard deviation
- Return type
float
- Raises
AquaError – if Operator is empty