|View source on GitHub|
Transformer pass to push X, Y, PhasedX & (certain) PhasedXZ gates to the end of the circuit.
cirq.eject_phased_paulis( circuit: 'cirq.AbstractCircuit', *, context: Optional['cirq.TransformerContext'] = None, atol: float = 1e-08, eject_parameterized: bool = False ) -> 'cirq.Circuit'
As the gates get pushed, they may absorb Z gates, cancel against other
X, Y, or PhasedX gates with exponent=1, get merged into measurements (as
output bit flips), and cause phase kickback operations across CZs (which can
then be removed by the
z_exponent=0 (i.e. equivalent to PhasedXPow) or with
axis_phase_exponent=0 (i.e. equivalent to ZPowGate) are also supported.
PhasedXZGates with arbitrary x/z/axis exponents, run
||Input circuit to transform.|
||Maximum absolute error tolerance. The optimization is permitted to simply drop negligible combinations gates with a threshold determined by this tolerance.|
||If True, the optimization will attempt to eject parameterized gates as well. This may result in other gates parameterized by symbolic expressions.|
|Copy of the transformed input circuit.|