iqm.benchmarks.utils.get_pauli_expectation#
- iqm.benchmarks.utils.get_pauli_expectation(counts: dict[str, int], pauli_label: str) 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: