The displayed Bernstein-Vazirani algorithm prepares its ancilla qubit in the computational-basis state before the first Hadamard gate. At the function oracle it is therefore the eigenstate of the Pauli X gate, which enables phase kickback. Preparing instead yields at the function oracle; target flips leave this state unchanged, so the data contain no information about .
The Hadamard-conjugated linear oracle makes the more general statement transparent. With zero data and initial ancilla qubit , the full fixed quantum circuit outputs
For nonzero , the correct data outcome has probability . To obtain exact identification for all , this preparation must have , so it is up to global phase. This is a condition on the prescribed preparation circuit: any alternative quantum state preparation that supplies at the function oracle is equivalent.
Bell-basis conversion circuit Created 2026-10-07 Updated 2026-11-05
Apply a Hadamard gate to the first qubit, then a controlled-NOT gate from the first to the second. This maps a computational-basis state to the Bell state with phase bit and parity bit . Its inverse uses the same gates in reverse order because each gate is self-inverse but they do not commute. Applying the forward sequence twice is not generally a decoding operation.
Computational-basis state Created 2026-09-28 Updated 2026-11-05
In most-significant-bit-first order, let and . On a computational-basis state, process wire with a Hadamard gate, then controlled phase gates controlled by unprocessed wire for each . Wire becomes . Reversing the final wire order yields the positive-exponent quantum Fourier transform. There are Hadamard gates and controlled phase gates. Physical reversal costs swap operators, each expressible as three controlled-NOT gates, themselves implemented with Hadamard gates and a Controlled-Z gate. Thus the entire construction uses gates from the specified family.
Function oracle 2026-10-24
A function oracle supplies access to an unknown function : given an allowed input , one query returns . Query complexity counts these accesses separately from known local computation. A classical query receives one definite answer; a quantum oracle specifies coherent access through a unitary operator, allowing inputs in quantum superposition. The distinction is part of the access model, not a change to the mathematical function.
A Boolean quantum oracle preserves and adds a one-bit value into an answer qubit by exclusive or. On known computational-basis states, its output determines the same value as a classical function oracle query.
Graph state Created 2026-09-28 Updated 2026-11-05
A graph state assigns one qubit to each vertex of an undirected graph. Begin with all qubits in and apply a Controlled-Z gate for every edge.
For an undirected graph , the graph state is
The Controlled-Z gates commute, so their ordering does not change the result. On a computational-basis state , each occupied edge contributes ; the amplitudes retain equal magnitude but acquire graph-dependent phases. An isolated vertex remains in the product state , while edges can create entanglement. [ref]
Mixed state Created 2026-09-29 Updated 2026-10-14
A mixed state is a density operator that is not a rank-one orthogonal projection. In finite dimension it is characterized by , so its purity of a density operator distinguishes it from a pure state.
Compare a pure state quantum superposition with an equal classical choice between two computational-basis states of a qubit:
A projective measurement in the computational basis gives for both density operators. An projective measurement in the Hadamard basis distinguishes them: the Born rule gives for and for . These comparisons use separate copies of each preparation; measuring first changes the state tested by a subsequent measurement.
Figure 1.
Equal computational-basis populations can hide different coherence and X-measurement statistics
. Details.
The off-diagonal entries of encode quantum coherence in the computational basis. Such quantum coherence depends on the basis: is diagonal in the Hadamard basis but remains a pure state. Mixedness is independent of the basis, because a unitary change of basis preserves the eigenvalues and the purity of a density operator.
Even the quantum state ensemble is not unique:
The off-diagonal entries of the two Hadamard basis projectors cancel. Thus the density operator retains precisely what measurements on the system can reveal, while an accessible preparation label carries additional information. A mixed state can also be the reduced density matrix of an entangled state, even when the whole system is in a pure state; classical ignorance about a selected component is not its only physical origin. [ref]
Use deterministic two-qubit entanglement dilution, retaining the specified complex probability amplitudes. Alice implements a quantum instrument on with Kraus operators
The Kraus representation completeness condition holds even for complex :
To realize this using the permitted quantum gates and a basic measurement, Alice initializes an ancilla qubit to . Conditional on her computational-basis state being , she applies to the unitary matrix
Each has orthonormal columns. Therefore is a unitary gate, with
A computational-basis measurement of implements the desired quantum instrument. Its two unnormalized branches on are
Each has probability . Alice sends her outcome as one classical bit. For , both parties keep their qubits unchanged. For , both apply a Pauli X gate, giving
Thus both outcomes produce the exact target using one classical bit and local operations. The construction includes or and arbitrary relative quantum phases; it requires no quantum channel between the parties.
Write for bitwise exclusive or. Both quantum registers begin in . After the first Hadamard transform their joint quantum state is
The quantum oracle maps each component to . By linearity, the required quantum state is therefore
The different first-register computational-basis states are orthogonal, so there are orthogonal joint components of squared probability amplitude , even though some second-register values coincide. Thus the displayed quantum state is normalized.
Use the Hadamard basis states . The Hadamard gate satisfies , , and . After the first three Hadamard gates, the full quantum state is
The Pauli X gate obeys . Consequently the Boolean quantum oracle produces phase kickback:
Factoring out the ancilla qubit, the four states immediately after the function oracle are
The final Hadamard gates send to and to . In particular, the printed quantum circuit includes a final Hadamard gate on the ancilla qubit too. Its full outputs, ordered as , are
Thus one oracle call identifies with certainty: a computational-basis measurement of the first two qubits returns . The ancilla qubit returns to and carries no additional information about . The Bernstein-Vazirani algorithm turns the pattern of relative quantum phases into a definite computational-basis state.
The required identity is CNOT control reversal in the Hadamard basis. To derive it using standard quantum circuit identities, let be the Controlled-Z gate, which multiplies by and fixes the other computational-basis states. Since ,
The Controlled-Z gate is symmetric in its two wires. Combining this symmetry with gives
This is an exact operator identity, including its global phase, and applies to arbitrary inputs. One can also check it directly from the orthogonal projectors : conjugating by gives
For the three-wire quantum circuit, put . Conjugation distributes over products because : . Each CNOT gate in therefore reverses direction, while the Hadamard gates on untouched wires cancel. The Hadamard-conjugated linear oracle is
These are the simplified quantum circuits in the figure: for there are no gates; for there is ; for there is ; and for there are both. The ancilla qubit becomes their common control. On every computational-basis state, the entire simplified circuit acts as
Starting the data qubits at , the prescribed computational basis preparation of the ancilla qubit must therefore be : it activates the required flips and gives . Starting it at instead gives for every , so no information is obtained.
More generally, an initial ancilla qubit state in this same fixed quantum circuit gives
For nonzero , the desired data output has probability , and exact identification for every requires . This condition refers to the displayed ancilla preparation for the Bernstein-Vazirani algorithm: the state entering the function oracle must be , up to global phase. Other quantum state preparation procedures that deliver this same state are equivalent; is the prescribed input before the first Hadamard gate.
For arbitrary , linearity of the linear Boolean function supplies
This decomposition is for analysis: the Bernstein-Vazirani algorithm calls the unknown function oracle as one supplied operation. The common control starts at , so the simplified quantum circuit takes to . Equivalently, phase kickback gives a product state
which the final Hadamard transform decodes to . Thus one quantum oracle call suffices for every , compared with classical calls. This counts function oracle uses; the surrounding Hadamard gates and final computational-basis measurement still act on and qubits, respectively.
Write both the input and output integer labels in most-significant-bit-first order, and . Factoring the Fourier phase over the bits of gives the product decomposition of a Fourier phase state:
Here denotes the binary fraction ; the integer part of does not affect the phase.
Build a dyadic quantum Fourier transform circuit as follows. Process wires in that order. First apply a Hadamard gate to wire . Then, for each , apply the controlled phase gate with control wire and target wire . On a computational-basis state, every unprocessed control is still the bit , so wire becomes
Once a wire has been processed it is not touched by later stages. Reversing the order of the output wires gives exactly the Fourier product above. Agreement on every computational-basis state proves agreement as linear operators on all superpositions, even though the intermediate operation on a general input can create entanglement.
There are Hadamard gates and controlled phase gates. Output reversal may be treated as wire relabelling. If it must instead be implemented physically while using only the requested gate family, use swap operators. Each swap is three controlled-NOT gates, and
Thus the swaps use only Hadamard gates and Controlled-Z gates, which are controlled gates. An exact physical network has
elementary gates from the stated family. This implements the positive-exponent Fourier transform with the correct output order in quadratic size. Omitting the output reversal without relabelling the wires would produce the reversed-order transform instead.
For the perturbation bound, the operator norm in the source is equivalently . It satisfies the triangle inequality, is unchanged by left or right multiplication by a unitary operator, and a unitary operator has norm one. The exact telescoping identity is
It follows by replacing one factor at a time; alternatively all intermediate products cancel in the sum. Taking the operator norm and using unitary invariance gives the quantum circuit gate-error telescoping bound
The original PDF assumes strict , so its strict conclusion is justified. If the hypothesis were weakened to a non-strict inequality, the conclusion would likewise be . The TeX aid misreads this hypothesis; the PDF resolves it.
Apply the non-strict version to each approximate unitary gate in the Fourier network. Extending a gate by the identity on other wires leaves its operator norm error unchanged. Including the physical swap decompositions, all gates are of the required type and can obey the stated accuracy. Hence
With exact output relabelling rather than physical swaps the numerator is just . The proof retains gate phases and makes no assumption of cancellation between coherent errors.
For every normalized input the output-state norm error is at most this same bound. If is any positive operator satisfying , the change in its measurement in quantum mechanics outcome probability is at most , where : expand the difference of the two expectations into two terms, each bounded by using the Cauchy-Schwarz inequality. Thus inverse-polynomial gate accuracy gives an inverse-polynomial total error, rather than requiring exponential precision in the number of qubits. For the phase gates this corresponds to specifying angles with bits of precision, since . This is a robustness statement for unitary gate approximations; it does not by itself correct quantum decoherence, correlated stochastic faults, or limitations of hardware connectivity.
Since and , the diagonal Hamiltonian is
with the identity on every unlisted qubit. Each computational-basis state is an eigenstate, and its eigenvalue is minus the cost of the corresponding cut. Part i supplies cost four, while the assumed bound rules out a lower energy. Thus the ground-state energy is . For the assignment , one ground state is
Its bitwise complement is another ground state, as are the basis states corresponding to the other maximum cuts.
Quantum superposition Created 2026-10-07 Updated 2026-10-14
A quantum superposition is a linear combination of quantum state vectors in a complex Hilbert space. In a specified orthonormal basis, a normalized pure state has the displayed expansion, where are probability amplitudes. A nonzero linear combination can always be normalized; an arbitrary sum of normalized vectors need not already have norm one. Having more than one nonzero component depends on the chosen basis: the Hadamard basis vector is a quantum superposition of the two computational-basis states, but is a single vector of the Hadamard basis. [ref].
The distinction from classical ignorance is quantitative. Consider the normalized qubit quantum state
Its density operator, written in the computational basis, is
Preparing with probability and with probability , while discarding the preparation label, instead gives the mixed state
The diagonal entries agree, so both preparations give the same computational-basis measurement probabilities. The off-diagonal entries of retain quantum coherence and the relative quantum phase. In the Hadamard basis, the Born rule gives
The density matrix representation retains this distinction between a pure state and a mixed state. [ref].
For example, at , the quantum superposition yields the plus outcome with probability about , whereas the mixed state yields it with probability . At these particular probabilities agree, although the density matrices still differ: equality for one measurement does not establish equality of quantum states. The probability amplitude figure shows the comparison throughout a full cycle of relative quantum phase.
This is why a quantum superposition is useful: quantum gates act linearly on its probability amplitudes, and unitary operators preserve the full pure state information, including relative quantum phases. A Hadamard gate can turn otherwise hidden quantum coherence into different outcome probabilities. The beautiful feature is that the same basis weights can support different predictions when amplitudes recombine. The expansion specifies a preparation and its measurement predictions; it does not assign every unmeasured outcome a simultaneous classical value. See projective measurement for the separate question of the conditional state after a measurement.
The inversion about the mean for four computational-basis states can be implemented using Hadamard gates, Pauli X gates and one controlled-NOT gate, up to global phase. Let and . Since , one has and therefore . This gives an exact quantum circuit representative of the four-entry Grover search algorithm diffusion step modulo its irrelevant overall minus sign.
Uniform quantum superposition Created 2026-09-29 Updated 2026-11-05
A uniform quantum superposition assigns the same probability amplitude to each computational-basis state. For qubits, there are such states.
The uniform quantum superposition of all -bit strings is
The factor follows from normalization: squared amplitudes must sum to one. This state is the product state , so a large number of nonzero basis amplitudes does not by itself imply entanglement. A computational-basis measurement returns one string with probability ; it does not reveal all amplitudes. [ref]