Replaces runs of single qubit rotations with a single optional cirq.PhasedXZGate
.
cirq.merge_single_qubit_gates_to_phxz(
circuit: 'cirq.AbstractCircuit',
*,
context: Optional['cirq.TransformerContext'] = None,
atol: float = 1e-08
) -> 'cirq.Circuit'
Used in the notebooks
Specifically, any run of non-parameterized single-qubit unitaries will be replaced by an
optional PhasedXZ.
Args |
circuit
|
Input circuit to transform. It will not be modified.
|
context
|
cirq.TransformerContext storing common configurable options for transformers.
|
atol
|
Absolute tolerance to angle error. Larger values allow more negligible gates to be
dropped, smaller values increase accuracy.
|
Returns |
Copy of the transformed input circuit.
|