Pure-state realization of a basis measurement distribution (source code)

= Pure-state realization of a basis measurement distribution
{title2=$|\psi\rangle=\sum_j\sqrt{p_j}e^{i\theta_j}|e_j\rangle$}

For an <orthonormal basis> $\{|e_j\rangle\}$ and nonnegative numbers $p_j$ summing to one, the displayed <vector> is a <unit vector> and gives measurement <probabilities> $p_j$ by the <Born rule>. Conversely, every <pure state> with those <probabilities> has coefficients of these magnitudes, with arbitrary phases on the nonzero coefficients. A common change of all phases is a <global phase>; differences between them are <relative phases> that can affect measurements in another <basis>. Zero-probability coefficients vanish, so their phases have no effect.