Use the Hadamard basis states . The Hadamard gate satisfies , , and . After the first three Hadamard gates, the full quantum state is
The Pauli X gate obeys . Consequently the Boolean quantum oracle produces phase kickback:
Factoring out the ancilla qubit, the four states immediately after the function oracle are
The final Hadamard gates send to and to . In particular, the printed quantum circuit includes a final Hadamard gate on the ancilla qubit too. Its full outputs, ordered as , are
Thus one oracle call identifies with certainty: a computational-basis measurement of the first two qubits returns . The ancilla qubit returns to and carries no additional information about . The Bernstein-Vazirani algorithm turns the pattern of relative quantum phases into a definite computational-basis state.

Articles by others on the same topic (0)

There are currently no matching articles.