diff --git a/cirq-core/cirq/experiments/readout_confusion_matrix.py b/cirq-core/cirq/experiments/readout_confusion_matrix.py index f44ace8bf52..26ed417caf5 100644 --- a/cirq-core/cirq/experiments/readout_confusion_matrix.py +++ b/cirq-core/cirq/experiments/readout_confusion_matrix.py @@ -317,17 +317,16 @@ def readout_mitigation_pauli_uncorrelated( ) -> tuple[float, float]: r"""Uncorrelated readout error mitigation for a multi-qubit Pauli operator. - This function - scalably performs readout error mitigation on an arbitrary-length Pauli operator. It is a - reimplementation of https://github.com/eliottrosenberg/correlated_SPAM but specialized to - the case in which readout is uncorrelated. We require that the confusion matrix is a - tensor product of single-qubit confusion matrices. We then invert the confusion matrix by - inverting each of the $C^{(q)}$ Then, in a bit-by-bit fashion, we apply the inverses of the - single-site confusion matrices to the bits of the measured bitstring, contract them with - the single-site Pauli operator, and take the product over all of the bits. This could be - generalized to tensor product spaces that are larger than single qubits, but the essential - simplification is that each tensor product space is small, so that none of the response - matrices is exponentially large. + This function scalably performs readout error mitigation on an arbitrary-length Pauli + operator. It is a reimplementation of https://github.com/eliottrosenberg/correlated_SPAM + but specialized to the case in which readout is uncorrelated. We require that the confusion + matrix is a tensor product of single-qubit confusion matrices. We then invert the confusion + matrix by inverting each of the $C^{(q)}$ Then, in a bit-by-bit fashion, we apply the + inverses of the single-site confusion matrices to the bits of the measured bitstring, + contract them with the single-site Pauli operator, and take the product over all of the bits. + This could be generalized to tensor product spaces that are larger than single qubits, but the + essential simplification is that each tensor product space is small, so that none of the + response matrices is exponentially large. This can result in mitigated Pauli operators that are not in the range [-1, 1], but if the readout error is indeed uncorrelated and well-characterized, then it should converge