Skip to content

Commit

Permalink
Update tableau.pybind.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc authored Sep 10, 2024
1 parent e5d74ca commit b2350b3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/stim/stabilizers/tableau.pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1874,11 +1874,19 @@ void stim_pybind::pybind_tableau_methods(pybind11::module &m, pybind11::class_<T
},
pybind11::arg("pauli_string"),
clean_doc_string(R"DOC(
Returns the conjugation of a PauliString by the Tableau's Clifford operation.
The conjugation of P by C is equal to C**-1 * P * C (circuit order where C**-1
is applied first). If P is a Pauli product before C, then P2 = C**-1 * P * C is
an equivalent Pauli product after C.
Returns the equivalent PauliString after the Tableau's Clifford operation.
If P is a Pauli product before a Clifford operation C, then this method returns
Q = C * P * C**-1 (the conjugation of P by C). Q is the equivalent Pauli product
after C. This works because:
C*P
= C*P * I
= C*P * (C**-1 * C)
= (C*P*C**-1) * C
= Q*C
(Keep in mind that A*B means first B is applied, then A is applied.)
Args:
pauli_string: The pauli string to conjugate.
Expand Down

0 comments on commit b2350b3

Please sign in to comment.