View source on GitHub |
Implements a single-qubit operation with a PhasedX and Z gate.
cirq.single_qubit_matrix_to_phased_x_z(
mat: np.ndarray, atol: float = 0
) -> List[cirq.Gate
]
If one of the gates isn't needed, it will be omitted.
Args | |
---|---|
mat
|
The 2x2 unitary matrix of the operation to implement. |
atol
|
A limit on the amount of error introduced by the construction. |
Returns | |
---|---|
A list of gates that, when applied in order, perform the desired operation. |