Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottrosenberg committed Jul 1, 2024
1 parent 969d62e commit 61ca6e3
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions cirq-core/cirq/experiments/readout_confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61ca6e3

Please sign in to comment.