Calculates the example of adiabatic spin rotation from
Use of Rotating Coordinates in Magnetic Resonance Problems I. I. Rabi, N. F. Ramsey, and J. Schwinger Rev. Mod. Phys. 26, 167 (1954).
https://doi.org/10.1103/RevModPhys.26.167
The calculation is based on Equation (12).
Initially, the spin points along the +x direction, and so does the magnetic field. Then, the magnetic field begins to slowly rotate. In the adiabatic limit, where the magnetic field vector changes slowly compared to the Larmor frequency, the spin is dragged along with the magnetic field.
This program compares the actual spin dynamics with the adiabatic limit.
asr_rk_taper.py shows what happens under a linear decrease in the magnetic field magnitude during rotation.