Breaks down a 2x2 unitary into ZYZ angle parameters.
cirq.deconstruct_single_qubit_matrix_into_angles(
mat: np.ndarray
) -> Tuple[float, float, float]
Given a unitary U, this function returns three angles: \(\phi_0, \phi_1, \phi_2\),
such that: \(U = Z^{\phi_2 / \pi} Y^{\phi_1 / \pi} Z^{\phi_0/ \pi}\)
for the Pauli matrices Y and Z. That is, phasing around Z by \(\phi_0\) radians,
then rotating around Y by \(\phi_1\) radians, and then phasing again by
\(\phi_2\) radians will produce the same effect as the original unitary.
(Note that the matrices are applied right to left.)
Args |
mat
|
The 2x2 unitary matrix to break down.
|
Returns |
A tuple containing the amount to phase around Z, then rotate around Y,
then phase around Z (all in radians).
|