Stern–Gerlach

Compare ideal sequential spin measurements, postselection and random samples.

About this tool

An unpolarised spin-½ beam gives +z and −z with probability½. Optionally forward both beams or postselect one to a second measurement axis at angle θ from z. Conditional probability P(+θ|+z)=cos²(θ/2), P(+θ|−z)=sin²(θ/2). Same axis preserves spin; 90° gives equal outcomes; 180° reverses it.

The table shows theory and random samples. With postselection, percentages are conditional on the forwarded atoms, not all incident atoms; the summary shows how many were blocked. With both beams, four path probabilities sum to1 and final +θ/−θ marginal probabilities remain½. Changing any setting clears the old sample. Measure again for a fresh independent sample.

The diagram is a measurement tree, not calculated spatial trajectories or magnet forces. Both separated beams are measured without coherent recombination. Counts are sampled immediately with browser pseudorandomness, avoiding an arbitrary wait for animated particles. The model is ideal: no detector inefficiency or imperfect polarisation. From1 to100000 incident atoms; no silent clamping. CSV percentages use the same denominator as the table.

Output labels show the theoretical probability and, after measuring, n = observed count. Impossible paths are dashed. Branches are separated for readability; angles and distances in the diagram do not represent real trajectories. Only atom-count input, second-measurement choice, angle and forward-beam setting are retained. Samples are not saved.