Grover diffusion operator (source code)

= Grover diffusion operator
{c}

For $|s\rangle=H^{\otimes n}|0^n\rangle$, the diffusion operator is $2|s\rangle\langle s|-I=-H^{\otimes n}I_0H^{\otimes n}$, where $I_0=I-2|0^n\rangle\langle0^n|$.