View source on GitHub |
Implements a single-qubit operation with few rotations.
cirq.single_qubit_matrix_to_pauli_rotations(
mat: np.ndarray, atol: float = 0
) -> List[Tuple[ops.Pauli, float]]
Args | |
---|---|
mat
|
The 2x2 unitary matrix of the operation to implement. |
atol
|
A limit on the amount of absolute error introduced by the construction. |
Returns | |
---|---|
A list of (Pauli, half_turns) tuples that, when applied in order, perform the desired operation. |