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.
Ancilla qubit 2026-10-14
An ancilla qubit is a two-dimensional quantum ancilla. It is the quantum version of an ancilla bit; an auxiliary quantum register can contain several such qubits.
BQP error reduction 2026-10-06
Independent runs of a BQP algorithm with fresh ancilla qubits can be combined by a classical threshold rule. If completeness exceeds soundness by , a Hoeffding inequality bounds the error after runs by . Polynomial repetition handles inverse-polynomial gaps. This does not automatically preserve the restricted gate and measurement rules of a stoquastic circuit.
Input penalty of a history Hamiltonian 2026-10-06
The input penalty of a history Hamiltonian tests the prescribed ancilla qubits at clock time zero and leaves the quantum witness unrestricted. Zero ancilla qubits are tested by , and plus ancilla qubits by . Their sum is positive and has positive integer eigenvalues. Together with propagation, its kernel selects histories of valid initial data.
Local-energy measurement verification 2026-10-06
Uniformly sample one positive local term and measure the effect . The averaged energy-flag effect on a witness is , where is the number of terms. Repetition with a threshold halfway between the promised flag probabilities uses witness registers for constant error. A spectral tensor-product analysis, as in QMA parallel repetition with entangled witnesses, proves soundness against entangled witnesses. Constant-locality positive operator-valued measures are efficiently implementable using one ancilla qubit.
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 2005 iii Paper 58 3 i Solution Created 2026-10-03 Updated 2026-10-14
Number the physical wires from top to bottom and write a computational basis ket in that order. The first four are ancilla qubits and the fifth carries the input. It is enough to follow the basis input , , because the encoding quantum circuit acts linearly.
The first fan-out consists of four controlled-NOT gates from wire 5 to wires 1–4. It sends to . The three Hadamard gates then giveThe two Pauli X gates on wires 2 and 3, followed by a Controlled-Z gate and the same two X gates, restore the bits but contribute : the sign is negative exactly when the original bits on both wires were zero. Finally, the right-hand controlled-NOT gates are , , and . They leave the first three bits unchanged and turn the last two into and . ThusExplicitly, the logical basis quantum states produced by the printed gates areEach has eight orthogonal terms of equal magnitude, and their supports are disjoint, so they are normalized and mutually orthogonal. The arbitrary input is therefore encoded asThis is a realization of the five-qubit error correcting code. The input amplitudes and their relative quantum phase are preserved in the logical subspace; the encoding is an entangled-state linear isometry, not five independent copies of the unknown input. The explicit signs and bit ordering above are fixed by this circuit, rather than by a convention for a different encoder.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 4 b iii Solution Created 2026-10-03 Updated 2026-10-07
The product of the data Pauli Z gates has computational-basis eigenvalueUse the parity circuit from part (ii), apply the target unitary gate , and then uncompute the parity with . For every basis input,This equals on the data, with the ancilla qubit returned to zero. The compute-phase-uncompute construction therefore gives an exact linear-size circuit:This is a Pauli-string phase by parity computation, an instance of simulation of a computable diagonal Hamiltonian. Part (i) also explains it by , whose exponential restricts correctly to the target- subspace. If no extra line is desired, accumulate parity into the last data qubit, apply there, and undo the CNOT gates, for gates. Both constructions implement the global phase as well as the relative phases exactly.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 4 b ii Solution Created 2026-10-03 Updated 2026-10-07
Use one target ancilla qubit initially in . Apply a CNOT gate from each data qubit to that same target, for . Each CNOT gate adds its control bit modulo two without changing the control. After all gates the target contains the parity bit . Thus the required circuit is the -gate parity fan-in:This is parity computation by CNOT gates. The circuit also satisfies for either target value, and because all these shared-target CNOT gates commute and individually square to the identity. The action on general superpositions follows by linearity.
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 2014 iii Paper 61 2 iii Solution Created 2026-10-03 Updated 2026-10-06
Prepare the two data qubits in and a phase ancilla qubit in . A single Boolean quantum oracle query flips only the marked amplitude. Its success fraction is , so in amplitude amplification. The fixed diffusion reflection gives after one iteration.
Directly, after the query the marked amplitude is and the other three are . Their mean is . The diffusion reflection replaces each amplitude by , yielding one at the marked input and zero elsewhere. ThusHere is understood with its target ancilla qubit, and acts only on the data. It is independent of : , with the central diagonal gate implementable using two Pauli Z gates and one Controlled-Z gate. Measuring the data in the computational basis therefore finds the unique marked string with certainty after one oracle query.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 61 2 ii Solution Created 2026-10-03 Updated 2026-10-06
Let be the orthogonal projection onto the good vector subspace , and let the normalized input be . Set with , and defineAssuming coherent access to the two reflections, the amplitude amplification theorem states thatpreserves the plane spanned by and acts as a rotation, givingHence the good-outcome probability is . When is known, choose the nearest nonnegative integer to . The resulting angle is within of , so the good probability is at least . For small this is close to one and requires iterations. Exact success occurs when . Known also allows exact amplitude amplification by ancilla qubit dilution or selective phase adjustment when ordinary integer iterations would overshoot.
If has a known coherent preparation, its reflection is implemented with , and a zero-state phase flip. A coherent membership test supplies the reflection about . Merely possessing an unknown copy of does not automatically supply its reflection. For the state is already good; for this two-reflection construction cannot generate a good component. These cases delimit the theorem's algorithmic assumptions.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 61 3 iii Solution Created 2026-10-03 Updated 2026-10-06
The binary phase is . ThereforeOn the phase register, apply the tensor product of phase gatesIts action on is multiplication by . Thus the positive-phase fractional power of a unitary operator is implemented by uncomputation after coherent phase estimation:HenceThe inverse phase-estimation circuit uses controlled powers of built from the supplied inverse oracle, with all other quantum gates reversed. No phase-register measurement is made, so arbitrary superpositions are preserved and the ancilla qubits return to zero. The straightforward implementation uses controlled-unitary queries plus the Fourier and phase circuitry; the arbitrary phase gates are accepted exactly as stipulated.
The branch convention matters. This construction uses the phase representative specified here, corresponding to argument in . It implements that explicitly defined root, even for . The usual complex principal branch with argument in would choose a different root on some eigenvalues. No substitution of that alternative branch is implicit.
