What are the two reflections in each Grover iteration, and how do they geometrically amplify the target state's amplitude?
Think about your answer, then reveal below.
Model answer: The first reflection is the oracle O, which flips the phase of the target state: O|w> = -|w> while leaving all other states unchanged. The second is the diffusion operator D = 2|s><s| - I, which reflects the state about the uniform superposition |s>. Geometrically, in the two-dimensional plane spanned by |w> (target) and |w_perp> (non-target superposition), each Grover iteration rotates the state vector by an angle of 2*arcsin(1/sqrt(N)) toward |w>. After (pi/4)*sqrt(N) iterations, the state has rotated from nearly |w_perp> to nearly |w>.
The geometric picture in the {|w>, |w_perp>} plane makes Grover's algorithm transparent. The initial state |s> makes an angle arcsin(1/sqrt(N)) with |w_perp>. Each iteration is a rotation by 2*arcsin(1/sqrt(N)). After k iterations, the angle from |w_perp> is (2k+1)*arcsin(1/sqrt(N)). Setting this equal to pi/2 gives k ≈ (pi/4)*sqrt(N). The rotation picture also explains why overshooting is harmful: past the optimal iteration count, the state rotates away from |w>.