Understand how the Grover search algorithm achieves efficiency through amplitude manipulation.
We now show how to carry out those reflections formally using quantum operators. The geometry gives us a clue. The first step is reflection with respect to ∣ψother⟩. This corresponds to changing the sign of the amplitude for all states that are perpendicular to ∣ψother⟩, which is just ∣w⟩ because we have defined ∣ψother⟩ that way. So, the first step makes the amplitude of ∣w⟩ negative and produces the superposition state ∣s1⟩.
How do we find the part of ∣s0⟩ that lies along ∣w⟩? To find that component, we express the state vector ∣s0⟩ as the sum of a part ∣s0⟩∥ parallel to ∣w⟩ and a part ∣s0⟩⊥ perpendicular to ∣w⟩ and, hence, parallel to ∣ψother⟩:
∣s0⟩=∣s0⟩∥+∣s0⟩⊥=∣w⟩ project along ∣w⟩⟨w∣s0⟩+∣ψother ⟩ projectalong∣ψother ⟩⟨ψother ∣s0⟩.
To understand the above equation, recall that the Dirac bracket ⟨w∣s0⟩ expresses the projection of the state vector ∣s0⟩ along the direction of the state vector ∣w⟩. Then, all we need to do is change the sign of the part that is parallel to our desired state. This gives ∣s1⟩ :