|View source on GitHub|
Pushes Z gates towards the end of the circuit.
cirq.optimizers.EjectZ( tolerance: float = 0.0, eject_parameterized: bool = False ) -> None
As the Z gates get pushed they may absorb other Z gates, get absorbed into measurements, cross CZ gates, cross W gates (by phasing them), etc.
||Maximum absolute error tolerance. The optimization is permitted to simply drop negligible combinations of Z gates, with a threshold determined by this tolerance.|
||If True, the optimization will attempt to eject parameterized Z gates as well. This may result in other gates parameterized by symbolic expressions.|