Stern-Gerlach expectation estimation (source code)

= Stern-Gerlach expectation estimation
{c}

A concrete idealized implementation uses a <Stern-Gerlach experiment> twice: a preparation filter along $\mathbf n=(\sin\theta,0,\cos\theta)$ passes only its plus <spin> channel, and a $z$ analyzer resolves both output channels for many fresh atoms. This prepares the <spin one-half along an axis> state $|\psi_\theta\rangle$. The authored apparatus description uses slit collimation, a nonuniform <magnetic field> with a pointed pole, and counters at the separated outputs.<The Feynman Lectures on Physics, Volume III by Richard Feynman and others/Chapter 5: Spin One>[The Feynman Lectures on Physics, Volume III, Chapter 5: Spin One, §5–1, figure 5–1 and the paragraph proposing output counters; §5–4, slit diffraction and internal-state limitations]{ref} The two-channel <spin one-half> preparation and analyzer are described separately; the source's recombining “improved” apparatus is explicitly idealized, so the setup here is a proposed estimation model, not a report of observed counts.<The Feynman Lectures on Physics, Volume III by Richard Feynman and others/Chapter 6: Spin One-Half>[The Feynman Lectures on Physics, Volume III, Chapter 6: Spin One-Half, §6–2, figures 6–1 and 6–2: two beams, one-channel preparation, and a second analyzer; idealized apparatus qualification in §5–1 of the preceding chapter]{ref}

Count every accepted analyzer event in its calibrated $+z$ or $-z$ channel and compute $\widehat\mu_N$ from the count difference. The <magnetic field> gradient separates trajectories through their <magnetic moments>; calibrated channel labels convert positions into <spin> <eigenvalues>. The readout is a population imbalance, not an intermediate trajectory carrying <spin> $\hbar\cos\theta/2$. Beam position also depends on flight time and field geometry, so averaging raw positions alone does not establish a calibrated <spin expectation value>.

As controls, feed known $|+z\rangle$ and $|-z\rangle$ preparations to check the channel assignment and leakage, hold the analyzer axis fixed, and repeat short blocks to check preparation drift. Measure background counts and relative channel efficiencies. With efficiencies $\eta_+$ and $\eta_-$ and negligible background, the detected plus fraction is
$$
p_+^{\rm det}=\frac{\eta_+p_+}{\eta_+p_++\eta_-(1-p_+)}.
$$
Unequal efficiencies bias the naive <sample mean>, even for arbitrarily many counts. For example, $p_+=3/4$, $\eta_+=1$, and $\eta_-=1/2$ give detected fraction $6/7$ and naive mean $5\hbar/14$, rather than $\hbar/4$. Background, overlapping beams, detector saturation, angle misalignment, unwanted internal states, and preparation correlations require a better <quantum measurement> model. Increasing $N$ only reduces the independent sampling contribution; it cannot remove these systematic errors. The selected preparation beam is the population being estimated, so losses in preparing it must be distinguished from losses in reading its two outcomes.