Ancilla bit 2026-10-14
An ancilla bit is an auxiliary bit providing workspace in reversible computation. In a quantum circuit, an ancilla qubit provides quantum workspace; a general quantum ancilla need not be a single bit.
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.
The Bernstein-Vazirani algorithm identifies the coefficient string of a linear Boolean function with one Boolean quantum oracle call. It contrasts with the calls required by the classical query complexity of linear Boolean function identification. Prepare the data qubits at and an ancilla qubit at , apply a Hadamard gate to every wire, query the function oracle, and apply the Hadamard gates again. The full output is .
The mechanism is Bernstein-Vazirani phase kickback. The Pauli X gate has eigenvector with eigenvalue . Thus the target flips become relative quantum phases on the data, giving
The final Hadamard transform maps this product to , so computational-basis measurement recovers every coefficient with certainty. The ancilla preparation for the Bernstein-Vazirani algorithm ensures the required minus sign, and the Hadamard-conjugated linear oracle gives an exact quantum circuit interpretation. One query is optimal for , since without a query the output cannot depend on the unknown string.
BQP 2026-10-06
BQP is the class of promise problems decided by uniform polynomial-size quantum circuits with bounded error. Completeness and soundness are conventional; BQP error reduction shows that other fixed separated thresholds give the same class.
Suppose a known list of distinct -bit strings is available and computational basis transpositions on qubits have polynomial-size implementations. Start with the uniform superposition state of index labels , leaving the data zero. First swap with for each nonzero . Next, for each , swap with . Distinct index labels separate the first-stage pairs, and distinct data strings separate the second-stage pairs. Thus no later transposition disturbs an earlier term. At most transpositions prepare the uniform data state and return the quantum ancilla to zero. For the quantum circuit has polynomial size. This assumes the list is available; a membership predicate alone does not supply it.
Expand a quantum circuit matrix element by inserting computational basis resolutions between gates, then enumerate the intermediate strings depth first. The active stack stores one basis label and accumulator per quantum circuit layer, using polynomial space for polynomially many qubits and gates. Recompute entries rather than storing an exponential matrix or state vector. The output probability requires the Born rule sum of squared amplitude moduli.
The least worst-case number of input-oracle calls made by a quantum circuit that computes a Boolean function with zero error on every input. Known unitary gates and classical processing do not count toward this quantity; their runtime is a separate cost.
A Feynman-Kitaev Hamiltonian penalizes incorrect input initialization, disagreement between successive quantum circuit steps and clock labels, and optionally a rejecting output. Its propagation quadratic form is a sum of . Without output penalty, its zero-energy space consists of correctly initialized computational history states. A nonlocal quantum clock makes the propagation formula simple but does not supply fixed qubit locality by itself.
After undoing quantum circuit propagation, the Hamiltonian without output penalty is . The common kernel is the valid input space times the uniform clock vector. On its orthogonal complement, the smallest angle between two subspaces obeys . The Kitaev geometrical lemma and path gap give . Degenerate valid quantum witnesses must be removed together when computing this angle.
Hadamard gate Created 2026-09-24 Updated 2026-10-20
The Hadamard gate is the unitary operator
where is the identity operator. It maps the computational basis to the Hadamard basis:
These outputs have equal computational-basis measurement probabilities, but their relative quantum phase differs. Applying another Hadamard gate sends them to different definite outputs. Calling this gate a classical coin toss would discard precisely the information that makes this possible. [ref].
Starting from , compare two quantum circuits, reading matrix products from right to left:
Here is the Pauli Z gate. After the first Hadamard gate, the probability amplitudes are . Inserting changes them to without changing their squared magnitudes. At the final gate, the contributions to output zero cancel and those to output one add. Without , cancellation occurs at output one instead. This is controlled interference, with the quantum phase determining which answer emerges.
The same calculation works for any phase gate :
For example, gives , while gives . The output-one amplitude at is : its two complex contributions add before the Born rule is applied. A phase gate alone leaves the populations unchanged; recombination converts its relative quantum phase into observable probabilities.
Figure 1.
Hadamard interference: a relative phase changes output probabilities through complex amplitude addition; the dotted circle traces the output-one amplitude as the phase varies
. Details.
If quantum decoherence completely removes the computational basis coherence between the gates, the intermediate density matrix becomes . Both the phase gate and final Hadamard gate leave unchanged, so for every . The disappearing fringe explains why preserving quantum coherence matters: it enables the gate sequence to carry phase information into the final measurement.
Hamiltonian simulation 2026-09-25
Hamiltonian simulation constructs a quantum circuit approximating the time-evolution operator generated by a Hamiltonian operator , with cost controlled by the evolution time, requested precision, and structure of .
Nonlocal quantum clock 2026-10-06
A nonlocal quantum clock records quantum circuit time in an abstract dimensional register. A binary encoding uses logarithmically many qubits, but transitions need not have bounded qubit locality. Extra diagonal penalties may exclude unused binary labels. A unary quantum clock provides a different encoding for fixed-locality constructions.
No-programming theorem Created 2026-09-24 Updated 2026-10-14
A deterministic finite-dimensional universal programmable quantum gate cannot implement every unitary exactly: programs for physically distinct unitaries would have to be mutually orthogonal, but a finite-dimensional program register contains only finitely many mutually orthogonal states.
This is a restriction on programmable quantum circuits and their unitary operators, rather than a statement about the existence of classical program descriptions.
The largest pure-state norm distance between outputs of two unitary operators on the same normalized input. By definition of the operator norm, it is . If it is at most , every input is approximated to that accuracy. A version disregarding the operation's global phase minimizes over one common . Error in a finite quantum circuit accumulates at most additively by the quantum circuit gate-error telescoping bound.
Opposite-pair elimination for exact quantum balance testing Created 2026-10-07 Updated 2026-10-14
For an even-length Boolean string, one phase query followed by a known unitary extension can produce a zero-pair outcome with amplitude proportional to the zero-minus-one imbalance, or an index pair with amplitude proportional to the difference of their phase signs. A zero-pair observation certifies nonbalance. Every nonzero pair has opposite bits, so deleting it preserves the imbalance and allows recursion on two fewer indices. Ending with an empty list certifies balance. This quantum circuit is exact on all inputs and uses at most half the original length in queries, even without the constant-or-balanced promise.
The gate set is not universal. The displayed two-qubit matrix is the SWAP gate:
Both and the Hadamard gate act on one qubit. Thus every gate preserves a fully factored product state, and induction gives the same property for every quantum circuit built from them. This is the product-state obstruction to SWAP universality.
For a quantitative obstruction to even approximate universality, every two-qubit product state has squared overlap at most with a Bell state. Indeed, for normalized coefficient vectors ,
by the Cauchy-Schwarz inequality. A controlled-NOT gate acting on would instead produce that Bell state, so these circuits cannot approximate all unitary transformations. The fact that supplies a T gate up to global phase does not supply an entangling gate.
Apply one Hadamard gate to each of the qubits, with all gates acting in parallel. This quantum circuit implements the tensor product ; it needs single-qubit gates and one layer. For one qubit,
Taking the tensor product of these expressions multiplies the probability amplitudes and adds their exponents, giving
Here the dot product is evaluated using modular arithmetic modulo two.
Figure 1.
The Hadamard transform applies one Hadamard gate to each qubit in a parallel layer
. Details.
In particular, an initially zero quantum register becomes the uniform quantum superposition
This is useful at the start of a quantum algorithm because a subsequent quantum oracle acts on all these components coherently. Later quantum interference can reveal a global property of the function. Measuring immediately would merely produce a uniformly random binary string; the useful resource is the preserved quantum coherence, rather than the ability to read every function value in one run.
A universal quantum gate set can implement any unitary operator on any finite number of qubits, exactly when arbitrary continuous gate parameters are allowed, or to arbitrary accuracy with a suitable finite gate alphabet. More precisely, for every target and there is a finite quantum circuit with in operator norm. This ignores only an overall global phase of the complete operation. Universality lets a fixed collection of controllable elementary operations run arbitrary quantum algorithms rather than requiring a different physical interaction for each algorithm.
All single-qubit unitary gates, together with the controlled-NOT gate between selectable pairs, form an exact universal quantum gate set. One way to see sufficiency is to eliminate entries of a finite unitary matrix by two-level rotations between computational basis vectors; these rotations decompose into controlled single-qubit rotations, which in turn decompose into single-qubit gates and controlled-NOT gates. Single-qubit gates alone preserve product states and cannot supply general quantum entanglement. A finite approximate universal example is the Hadamard gate, the T gate , and the controlled-NOT gate; finite exact words over a finite alphabet cannot represent every continuously parameterized unitary operator exactly.
Distinguish the Hamiltonian operator from the Hadamard gate . For the printed collisional phase gate,
As written, has units of energy. The Schrödinger equation gives
because only has a nonzero energy eigenvalue. In the ordered computational basis , define
If an interaction strength is instead quoted as an angular frequency , the Hamiltonian operator is and . An alternative definition with would have . The minus sign above follows the usual time-evolution operator convention. At these conventions give the same .
For the quantum circuit, use on the first qubit to move the selective minus sign from to :
Conjugating the target of this Controlled-Z gate by the Hadamard gate gives the required controlled-NOT gate:
The rightmost matrix acts first. Thus the network applies , then , then , and maps to , where is exclusive or.
Figure 1.
Controlled-NOT from the printed collisional phase gate
. Time runs from left to right. Pauli X gates act on the first wire and Hadamard gates on the second, before and after the selective phase gate. The phase gate changes the sign of 01 only. Details.
For one input bit, a Boolean function is specified by the pair , and counts its satisfying assignments. In the ordered computational basis , the supplied phase oracle convention gives
Here is exclusive or: the oracle changes the sign of the inputs with . With the identity matrix and the Pauli Z gate, all four cases are
The two middle cases are balanced Boolean functions; the others are constant functions. The specified zero-state sign change and the Hadamard gate are
Use the top qubit as the first tensor product factor. Write the controlled unitary gate as . Reading the bracketed quantum circuit from left to right, its four operations are , , , . Thus the target operation in its control-one branch is
where the rightmost matrix acts first. The control-zero branch is the identity operator. The Hadamard conjugation of a controlled gate identity gives
Indeed, on control zero the replacement applies to the target, while on control one both sides apply . By linearity, the identity holds on every quantum superposition and therefore in every repetition of the bracket. This replaces the two internal controlled Hadamard gates as a pair.
The global phase of a controlled quantum gate must be preserved: , whereas . Consequently the minus signs in and the special phase oracles cannot be discarded as an unobservable global phase of the complete quantum circuit.
Let and be normalized qubit states. By linearity, the SWAP gate gives
The output remains a product state. Single-qubit unitary operators also preserve product states, so an induction over any quantum circuit made from these operations shows that it cannot create quantum entanglement from a product state. Equivalently, moves every exchange through the local operations, leaving only local gates and a permutation of wires. This is the product-state obstruction to SWAP universality.
Consequently SWAP gates and arbitrary single-qubit gates do not form a universal quantum gate set. For example, they cannot map to the Bell state , whereas a Hadamard gate followed by a CNOT gate does so.