Every single-qubit unitary is three rotations: proof and practice.
Three angles and a phase pin down every single-qubit gate. The Z–Y–Z Euler decomposition is the first theorem of quantum compilation: you will prove it two ways, extract the angles from a matrix, see exactly where the coordinates break down, and derive the two-pulse form that superconducting compilers actually emit.
What you’ll learn
State and prove U=eiαRz(β)Ry(γ)Rz(δ), algebraically and through SO(3).
Extract Euler angles from a matrix and characterize the gimbal-lock singularities at γ∈{0,π}.
Prove that every rotation factors as Rn^(β)Rm^(γ)Rn^(δ) if and only if m^⊥n^.
Derive the virtual-Z form U≃Rz(β)XRz(π−γ)XRz(δ−π) and the corollary U=eiαAXBXC with ABC=I.
The theorem and two proofs
DerivationAlgebraic proof
U=eiαV,e2iα=detU,V=(ab−b∗a∗)∈SU(2)
Factor out the determinant phase; every element of SU(2) has this form, with ∣a∣2+∣b∣2=1.
Multiply out. The product has the same SU(2) shape, with a=e−i(β+δ)/2cos2γ and b=ei(β−δ)/2sin2γ.
cos2γ=∣a∣,sin2γ=∣b∣,γ=2atan2(∣b∣,∣a∣)∈[0,π]
Match the moduli; ∣a∣2+∣b∣2=1 guarantees a solution.
β=argb−arga,δ=−arga−argb
Match the phases, −2β+δ=arga and 2β−δ=argb. If b=0 (or a=0), argb (or arga) is undefined and can be anything: that freedom is gimbal lock.
Substituting back gives V=Rz(β)Ry(γ)Rz(δ), hence U=eiαRz(β)Ry(γ)Rz(δ). ∎
Check your understanding
What do the Z–Y–Z angles of T=diag(1,eiπ/4) look like?
γ=π/4 and β=δ=0
γ=0 and β+δ=π/4, with β and δ individually arbitrary
γ=π and β−δ=π/4
They are unique: β=δ=π/8 and γ=0
Show the answer
B.γ=0 and β+δ=π/4, with β and δ individually arbitrary
T=eiπ/8Rz(π/4) is diagonal, so b=0, γ=0, and Rz(β)Rz(δ)=Rz(β+δ): only the sum β+δ=π/4 is fixed. A whole line of angle triples gives the same gate. That is gimbal lock.
Practice: compiling with two axes
Now compile them yourself. The widget checks the whole operator through its Choi state: the gate U you build on qubit 1 acts on half of a Bell pair, producing (I⊗U)∣Φ+⟩=21∑j∣j⟩⊗U∣j⟩, which determines U up to a global phase (the Choi–Jamiołkowski correspondence).
Predict before you look
Suppose Rz rotations are free and the only physical pulse is X. What is the smallest number of X pulses that suffices for every single-qubit gate?
Show the answer
2 pulses
Two. With no pulses you only get z-rotations. With one, Rz(a)XRz(b) always sends z^ onto the equator (X tips z^ to −y^, and z-rotations keep it there), so for example Ry(π/3) is out of reach. Two suffice, by the identity derived on the next screen.
Which axes work, and the hardware form
With non-parallel but non-orthogonal axes, longer alternating products still reach every rotation; the number of factors needed grows as the angle between the axes shrinks. Compilers, however, care about a different question: which rotations are cheap on the hardware.
DerivationThe virtual-Z form
Rx(2π)Rz(θ)Rx(−2π)=R−y^(θ)=Ry(−θ)
Conjugation rotates the axis, and Rx(π/2) tips z^ to −y^.
Rx(−2π)=Rz(π)Rx(2π)Rz(−π)
Conjugating by a half-turn about z reverses the x-axis.
Ry(γ)=Rx(2π)Rz(π−γ)Rx(2π)Rz(−π)
Set θ=−γ in the first line, substitute the second, and merge Rz(−γ)Rz(π)=Rz(π−γ).
U≃Rz(β)XRz(π−γ)XRz(δ−π)
Insert into Z–Y–Z and use X=eiπ/4Rx(π/2); here ≃ means equality up to a global phase.
On superconducting processors, Rz is usually implemented virtually, by shifting the phase reference of all later microwave pulses on that qubit. It takes no time and adds essentially no error (McKay et al., 2017). Any single-qubit gate then costs at most two calibrated X pulses, and the compiler's job reduces to tracking and merging z-rotations.
So eiαAXBXC=U. ∎ Replace the two X's by CNOTs and you get a controlled-U from two CNOTs: the subject of Building Controlled-U: the ABC Construction.
Key takeaways
Every U∈U(2) equals eiαRz(β)Ry(γ)Rz(δ); the angles follow from ∣a∣, ∣b∣, arga and argb of its SU(2) part.
The parametrization is singular at γ∈{0,π} (gimbal lock), where only β+δ or β−δ is determined.
Three-factor Euler decompositions about n^,m^,n^ exist exactly when m^⊥n^; with virtual Rz, any gate costs at most two X pulses.
The corollary U=eiαAXBXC with ABC=I underlies controlled-U synthesis; for two qubits the analogue is the KAK decomposition, with at most three CNOTs.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Question 1
Which is a valid Z–Y–Z decomposition of Rx(θ)?
Rz(2π)Ry(θ)Rz(−2π)
Ry(θ)
Rz(−2π)Ry(θ)Rz(2π)
Rz(θ)Ry(2π)Rz(−θ)
Show the answer
C.Rz(−2π)Ry(θ)Rz(2π)
Rz(φ)Ry(θ)Rz(φ)†=RRz(φ)y^(θ), and Rz(−2π)y^=x^. Hence Rx(θ)=Rz(−2π)Ry(θ)Rz(2π).
Question 2
For which axis pairs does every rotation factor as Rn^(β)Rm^(γ)Rn^(δ)?
Any non-parallel n^,m^
Exactly when m^⊥n^
Only n^=z^ with m^=y^
Whenever the angle between them is at least π/4
Show the answer
B. Exactly when m^⊥n^
Orthogonal axes reduce to Z–Y–Z by a change of frame. If the lines meet at ϑ<π/2, the image of n^ stays within 2ϑ<π of n^, so half-turns about axes perpendicular to n^ are never reached.
Question 3
At γ=π, which combination of the Z–Y–Z angles does U determine?
β+δ
β and δ separately
Neither
β−δ
Show the answer
D.β−δ
Ry(π)=−iY and YRz(δ)=Rz(−δ)Y, so Rz(β)Ry(π)Rz(δ)=−iRz(β−δ)Y: only β−δ survives.
Question 4
Parameter counting gives ⌈41(4n−3n−1)⌉ CNOTs as a lower bound for a generic n-qubit unitary. What is it for n=3?
14
9
20
64
Show the answer
A. 14
41(64−9−1)=13.5, so at least 14. The reasoning: SU(8) has 63 real parameters, one layer of single-qubit gates supplies 3n=9, and each CNOT together with the rotations it enables adds at most 4 more.
Further reading
M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, Theorem 4.1 and Corollary 4.2 (Cambridge, 10th anniv. ed., 2010).
A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor, T. Sleator, J. A. Smolin & H. Weinfurter, "Elementary gates for quantum computation", Phys. Rev. A52, 3457 (1995).
D. C. McKay, C. J. Wood, S. Sheldon, J. M. Chow & J. M. Gambetta, "Efficient Z gates for quantum computing", Phys. Rev. A96, 022330 (2017).
N. Khaneja & S. J. Glaser, "Cartan decomposition of SU(2n) and control of spin systems", Chem. Phys.267, 11 (2001).
V. V. Shende, S. S. Bullock & I. L. Markov, "Synthesis of quantum-logic circuits", IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst.25, 1000 (2006).