Solution (source code)

= Solution

The <phase oracle> multiplies an unmarked <basis> <vector> by $+1$ and a marked one by $-1$. Thus the state after the oracle is
$$
\boxed{V_f|e_0\rangle=\frac1{\sqrt N}\bigl(|A_0\rangle-|A_1\rangle\bigr).}
$$
Its squared <norm> is $(S_0+S_1)/N=1$. All computational outcomes would still have <probability> $1/N$ if measured at this point: the oracle has changed the <relative phase>, not the magnitudes of the amplitudes. The following reflection converts that phase information into a changed <probability distribution> through <quantum interference>.