EjectZ(tolerance: float = 0.0, ext: cirq.extension.extensions.Extensions = None)¶
Pushes Z gates towards the end of the circuit.
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.
__init__(tolerance: float = 0.0, 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.