Lean, informalized

Nielsen & Chuang · Chapter 6, Quantum search algorithms · p. 251

Exercise 6.1 - The conditional phase shift of the Grover iteration equals 2|0⟩⟨0|−I2|0\rangle\langle 0| - I

The Grover phase shift in terms of a projector.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

The Grover iteration contains a conditional phase shift. On a system whose state space has the computational basis |0⟩,|1⟩,…,|d⟩|0\rangle, |1\rangle, \dots, |d\rangle, it leaves |0⟩|0\rangle as it is and changes the sign of every other basis state.✦ The exercise is to write this operator through the projector onto |0⟩|0\rangle and the identity II.

The Phase Shift

The library states the exercise on ℂd+1\mathbb{C}^{d+1}, the space of column vectors with d+1d+1 complex entries indexed 0,1,…,d0, 1, \dots, d, for an arbitrary dd. The standard basis vector |i⟩|i\rangle of ℂn\mathbb{C}^{n}, for a dimension nn and an index ii among 0,…,n−10, \dots, n-1, is the vector with components (|i⟩)j=δij.(|i\rangle)_j = \delta_{ij}.(1)✦ The vectors |0⟩,…,|d⟩|0\rangle, \dots, |d\rangle are the computational basis states of ℂd+1\mathbb{C}^{d+1}. The projector onto |0⟩|0\rangle is the operator |0⟩⟨0||0\rangle\langle 0| on ℂd+1\mathbb{C}^{d+1}, the outer product of |0⟩|0\rangle with its conjugate transpose ⟨0|\langle 0|.

The phase shift PP on ℂd+1\mathbb{C}^{d+1} is the diagonal matrix P=diag(1,−1,…,−1⏟d).P = \mathrm{diag}(1, \underbrace{-1, \dots, -1}_{d}).(2)✦

The Claim

Theorem 1. Let d≥0d \geq 0, and let PP be the phase shift (2) on ℂd+1\mathbb{C}^{d+1}. Then P=2|0⟩⟨0|−I,P = 2\,|0\rangle\langle 0| - I,(3)✦ where II is the identity on ℂd+1\mathbb{C}^{d+1}.

What Is Checked

The claim is stated over the phase shift PP of (2) and the projector |0⟩⟨0||0\rangle\langle 0| formed from the standard basis vector |0⟩|0\rangle of (1). What the library proves about them is the matrix identity (3).