Exercise 6.1¶
According to the main text, a phase shift operator adds phase \(-1\) on computational basis state \(|x\rangle\) only when \(x = x_0\), that is
Consider operator \(U = 2|x_0\rangle\langle x_0| - I\). When performing \(U\) on arbitrary computational basis state \(|x\rangle\),
Also, operator \(U\) is unitary since
Therefore, unitary operator \(U\) corresponds to the phase shift in the Grover iteration.
It is worth pointing out that basis state \(|x\rangle\) can be written in either decimal form \(\{|0\rangle, |1\rangle, |2\rangle, |3\rangle, \dotsc, |N\rangle\}\) where \(N = 2^n\), or binary form \(\{|0\rangle, |1\rangle\}^{\otimes n}\). The main text tells that \(|x_0\rangle = |0\rangle\) (decimal form), then
One can also write \(|x_0\rangle = |0\rangle^{\otimes n}\) so
which is equivalent with eq. (4).