Magic basis. Let M be the unitary whose columns are
∣Φ+⟩, i∣Φ−⟩, i∣Ψ+⟩, ∣Ψ−⟩, with the usual Bell states. We use one
fact, proved by Vatan and Williams (see also
Kraus and Cirac): K↦M†KM maps SU(2)⊗SU(2) onto
SO(4). The second fact is a direct check: each Bell state is a joint eigenvector of XX, YY,
ZZ, with eigenvalue vectors (over Φ+,Φ−,Ψ+,Ψ−)
XX:(1,−1,1,−1),YY:(−1,1,1,−1),ZZ:(1,1,−1,−1),
and the phases i in M do not change eigenvectors. Together with I:(1,1,1,1) these are four
mutually orthogonal vectors, so every diagonal matrix in the magic basis is a real linear
combination of I,XX,YY,ZZ when its entries are real, and every diagonal unitary is
exp(i(a0I+aXX+bYY+cZZ)) for real a0,a,b,c.
Step 1. Remove a phase: U=eiγ0U′ with U′∈SU(4). Put V=M†U′M∈SU(4)
and W=VTV. Then W is unitary and symmetric.
Step 2. Write W=A+iB with A,B real. Symmetry of W makes A,B symmetric, and
W†=WT=W. Unitarity gives
I=WW=(A+iB)(A−iB)=A2+B2+i(BA−AB), so AB=BA. Two commuting real
symmetric matrices are diagonalised by one real orthogonal matrix O; replacing a column of O by
its negative if necessary, O∈SO(4). So W=ODOT with D diagonal, and D is unitary
because W is.
Step 3. Choose a diagonal F with F2=D. Then (detF)2=detD=detW=(detV)2=1;
if detF=−1, negate one diagonal entry of F, so detF=1. Define Q=VOF−1. It is
unitary, and
QTQ=F−1OTVTVOF−1=F−1OTWOF−1=F−1DF−1=I.
Hence QT=Q−1=Q†, so Q=Q: Q is real orthogonal, with
detQ=detVdetO/detF=1, i.e. Q∈SO(4).
Step 4. V=QFOT, so
U′=(MQM†)(MFM†)(MOTM†). By the first fact the outer factors are
A1⊗A2 and B1⊗B2 with Ai,Bi∈SU(2). The middle factor is diagonal and
unitary in the magic basis, so it equals exp(i(a0I+aXX+bYY+cZZ)). Collecting
eiγ0eia0 into eiγ gives the theorem.
Examples. In the magic basis SWAP is diag(1,1,1,−1), which is
eiπ/4exp(−i4π(XX+YY+ZZ)) (check: the exponent gives
e−iπ/4 on the three states with XX+YY+ZZ=1 and e3iπ/4 on Ψ−). For CZ,
CZ=eiπ/4(S†⊗S†)exp(−i4πZZ), as one checks on
the four computational basis states; CNOT differs from CZ by Hadamards on the target.