cirq.PauliString.pass_operations_over

PauliString.pass_operations_over(ops: Iterable[cirq.ops.raw_types.Operation], after_to_before: bool = False) → cirq.ops.pauli_string.PauliString[source]

Determines how the Pauli string changes when conjugated by Cliffords.

The output and input pauli strings are related by a circuit equivalence.
In particular, this circuit:
───ops───INPUT_PAULI_STRING───

will be equivalent to this circuit:

───OUTPUT_PAULI_STRING───ops───

up to global phase (assuming after_to_before is not set).

If ops together have matrix C, the Pauli string has matrix P, and the
output Pauli string has matrix P’, then P’ == C^-1 P C up to
global phase.
Setting after_to_before inverts the relationship, so that the output
is the input and the input is the output. Equivalently, it inverts C.
Parameters:
  • ops – The operations to move over the string.
  • after_to_before – Determines whether the operations start after the pauli string, instead of before (and so are moving in the opposite direction).