I´ve solved the Exercise 7.1.1 (Bernstein–Vazirani problem) of the book "An introduction to quantum computing" (Mosca et altri). The problem is the following:
Show how to find $a \in Z_2^n$ given one application of a black box that maps $|x\rangle|b\rangle \to |x\rangle |b \oplus x · a\rangle$ for some $b\in \{0, 1\}$.
I´d say we can do it like this:
- First i go from $|0|0\rangle \to \sum_{i \in \{0,1\}^n}|i\rangle| + \rangle$ using QFT and Hadamard
- Then I apply the oracle: $$ \sum_{i \in \{0,1\}^n}(-1)^{(i,a)} |i\rangle| + \rangle $$
- Then I read the pase with an Hadamard (since we are in $Z_2^n$ our QFT is an Hadamard) $$ |a\rangle |+ \rangle $$
I think is correct. Do you agree?