iqm.benchmarks.utils.get_Pauli_expectation#
- iqm.benchmarks.utils.get_Pauli_expectation(counts: Dict[str, int], pauli_label: Literal['I', 'X', 'Y', 'Z']) float #
Gets an estimate of a Pauli expectation value for a given set of counts and a Pauli measurement label.
- Parameters:
- Raises:
ValueError – If Pauli labels are not specified in terms of I, X, Y, Z characters.
- Returns:
The estimate of the Pauli expectation value.
- Return type: