Nielsen and Chuang -- Chapter 6
Updated on January 11, 2019
(6.2) Show that the operation $(2 \ket{\psi}\bra{\psi} - I)$ (where $\ket{\psi}$ is the equally weighted superposition of states) applied to general state $\sum_k \alpha_k \ket{k}$ produces
\[\sum_k [ -\alpha_k + 2\langle \alpha \rangle ] \ket{k}\]where $\langle \alpha \rangle \equiv \sum_k \alpha_k / N$ is the mean value of $\alpha_k$.
\[(2 \ket{\psi}\bra{\psi} - I) \sum_k \alpha_k \ket{k} = \Big(2\frac{1}{N^{1/2}}\ket{x} \frac{1}{N^{1/2}} \sum_{x'=0}^{N-1} \bra{x'} - I\Big)\sum_k \alpha_k \ket{k} \\ = 2\frac{1}{N} \sum_{x=0}^{N-1} \ket{x}\bra{x'}\sum_k \alpha_k \ket{k} -\sum_k \alpha_k \ket{k} \\ = \frac{2}{N} \sum_k \ket{k} \alpha_k -\sum_k \alpha_k \ket{k} \\ = \sum_k [ 2\langle \alpha \rangle -\alpha_k ] \ket{k}\]