Drag to orbit.

Nuclear Spin Precession and Relaxation in an MRI Magnet (Bloch Equations)

Tip, dephase, refocus and regrow: the Bloch sphere behind MRI, and the same maths as spin qubits.
Larmor frequency of 1H-
Spin polarisation at 37 C-
Frequency spread of spins-
Dephasing time ~ 1/spread-
Signal now (fraction of M0)-
Longitudinal Mz now-
Time since pulse-
Echo amplitude e^(-TE/T2)-
Detected signal |Mxy|: simulation (orange) vs closed form (white dashed) vs pure T2 envelope (green)
Longitudinal magnetisation Mz: simulation vs closed form (white dashed)
The science
Honest scope: the physics of nuclear spins in a magnet field, the basis of MRI. It is a model of an ensemble of hydrogen nuclei, not a model of a patient, and no part of it concerns "transcendent" or energy healing (there is no evidence for that). Tissue relaxation times are only typical order-of-magnitude values (they depend on the tissue, field and temperature).

Larmor precession. A proton spin in a field B0 precesses at f = (gamma / 2 pi) B0 with gamma / 2 pi = 42.577 MHz per tesla, so 63.87 MHz at 1.5 T. A scanner works with a radio signal at exactly this frequency.

Polarisation. At body temperature the spins are only slightly aligned: P = tanh(hbar gamma B0 / 2 k T) ~ 4.9 parts per million at 1.5 T. Tiny, but with 10^22 protons per gram it is measurable. Higher B0 means more signal.

Bloch equations in the frame rotating at the central Larmor frequency; spin k is off resonance by delta_f_k = f_k - f_0:

dMx/dt = w_k My - Mx / T2 dMy/dt = -w_k Mx - My / T2 w_k = 2 pi delta_f_k dMz/dt = (M0 - Mz) / T1

An RF pulse tips the magnetisation by a flip angle alpha (modelled as an instant rotation). Afterwards Mz regrows toward M0 as 1 - (1 - cos alpha) e^(-t/T1), and the transverse magnetisation of each spin decays as sin(alpha) e^(-t/T2).

Dephasing and echo. Field inhomogeneity (here a spread of W = ppm x 42.577 x B0 Hz across the sample) makes spins precess at different rates, so their sum decays much faster than T2. A 180 degree pulse at TE/2 reverses the phases; the spins refocus at TE and the signal returns to e^(-TE/T2) (the spin echo, Hahn 1950). The echo cannot undo true T2 decay, which is what scanners measure.

Link to quantum computing. Each spin is a two-level quantum system; the pulse is a single-qubit rotation and T1, T2 are the same relaxation and decoherence times quoted for spin qubits. Echo sequences are the basic tool for fighting dephasing in both.

Simplifications: 240 isochromats on a uniform spread of frequencies (40 drawn), ideal instant pulses, no diffusion, no spatial encoding or gradients, no T2* from anything but the uniform spread, one tissue at a time.

Independent numerical checks
Made with 🟠 Blender · Three.js