Use the Bernstein-Vazirani algorithm: initialize n qubits in , apply , query the supplied phase oracle once, apply again, and measure all n computational bits. Immediately after the query the state is
where the dot product in the exponent is taken modulo two. The Walsh-Hadamard transform gives amplitude
Every factor is one if and zero otherwise. Thus the final state is exactly , and the measurement outputs a with certainty after one oracle query. This is the character cancellation behind Bernstein-Vazirani phase kickback; because access here is already to the reduced phase oracle, no extra target ancilla or conversion from a bit-flip oracle is required.

Articles by others on the same topic (0)

There are currently no matching articles.