cirq.EjectPhasedPaulis¶
-
class
cirq.EjectPhasedPaulis(tolerance: float = 1e-08)[source]¶ Pushes X, Y, and PhasedX gates towards the end of the circuit.
As the gates get pushed, they may absorb Z gates, cancel against otherX, Y, or PhasedX gates with exponent=1, get merged into measurements (asoutput bit flips), and cause phase kickback operations across CZs (which canthen be removed by the EjectZ optimization).-
__init__(tolerance: float = 1e-08) → None[source]¶ Parameters: tolerance – Maximum absolute error tolerance. The optimization is permitted to simply drop negligible combinations of Z gates, with a threshold determined by this tolerance.
Methods
optimize_circuit(circuit)Rewrites the given circuit to make it better. -