EjectZ(tolerance: float = 0.0)¶
Pushes Z gates towards the end of the circuit.As the Z gates get pushed they may absorb other Z gates, get absorbed intomeasurements, cross CZ gates, cross W gates (by phasing them), etc.
__init__(tolerance: float = 0.0) → None¶
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.
Rewrites the given circuit to make it better.