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.)
mat The 2x2 unitary matrix to break down.