Solution (source code)

= Solution

Choose \b[$|\psi\rangle=|0\rangle$]. Since $|0\rangle=(|\phi_0\rangle+|\phi_2\rangle)/\sqrt2$, the <probability amplitudes> in the measurement <basis> are $(1/\sqrt2,0,1/\sqrt2)$. Their squared moduli give $(1/2,0,1/2)$ by the <Born rule>.