Let and let be one only at the marked input. A three-qubit implementation of Grover's algorithm starts with , applies a Hadamard gate to each qubit, queries the reversible quantum oracle , applies the Grover diffusion operator to the first two qubits, and measures those two qubits in the computational basis. Here . The full three-wire quantum circuit is the compositionFigure 1.
Three- and two-qubit implementations of Grover's algorithm for four inputs
. Details. Here . Since , phase kickback gives . The third qubit remains separable and unchanged. A direct marked-state phase oracle therefore replaces the three-qubit query using only two qubits:For the explicit choice only at , is a Controlled-Z gate. Immediately after it,The mean of these four probability amplitudes is . The Grover diffusion operator maps each probability amplitude to . The three unmarked probability amplitudes become zero and the marked one becomes one. A single query consequently finds with probability one.
A gate-level implementation of is . Up to an irrelevant global phase, it is . For any other chosen marked word, conjugate the Controlled-Z gate by Pauli X gates on precisely the positions where the marked word has a zero.
Articles by others on the same topic
There are currently no matching articles.
