cirq.single_qubit_matrix_to_pauli_rotations¶

cirq.single_qubit_matrix_to_pauli_rotations(mat: numpy.ndarray, tolerance: float = 0) → List[Tuple[cirq.ops.pauli.Pauli, float]][source]

Implements a single-qubit operation with few rotations.

Parameters: mat – The 2x2 unitary matrix of the operation to implement. tolerance – A limit on the amount of error introduced by the construction. A list of (Pauli, half_turns) tuples that, when applied in order, perform the desired operation.