iqm.benchmarks.utils.get_tomography_matrix#
- iqm.benchmarks.utils.get_tomography_matrix(pauli_expectations: Dict[str, float]) ndarray #
Reconstructs a density matrix from given Pauli expectations.
- Parameters:
pauli_expectations (Dict[str, float]) – A dictionary of Pauli expectations, with keys being Pauli strings.
- Raises:
ValueError – If not all 4**n Pauli expectations are specified.
- Returns:
A tomographically reconstructed density matrix.
- Return type:
np.ndarray