EjectFullW(tolerance: float = 1e-08, ext: cirq.extension.extensions.Extensions = None)¶
Pushes ExpW gates with half_turns=1 towards the end of the circuit.
As the gates get pushed, they may absorb Z gates, cancel against other ExpW gates with half_turns=1, get merged into measurements (as output bit flips), and cause phase kickback operations across CZs (which can then be removed by the EjectZ optimization).
__init__(tolerance: float = 1e-08, ext: cirq.extension.extensions.Extensions = None) → None¶
- tolerance – Maximum absolute error tolerance. The optimization is permitted to simply drop negligible combinations of Z gates, with a threshold determined by this tolerance.
- ext – Extensions object used for determining if gates are phaseable (i.e. if Z gates can pass through them).
Rewrites the given circuit to make it better.