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.

tolerance Maximum absolute error tolerance. The optimization is permitted to simply drop negligible combinations of Z gates, with a threshold determined by this tolerance.
eject_parameterized If True, the optimization will attempt to eject parameterized Z gates as well. This may result in other gates parameterized by symbolic expressions.



View source