|q⟩ Bad Qubits

intermediate · Physics · Time Evolution & the Schrödinger Picture

Spin Precession Revisited

The cleanest physical realisation of qubit time evolution is a spin in a magnetic field. Its dynamics — Larmor precession — ties together the operator U(t)U(t), the rotation gates, and the Bloch sphere into one picture.

The Hamiltonian of a spin in a field

A magnetic moment μ=γS\vec\mu = \gamma\vec S in a uniform field B=Bz^\vec B = B\hat z has energy H^=μB=γBS^z\hat H = -\vec\mu\cdot\vec B = -\gamma B\,\hat S_z. Writing S^z=2σz\hat S_z = \tfrac{\hbar}{2}\sigma_z and defining the Larmor frequency ωL=γB\omega_L = -\gamma B (sign conventions vary; we take ωL>0\omega_L > 0),

H^=ωL2σz.\hat H = \frac{\hbar\omega_L}{2}\,\sigma_z.

This is the same ZZ-type Hamiltonian we have used throughout the module, now with a concrete physical origin: a real spin in a real magnetic field.

Evolution is a Z-rotation

Exponentiating,

U(t)=eiH^t/=ei(ωLt/2)σz=RZ(ωLt).U(t) = e^{-i\hat H t/\hbar} = e^{-i(\omega_L t/2)\sigma_z} = R_Z(\omega_L t).

Time evolution under the field is exactly the RZR_Z rotation gate with angle θ=ωLt\theta = \omega_L t. The longer you wait, the larger the rotation angle — the spin precesses at a steady rate.

Watching the Bloch vector precess

Start with the spin pointing along +x+x, i.e. +=12(0+1)|+\rangle = \tfrac{1}{\sqrt2}(|0\rangle + |1\rangle). Applying U(t)U(t):

ψ(t)=12(eiωLt/20+e+iωLt/21).|\psi(t)\rangle = \frac{1}{\sqrt2}\big(e^{-i\omega_L t/2}|0\rangle + e^{+i\omega_L t/2}|1\rangle\big).

Its Bloch vector is

r(t)=(cosωLt,  sinωLt,  0),\vec r(t) = \big(\cos\omega_L t,\; \sin\omega_L t,\; 0\big),

a unit arrow rotating in the equatorial plane about the field axis z^\hat z at angular frequency ωL\omega_L. (The in-plane sense depends on the sign convention for ωL\omega_L.) The component along the field, σz=0\langle\sigma_z\rangle = 0, is conserved — exactly as the previous two lessons predicted, since σz\sigma_z commutes with H^\hat H.

Quarter-turn example

For ωLt=π/2\omega_L t = \pi/2 the Bloch vector moves from +x+x to +y+y: the state becomes 12(eiπ/40+e+iπ/41)\tfrac{1}{\sqrt2}(e^{-i\pi/4}|0\rangle + e^{+i\pi/4}|1\rangle), which (up to global phase) is 12(0+i1)=+i\tfrac{1}{\sqrt2}(|0\rangle + i|1\rangle) = |+i\rangle. The probabilities of 0|0\rangle and 1|1\rangle stay at 1/21/2 throughout — pure precession moves phase, not population.

Try it

Prepare +|+\rangle with a Hadamard, then precess by a quarter turn with RZ(π/2)R_Z(\pi/2). The grader checks the full statevector, which should equal 12(eiπ/40+e+iπ/41)\tfrac{1}{\sqrt2}(e^{-i\pi/4}|0\rangle + e^{+i\pi/4}|1\rangle).

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.