Write . Since the marked word is , the required oracle is a single Toffoli gate with and as its two controls and the answer qubit as its target:The target flips exactly when both controls are one, which is exactly when .
Let . Applying the oracle with this answer qubit produces phase kickback:Inside , the gates on both search qubits conjugate the phase oracle for . Hencewhere .
The first oracle similarly acts on the search register as . Reading the remaining gates from right to left, the search-register operation after its initial Hadamards is thereforewhile the answer qubit remains in .
After the initial Hadamards the search register isThe marked-state phase oracle changes only the last sign:Now . Since the overlap of the last displayed state with is , its image is . Thus the complete output isThe minus sign is a physically irrelevant global phase.
Measurement of the two search qubits in the computational basis returns with probability one. The answer qubit is unentangled from them and remains in .
Articles by others on the same topic
There are currently no matching articles.