Let . After the Hadamards and the oracle, Bernstein-Vazirani phase kickback gives
The Walsh-Hadamard identity
and give
A final oracle call evaluates on the definite input :
Since modulo two is the parity of the Hamming weight of , this form also determines the last-qubit measurement.
The first register of is exactly , so the probability of observing the string is
Measuring the first register does not disturb the product-state last register. Its state is
If has odd Hamming weight, then and the final bit is , so the probability is . If has even Hamming weight, then and the final bit is , so the probability is . Thus

Articles by others on the same topic (0)

There are currently no matching articles.