= Solution
Use <Hadamard conjugation of a controlled gate> to obtain the <Controlled-Z gate>:
$$
CZ=(I\otimes H)\operatorname{CNOT}_{1\to2}(I\otimes H)
=\operatorname{diag}(1,1,1,-1).
$$
Conjugating by <Pauli X gates> on both <qubits> moves its negative entry from $|11\rangle$ to $|00\rangle$:
$$
(X\otimes X)CZ(X\otimes X)=I-2|00\rangle\langle00|.
$$
Finally $(H\otimes H)|00\rangle=|+\rangle|+\rangle=|e_0\rangle$, so a <two-qubit diffusion circuit> is
$$
\boxed{C=(H\otimes H)(X\otimes X)(I\otimes H)
\operatorname{CNOT}_{1\to2}(I\otimes H)(X\otimes X)(H\otimes H)=-W.}
$$
In temporal order, apply <Hadamard gates> on both <qubits>, <Pauli X gates> on both, a <Hadamard gate> on the second, a <controlled-NOT gate> $1\to2$, a <Hadamard gate> on the second, <Pauli X gates> on both, then <Hadamard gates> on both. Every gate is permitted. The overall minus sign is the allowed <global phase>, so this implements the required <inversion about the mean> for <Grover search algorithm>.
Back to article page