Every pure single-qubit state corresponds to exactly one point on the Bloch sphere. The north pole
is ∣0⟩, the south pole is ∣1⟩, and every other point encodes a superposition. Two
angles fully specify a point: the polar angleθ (latitude from the north pole) and the
azimuthal angleϕ (longitude). Parametrically,
∣ψ⟩=cos2θ∣0⟩+eiϕsin2θ∣1⟩.
The factor of 1/2 on the angles is a convention: it ensures the antipodal points θ=0 and
θ=π give the orthogonal pair ∣0⟩ and ∣1⟩.
Reaching any state with two rotations
To prepare ∣ψ(θ,ϕ)⟩ starting from ∣0⟩, apply two gates in sequence:
RY(θ) rotates around the y-axis and sets the amplitude ratio:
RY(θ)∣0⟩=cos2θ∣0⟩+sin2θ∣1⟩.
Both amplitudes are real after this step — the state lives on the meridian ϕ=0.
RZ(ϕ) rotates around the z-axis and dials in the relative phase:
RZ(ϕ)(α∣0⟩+β∣1⟩)=e−iϕ/2α∣0⟩+eiϕ/2β∣1⟩.
Up to a global phase e−iϕ/2 (which is unobservable), this multiplies the ∣1⟩
component by eiϕ, placing the state at longitude ϕ on the Bloch sphere.
The combined action is
RZ(ϕ)RY(θ)∣0⟩=e−iϕ/2(cos2θ∣0⟩+eiϕsin2θ∣1⟩),
which equals the target state up to the global phase e−iϕ/2. Global phases are
physically equivalent because they cancel in every Born-rule probability and every expectation value.
A worked example
Suppose the target is θ=π/3 (polar angle) and ϕ=π/3 (azimuthal angle):
∣ψ⟩=cos6π∣0⟩+eiπ/3sin6π∣1⟩=23∣0⟩+21eiπ/3∣1⟩.
The probabilities are P(0)=cos2(π/6)=3/4 and P(1)=sin2(π/6)=1/4, which come
from the amplitude magnitudes 23≈0.866 and 21=0.5.
To realise this state, first apply RY(π/3) to set the amplitude ratio, then RZ(π/3) to
attach the phase eiπ/3 to the ∣1⟩ component.
Try it
Prepare the state with polar angle θ=π/3 and azimuthal angle ϕ=π/3:
∣ψ⟩=cos6π∣0⟩+eiπ/3sin6π∣1⟩.
Use RY to fix the amplitudes, then RZ to set the phase. The grader checks the full statevector.
Run your code to see the quantum state.
After pressing Run, the statevector panel should show the ∣0⟩ amplitude as a complex number
near 0.75−0.433i (magnitude ≈0.866) and the ∣1⟩ amplitude near 0.433+0.25i
(magnitude 0.5, argument π/6≈0.524 rad). The relative phase between the two
amplitudes is π/3, which is the azimuthal angle ϕ of the target state. The probabilities tab
should show P(0)=0.75 and P(1)=0.25.
Sign in on the full site to ask questions and join the discussion.