My understanding of the Bernstein-Vazirani algorithm is as follows:
We have a black box oracle with secret string $s$. The black box does $$f(x) =s\cdot{x}=(\sum_1^n s_i\cdot{x_i})$$
We run each qubit through a Hadamard gate first, then through the oracle:
If $s_i = 0$, nothing happens and the ith qubit is still in the $|+\rangle$ state. If $s_i = 1$, the $i$-th qubit picks up a phase and is now in the $|-\rangle$ state.
We run ignore the output and run the inputs qubits through another Hadamard gate, and now we've recovered s with only a single query!
The part I don't understand is that nothing about the oracle (1) promises this phase kickback will occur. The references I've seen seem to implicitly assume this, why are they assuming this behavior?
Even the first reference, which describes a CNOT-gate based implementation of this oracle, only does so after the solution — which to me suggests that the implementation is a detail rather than a necessary feature of the problem.
To clarify, I'd have no issues if the oracle was explicitly stated to have this phase kickback behavior, but its seems like this condition is being taken for granted.
References:
- CMSC 33001: Novel Computing Architectures and Technologies (Lecture 8)
- Lecture 18, Tues March 28: Bernstein-Vazirani, Simon (Scott Aaronson)
- Lecture 4: Elementary Quantum Algorithms (Dieter van Melkebeek)
- CSE 599d - Quantum Computing: The Recursive and Nonrecursive Bernstein-Vazirani Algorithm (Dave Bacon)