cirq.merge_single_qubit_gates_into_phased_x_z¶
-
cirq.merge_single_qubit_gates_into_phased_x_z(circuit: cirq.circuits.circuit.Circuit, atol: float = 1e-08) → None[source]¶ Canonicalizes runs of single-qubit rotations in a circuit.
Specifically, any run of non-parameterized circuits will be replaced by anoptional PhasedX operation followed by an optional Z operation.Parameters: - circuit – The circuit to rewrite. This value is mutated in-place.
- atol – Absolute tolerance to angle error. Larger values allow more negligible gates to be dropped, smaller values increase accuracy.