Bernstein-Vazirani decoding controlled by a quantum register Created 2026-10-06 Updated 2026-11-05
For a Boolean quantum oracle whose function is , place its target in . Conjugating the oracle by a Walsh-Hadamard transform on the register translates that register by . This is Bernstein-Vazirani phase kickback without measuring its output, so the index may remain in an arbitrary quantum superposition. A second application undoes the translation. A phase evaluation between the two calls therefore transfers a hidden-label-dependent phase to the index register while uncomputation returns the decoding register to zero.
Bernstein-Vazirani phase kickback Created 2026-09-24 Updated 2026-11-05
For , phase kickback followed by a Walsh-Hadamard transform maps the uniform phase state toThe hidden linear string is therefore recovered with certainty.
Hadamard transform Created 2026-10-13 Updated 2026-10-18
The normalized Hadamard transform maps a vector indexed by binary strings through entries , where the dot product is evaluated modulo two. It is its own inverse and an orthogonal transformation, hence also a unitary operator on complex input vectors. The Hadamard gate is the quantum case, and the Hadamard basis is the image of the computational basis. The Walsh-Hadamard transform gives the same tensor product construction.
For two qubits, applying one Hadamard gate to each prepares the uniform quantum superpositionEach probability amplitude is , so each computational-basis measurement outcome has probability . Applying the Hadamard transform again reconstructs : signed contributions cancel at the other three outputs. Its usefulness lies in combining simple local quantum gates into an operation on exponentially many amplitudes. Extracting useful information still requires an appropriate subsequent transformation and measurement.
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 iswhere the dot product in the exponent is taken modulo two. The Walsh-Hadamard transform gives amplitudeEvery 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.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 47 2 Solution Created 2026-10-03 Updated 2026-10-14
The Walsh-Hadamard transform is the tensor product of one Hadamard gate on each qubit. Indeed,The network therefore consists of parallel Hadamard gates, with no interaction between wires. Applied to an all-zero quantum register, it produces the uniform quantum superposition of all input strings. This lets a Boolean quantum oracle act coherently on all those inputs; a subsequent operation can turn their relative phases into useful interference. It does not permit reading all oracle values from a single measurement in quantum mechanics.
Parallel Hadamard gates and the one-query Bernstein-Vazirani network
. Details. For the supplied linear-phase input, the amplitude on output isEach factor is obtained by summing over the independent bit . This directly proves the relevant orthogonality of the binary Fourier phases, and yields the output state exactly.
For exact classical identification, query the Boolean function at the standard unit vectors: . Hence oracle calls suffice. They are also necessary in the worst case, even with adaptive queries: every answer supplies one binary linear equation in the unknown string. With fewer than queries, their coefficient matrix has matrix rank at most the number of queries, so its null space contains a nonzero string . The strings and give identical answers along that adaptive transcript and cannot both be identified correctly. Equivalently, a depth- binary decision tree has at most leaves and must distinguish possibilities. Thus the exact classical query count is . This concerns exact recovery, rather than allowing an arbitrary error probability.
The quantum network in the lower panel starts its data quantum register in and its answer ancilla qubit in , which can be prepared as . Apply Hadamard gates to the data wires, make one Boolean quantum oracle call, then apply Hadamard gates again to all data wires. Quantum phase kickback producesA computational-basis measurement of the data wires gives all bits of with certainty. This is Bernstein-Vazirani phase kickback: one quantum query, data Hadamard gates, and one answer-state preparation suffice. The answer ancilla qubit stays separate from the data at the output.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 53 2 1 Solution Created 2026-10-03 Updated 2026-10-14
Apply one Hadamard gate independently to each qubit. These gates act in parallel, so the quantum circuit implements with gates and depth one.
Parallel Hadamard gates implementing the binary Fourier transform
. Details. For a computational basis state, factorization givesThe exponent is the dot product over the finite field , because multiplying the separate signs adds their exponents modulo two. This is the Walsh-Hadamard transform, equivalently the quantum Fourier transform on the finite Abelian group .
In particular, the all-zero input becomes the uniform coherent superposition . It is a useful initial operation because an oracle can then act on all amplitudes in one call, and subsequent interference can reveal a global property. Measurement alone does not read all function values: the later interference step is what turns the preparation into an algorithmic advantage.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 1 b Solution Created 2026-10-03 Updated 2026-10-14
When , the first two qubits after the Boolean quantum oracle are . The Hadamard gate obeys for . Applying the Walsh-Hadamard transform therefore givesConsequently the quantum measurement in the computational basis has the deterministic outcomesThese four distinct answers identify the four promised Boolean quantum oracles with one query and certainty. The constant term does not affect the measurement in quantum mechanics, because a global phase does not change its probabilities.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 1 c Solution Created 2026-10-03 Updated 2026-10-14
All four promised functions have . Use quadratic Boolean phase cancellation: apply a Controlled-Z gate to remove the phase , then apply the Walsh-Hadamard transform. With the rightmost gate acting first, chooseBecause and the Controlled-Z gate commutes with the Pauli Z gates,The quantum measurement in the computational basis consequently producesEach answer occurs with probability one for its promised Boolean quantum oracle.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 49 4 a Solution Created 2026-10-03 Updated 2026-10-14
Put and label the binary digits of by , with . The Walsh-Hadamard transform prepares the uniform quantum superposition . Applying the phase gate to the qubit for digit multiplies its basis amplitude by . Taking their product givesWith the most significant qubit written first, this provesEach power is implemented by repeated uses of the supplied gate. The total is uses. This realizes dyadic phase-gate identification without needing an unknown controlled gate or asserting a gate-call cost polynomial in .
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 61 1 b ii Solution Created 2026-10-03 Updated 2026-10-06
The linear decoding must be done coherently, so its output is available inside the next Boolean quantum oracle call. Use registers of qubits and a shared phase ancilla qubit in . Define the Bernstein-Vazirani decoding controlled by a quantum registerThe ancilla qubit is implicit. For every computational index , the Walsh-Hadamard transform calculation givesIn particular on these states. Initialize to and to . The three query stages areThe middle equality uses the matching index , not a classical guess of that string. The second performs uncomputation, removing the hidden-string register without losing its phase on . Apply to to obtainThis requires precisely two queries to and one to , and only additional fixed quantum gates. No measurement of is made: such a measurement would spoil the required coherence. Preparing all registers and the phase ancilla qubit uses only the initially available zero states.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 61 1 b i Solution Created 2026-10-03 Updated 2026-10-06
Prepare an additional qubit in by applying and then the Hadamard gate to . Apply to the data register. The Boolean quantum oracle then produces quantum phase kickback:A final Walsh-Hadamard transform gives an amplitude for equal toTo see this identity, the sum factors over the bits; any position at which and differ contributes . This is Bernstein-Vazirani phase kickback, and its output isThere is exactly one oracle query, fixed quantum gates, and no probabilistic intermediate step. The ancilla qubit can be left in or reset to using its known inverse preparation. The construction includes the case .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 2 a Solution Created 2026-10-03 Updated 2026-10-06
Assume first . Define the orthonormal quantum statesand by . The relevant invariant subspace is the two-dimensional span of these quantum states, not the entire Hilbert space. The uniform quantum superposition is .
In the ordered orthonormal basis , the marked-state phase oracle is the reflection operator . Since , conjugation by the Walsh-Hadamard transform gives the Grover diffusion operatorIt is the reflection in the line through . The product of these two reflection operators is a rotation matrix by toward the marked quantum state:Thus the Born rule gives . Choose a nonnegative integer nearest to . Rounding changes the angle from by at most , soEach Grover search algorithm iteration uses one marked-state phase oracle query; all other gates are known. A final quantum measurement in the computational basis therefore produces a uniformly chosen marked item, conditional on success, with probability better than one half when . This uses the supplied marked count to select the stopping time; an unknown needs an additional search schedule or counting procedure. If , no oracle query is needed; if , no marked item exists, so a successful search is impossible.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 3 10D b ii Solution Created 2026-09-24 Updated 2026-10-03
In either promised case, construct by the one-query procedure in part (a), apply the Walsh-Hadamard transform to its two qubits, and perform a quantum measurement in the computational basis. The outcome is certainly for case (i) and certainly for case (ii). ThereforeThis is a two-bit instance of Bernstein-Vazirani phase kickback, and also a promised Deutsch-Jozsa test.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 15C b i Solution Created 2026-09-24 Updated 2026-10-03
Starting from , the first layer of Hadamard gates givesThe Boolean quantum oracle then givesUsing the Walsh-Hadamard transform identitythe final state is
Quadratic Boolean phase cancellation 2026-10-14
For a two-variable Boolean quantum oracle, quantum phase kickback produces the phase on . If the quadratic coefficient is known, apply the Controlled-Z gate to the power : its phase cancels the quadratic term. A Walsh-Hadamard transform then maps the remaining phase state to . The constant term is only a global phase, and both linear coefficients are read in one quantum measurement in the computational basis.
Walsh-Hadamard transform Created 2026-09-29 Updated 2026-11-05

