Solution (source code)

= Solution

In the $S_z$ basis $\alpha,\beta$, $S_x=(\hbar/2)\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)$. Its normalized eigenstates are $(\alpha+\beta)/\sqrt2$ and $(\alpha-\beta)/\sqrt2$, with eigenvalues $+\hbar/2$ and $-\hbar/2$. Expanding the initial state in this basis and evolving the two phases gives, with $\Omega=\lambda B$,
$$
\boxed{|\psi(t)\rangle=\cos(\Omega t/2)\,\alpha-i\sin(\Omega t/2)\,\beta,\qquad
P(S_z=+\hbar/2)=\cos^2(\Omega t/2).}
$$
The sign of $\Omega$ fixes rotation sense; the <probability> is insensitive to that sign.

In the <Stern-Gerlach experiment>, a collimated atomic beam passes through a strongly nonuniform <magnetic field>. The <force> component $F_z\simeq\mu_z\partial_zB_z$ separates magnetic-moment projections spatially. Silver atoms provide an effective spin-half moment, yielding two resolved components rather than a continuous distribution of deflections. To test the rotation above, use a first analyzer and aperture to prepare $+z$, pass that selected beam through a controlled approximately uniform $x$-directed field, and analyze it with a second $z$-oriented Stern-Gerlach magnet. Varying field strength or interaction time changes the two output populations as the calculated cosine and sine squares. A narrow velocity distribution and controlled field-entry geometry preserve the contrast by reducing variations of interaction time and unwanted spin evolution.