b (source code)

= b
{scope}

For an <orthonormal basis>, choosing coefficients with magnitudes $\sqrt{p_j}$ gives the required <Born rule> <probabilities>. More generally, $\sum_j\sqrt{p_j}e^{i\theta_j}|\phi_j\rangle$ realizes the same distribution for arbitrary phases. The following are convenient examples of <pure-state realization of a basis measurement distribution>.