|q⟩ Bad Qubits

intermediate · Physics · Spin-½ Systems & Pauli Algebra

Checkpoint: Spin Dynamics

This checkpoint ties together everything in the module: the spin–qubit mapping, the rotation operator, Rabi driving, and Larmor precession. You will assemble a short pulse sequence of the kind used in nuclear magnetic resonance and qubit control.

The physics of the sequence

Start with a spin in 0|0\rangle — fully polarized along +z+z. Two operations follow.

1. A π/2\pi/2 pulse about xx. On resonance, a brief transverse drive rotates the spin about the xx-axis. Choosing the pulse area Ωt=π/2\Omega t = \pi/2 applies

RX ⁣(π2)=cosπ4Iisinπ4σx=12(1ii1),R_X\!\left(\frac{\pi}{2}\right) = \cos\frac{\pi}{4}\,I - i\sin\frac{\pi}{4}\,\sigma_x = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -i \\ -i & 1 \end{pmatrix},

which tips the polarization from +z+z down into the equatorial plane, creating a coherent superposition with Sz=0\langle S_z\rangle = 0.

2. Free Larmor precession by π/2\pi/2. Left in the static field, the equatorial spin precesses about zz. Over a precession angle ωLt=π/2\omega_L t = \pi/2 the evolution is

RZ ⁣(π2)=diag ⁣(eiπ/4,e+iπ/4),R_Z\!\left(\frac{\pi}{2}\right) = \operatorname{diag}\!\left(e^{-i\pi/4},\, e^{+i\pi/4}\right),

rotating the Bloch arrow within the equatorial plane.

Order matters

These two rotations are about different axes, and rotations about different axes do not commute — the very fact encoded by [σx,σz]=2iσy[\sigma_x, \sigma_z] = -2i\sigma_y. Applying RZR_Z before RXR_X would produce a physically different state. The sequence below is RXR_X first, then RZR_Z.

Try it

Build the sequence on one qubit: apply RX(π/2)R_X(\pi/2) first, then RZ(π/2)R_Z(\pi/2). The grader checks the exact resulting state vector, so both the gates and their order must be correct.

Run your code to see the quantum state.

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