= Two-qubit diffusion circuit
{title2=$D=2|++\rangle\langle++|-I$}
The <inversion about the mean> for four <computational-basis states> can be implemented using <Hadamard gates>, <Pauli X gates> and one <controlled-NOT gate>, up to <global phase>. Let $Q=H\otimes H$ and $P=X\otimes X$. Since $CZ=(I\otimes H)\operatorname{CNOT}(I\otimes H)=I-2|11\rangle\langle11|$, one has $PCZP=I-2|00\rangle\langle00|$ and therefore $QPCZPQ=I-2|++\rangle\langle++|=-D$. This gives an exact <quantum circuit> representative of the four-entry <Grover search algorithm> diffusion step modulo its irrelevant overall minus sign.
Back to article page