// Function to calculate the propagator matrix for a magnet/rotator component.
// The formula is exp(-iHt) = 1 - i*sin(theta)*H + (cos(theta)-1)*H^2,
// and apparently it works as long as the eigenvalues of H are all 1, -1, or 0.
// (I pulled this from my old Pascal code and I have no recollection of whether
// I derived the formula at that time, or how I even learned of its existence.)