Solution (source code)

= Solution

Taking the adjoint of $U=M+iN$ gives $U^\dagger=M-iN$. In particular, the <Hermitian parts of a unitary matrix> are uniquely determined:
$$
M=\frac{U+U^\dagger}{2},\qquad N=\frac{U-U^\dagger}{2i}.
$$
Expanding both unitary identities gives
$$
U^\dagger U=M^2+N^2+i(MN-NM)=I,\qquad UU^\dagger=M^2+N^2-i(MN-NM)=I.
$$
Subtracting shows $MN=NM$, and adding gives $M^2+N^2=I$. If $Mv=\mu v$, commutation implies $M(Nv)=\mu Nv$. The assumed simple spectrum makes the <eigenspace> one-dimensional, so $Nv=\nu v$. Thus $M,N$ have a common <orthonormal eigenbasis>.

On such a <vector>, $Uv=(\mu+i\nu)v$. If the corresponding unitary <eigenvalue> is $u=e^{i\theta}$, then
$$
\boxed{\mu=\operatorname{Re}u=\cos\theta,\qquad\nu=\operatorname{Im}u=\sin\theta.}
$$
The formulas for $M,N$ also show the same <eigenvalue> correspondence directly from $Uv=uv$ and $U^\dagger v=u^*v$. Degeneracies do not prevent existence of a common basis, although the simple-spectrum assumption makes the elementary proof immediate.