A quantum computing apparatus needs a scalable quantum register of controllable qubits, reproducible initialization, a universal quantum gate set, sufficiently long quantum coherence, and selective readout. A qubit is a two-dimensional state space; several qubits occupy a tensor product space and can develop entanglement. Quantum state preparation must establish a known low-entropy input and supply fresh ancillas during quantum error correction. A universal quantum gate set may use arbitrary single-qubit rotations with an entangling two-qubit gate such as controlled-NOT gate. Quantum coherence and control fidelity must suffice for the intended circuit, and measurement must recover chosen output probabilities without uncontrolled disturbance of other qubits. These are the five DiVincenzo criteria.[ref]
The Physical Implementation of Quantum Computation by David P. DiVincenzo. Section III, requirements 1–5
An atomic implementation can encode qubits in two long-lived internal levels, initialize them by optical pumping, drive coherent transitions with laser or microwave pulses, couple selected qubits through a shared interaction, and distinguish states by state-dependent fluorescence. For trapped ions, a shared vibrational mode can mediate entangling gates, so motional control and cooling are part of the computational apparatus. The motion is a resource only while uncontrolled heating does not erase the required quantum coherence.
The computational resource is coherent control of amplitudes and entanglement, with interference making useful outcomes likely. An -qubit pure state has basis amplitudes, but a single measurement does not reveal those amplitudes or all possible answers. Algorithms exploit structure rather than simply reading out parallel classical computations. The Shor algorithm gives factoring with polynomial resource scaling in the input bit length, compared with the best known classical algorithms' superpolynomial scaling; an exponential classical lower bound has not been proved.[ref]
Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer by Peter W. Shor. Abstract, polynomial running time in the number of input digits
Grover's algorithm uses order oracle queries for unstructured search among possibilities, a quadratic query improvement.[ref]A fast quantum mechanical algorithm for database search by Lov Grover. Abstract and algorithmic query scaling
Quantum simulation is a further motivation because interacting quantum systems can require exponentially many classical amplitudes for a direct generic representation.The main challenges are quantum decoherence, fluctuating control fields, imperfect gates, leakage out of the qubit subspace, readout errors, crosstalk, and the difficulty of scaling connectivity and calibration. Faster control can introduce extra errors, while stronger isolation can make preparation and readout harder. Quantum error correction encodes logical information redundantly in several physical qubits and extracts error syndromes without measuring the unknown logical state itself. Fault-tolerant quantum computation prevents the correction apparatus and gates from spreading a few faults into uncorrectable logical errors. It requires error rates below an architecture- and noise-dependent threshold and substantial resources; there is no universal numerical threshold for all implementations. Advantages are task-dependent, while reliable scaling requires both coherent hardware and error control.
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, givingHere the dot product is evaluated using modular arithmetic modulo two.
In particular, an initially zero quantum register becomes the uniform quantum superpositionThis 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.
Write for bitwise exclusive or. Both quantum registers begin in . After the first Hadamard transform their joint quantum state isThe quantum oracle maps each component to . By linearity, the required quantum state is thereforeThe 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.
An observed value must lie in the image of . Choose either preimage . The two-to-one function promise and imply that its preimages are exactly and . A computational-basis measurement of the second quantum register projects the joint quantum state onto the unnormalized vectorBy the Born rule, . Dividing by its square root gives the conditional first-register pure stateChoosing the other preimage merely interchanges the two summands. The result is a Simon coset state, retaining quantum coherence between the two inputs that share the measured function value. Outcomes outside the image have probability zero and hence no conditional state to normalize.
Apply the Hadamard transform to the conditional quantum state from c. Since modulo two, its output isIf , the two probability amplitudes cancel by destructive quantum interference. If , they add, givingThus every observed string obeys . This Simon Fourier sampling is uniform on the -dimensional vector subspace over the two-element field. Indeed, the nonzero linear functional has a kernel of dimension by the rank-nullity theorem. The distribution does not depend on , so measuring or discarding the second quantum register gives the same statistics for the first.
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 2012 iii Paper 67 1 a Solution Created 2026-10-03 Updated 2026-10-07
Cyclic periodicity on implies that the least positive period divides : the shifts preserving the function form a subgroup of the cyclic group. Injectivity within one period says that distinct residue classes modulo have distinct function values. Write .
Prepare the uniform superposition state by applying the quantum Fourier transform to , and evaluate reversibly into a second quantum register. This is efficient because the given classical Boolean circuit can be converted into a reversible circuit, with its workspace cleaned by uncomputation. The resulting quantum state isMeasuring the function quantum register leaves a uniform coset state for some . The amplitude at after a quantum Fourier transform isThe finite geometric series is zero unless is a multiple of , and then equals . Thus a computational-basis measurement produces a uniform Fourier sampleThe exact period recovery from a Fourier sample computesA greatest common divisor is computable in time polynomial in . The candidate is always a divisor of the true period, and equals it precisely when is coprime to .
For the success flag, compute and compare with . If , injectivity within the first period makes these unequal. If , periodicity makes them equal, including . Hence accept and output exactly when this comparison succeeds; otherwise report failure. This is heralded exact quantum period finding when the period divides the register size, with no false acceptance. The case succeeds even on the sample .
The exact success probability iswhere is the Euler totient function. For , the prime-product formula gives . A Rosser–Schoenfeld totient bound supplies the needed lower bound for large . Every single attempt, including verification, has the assumed polynomial-in- gate cost. Repeating times gives constant success probability with a certified result whenever one is found.
The printed in the totient hint should be a lower-bound statement, . Literally, is false: at primes , . Likewise the exact single-sample success probability need not be ; for prime period it tends to one. The useful intended guarantee is the displayed inverse-log-log lower bound, not a universal upper bound. If an algorithm satisfying the literal success upper bound is desired, one can additionally accept an otherwise certified run only when independent fair bits are all zero. This retains a detectable failure flag and polynomial runtime, and has success at most , but deliberately weakens the useful guarantee. The standard unsuppressed algorithm above gives the stronger intended performance. Small can be handled directly. Primary evidence for the totient lower bound is Theorem 15, equations (3.41)–(3.42), in denisevellachemla.eu/Rosser-Schoenfeld-1962.pdf .
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 67 4 a Solution Created 2026-10-03 Updated 2026-10-07
Put and prepare control qubits in and the target in the supplied eigenstate . Apply a Hadamard gate to every control qubit. Let denote the integer encoded in that quantum register.
For every , apply a controlled unitary gate with control and the same target. The quantum phase kickback yieldsApplying to the controls therefore produces exactly. A computational-basis measurement returns with certainty, and the algorithm outputsThis is exact quantum phase estimation; exactness uses the finite dyadic phase promise, not a rounding argument.
Only a controlled-U gate is supplied as a primitive. Its repetitions implement controlled-, so the total number of black-box uses is . Access to powers as unit-cost primitives would be a different quantum query complexity model. This distinction is the cost of exact phase estimation on a dyadic spectrum.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 67 4 b Solution Created 2026-10-03 Updated 2026-10-14
The quantum circuit has one control wire per binary digit and one target quantum register. Every control starts in , receives a Hadamard gate, controls the corresponding power , and then enters the collective inverse quantum Fourier transform. Only the control register is measured; the target stays in .
Exact dyadic phase-estimation circuit with controlled powers, inverse Fourier transform, and little-endian output bits
. Details. The omitted intermediate wires continue the pattern . The inverse quantum Fourier transform black box is defined on the integer basis with , so the displayed ordering introduces no hidden bit reversal. The measured bits satisfyEach controlled power box represents sequential controlled- uses when only that primitive is available.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 323 1 ii Solution Created 2026-10-03 Updated 2026-10-06
Write and for the classical quantum registers and . By the quantum mutual information formula , expanding the right-hand side of the quantum mutual information balance identity givesAll Von Neumann entropies here are evaluated in .
We use three facts: quantum mutual information is nonnegative by nonnegativity of quantum relative entropy; a local quantum channel cannot increase it by data processing for quantum mutual information; and the quantum mutual information of a classical-quantum state is its ensemble's Holevo quantity. Write for the Holevo capacity, the supremum of the output Holevo quantity over finite input ensembles.
The marginal is an output ensemble for , with inputs . Consequently . Also is obtained from by a quantum channel on which retains and prepares from . HenceTo bound the latter even for entangled states , exhibit the conditional input ensemble after a local measurement. Setwhen ; zero-weight outcomes can be omitted. The numerator is a positive operator, its trace is , and the sum to one. ThusThis is a classical-quantum state with an output ensemble for , so . Combining these bounds with yieldsThe last step takes the supremum over all input ensembles on . The left-hand channel direction is , as established in part (i); the printed in the last inequality is a typographical reversal. Independent product ensembles also give the reverse inequality, so this proves Holevo-capacity additivity for entanglement-breaking channels.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 1 a Solution Created 2026-10-03 Updated 2026-10-06
Use the positive-exponent quantum Fourier transform convention . The period of a function here is the least positive translation leaving the function unchanged on the cyclic group . The injective promise means exactly when . In particular : the subgroup of period translations is generated by , and wrapping the argument by preserves its value. This is exact quantum period finding on a finite cyclic group, rather than the truncated, nondividing-period version requiring continued fractions.
Prepare a uniform superposition state in the first quantum register using , and perform a reversible computation of the function into a second quantum register, cleaning its workspace by uncomputation:A quantum measurement in the computational basis of the second quantum register leaves a periodic coset state in the first:For the quantum Fourier transform of this periodic coset state, the finite geometric series vanishes unless the measured label is . On those labels its normalized amplitude is . Thus has the uniform distribution on a finite set on , irrespective of .
Compute the greatest common divisor by the Euclidean algorithm, and set , with . Since ,The exact period recovery from a Fourier sample is therefore certified by testing . Every candidate divides and lies between and , so the injective promise makes that equality equivalent to . This includes , where the test uses input , and , which always succeeds. The test does not assert that an arbitrary equality of function values certifies an arbitrary period; the Fourier-derived divisor restriction is essential.
The concise result isHere is the Euler totient function, with . The totient lower bound from the Mertens product gives for . Each trial uses polynomial time quantum Fourier transforms, function evaluations and Euclidean algorithm arithmetic in . Repeating independent trials gives constant success probability; the herald accepts only correct answers.
The printed asymptotic bound has the wrong direction for this argument. In Big O notation, the stated upper bound on the number of coprime integers supplies no success lower bound and is itself false uniformly: for prime , , not . Likewise the single-trial success need not be , since it tends to one for prime. The meaningful corrected guarantee is the lower bound above. If an upper-bounded success rate is literally required, one may deliberately retain an accepted result with an independent probability proportional to ; this discards useful successes and is unnecessary for efficient recovery.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 1 b iii Solution Created 2026-10-03 Updated 2026-10-06
Apply the same positive-exponent quantum Fourier transform to each of the two quantum registers. The amplitude at of the coset state isThe finite geometric series is when and zero otherwise. ThereforeThere are allowed pairs, with following the uniform distribution on a finite set. The factor changes the probability amplitudes by phases depending on the output label , but has no effect on their probabilities. Using an inverse rather than forward quantum Fourier transform on both quantum registers gives the same support relation.
A modular inverse of exists precisely when . In that case the discrete logarithm isIt cannot generally be determined from every allowed pair. Put . The supported linear congruence has solutions modulo , and determines only modulo ; gives no information when . For instance and are compatible with both and . One may verify a candidate by modular exponentiation, checking . Repeated discrete-logarithm Fourier sampling finds an invertible with per-trial probability , which has the same totient lower bound from the Mertens product as before. When , the group is trivial and are determined without Fourier samples.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 1 b ii Solution Created 2026-10-03 Updated 2026-10-06
Let be the unique discrete logarithm of the measured value , so that . The fiber calculation gives exactly the pairs with , where . The initial amplitude of each pair is , so the Born rule assigns probability to this outcome.
After projective measurement and normalization, the first two quantum registers are in the coset stateThe measured third quantum register factors as and may be omitted. There is no loss of coherence between the terms in this post-measurement state: the quantum measurement reveals the common function value, not an individual input pair.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 2 b Solution Created 2026-10-03 Updated 2026-10-06
Interpret a function collision as two distinct inputs with equal outputs. Without distinctness the request is vacuous, since an input paired with itself always qualifies. Set (handling small by direct queries), choose a known set of size , and query all its inputs. Store a classical table of their outputs and corresponding inputs. If this table contains a function collision, return it immediately.
Otherwise the table contains distinct outputs. Because is exactly two-to-one, each has exactly one partner in , the known complement of . None lies in , and different table outputs have different partners. Thus exactly inputs in , of size , satisfy the known-table membership predicateBuild a marked-state phase oracle for this predicate by a compute-phase-uncompute construction: use on a clean answer quantum register, reversibly compare its output against the classical table, apply the conditional minus sign, undo the comparison, and apply again. Since the answer operation is bitwise exclusive or, . All workspace returns to zero, and each phase query costs two calls to .
Perform known-subset Grover search in the span of the computational basis states labelled by , starting in their uniform superposition state. Reflection about this known state uses no queries; choosing as an initial interval makes a known interval that can also be encoded by its own labels. Its marked fraction is , so the previous Grover rotation angle analysis uses phase queries. On measuring , one further query checks the output and retrieves its partner from the table. The inputs are distinct because the two sets are disjoint.
Consequently the quantum query complexity isFor large , rounding the optimal Grover search algorithm iteration count gives success at least . An internal table function collision already gives certain success. The balance explains the cube-root choice. This is the Brassard–Høyer–Tapp collision algorithm: its table uses classical bits. The bound counts calls to , as requested; it does not charge table lookup and its reversible implementation as constant-time gates, or claim an overall polynomial time in .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 3 a Solution Created 2026-10-03 Updated 2026-10-14
Use exact quantum phase estimation with control qubits initially and one target quantum register prepared in the given eigenvector . Apply Hadamard gates to the control qubits. If control bit has significance , apply a controlled unitary gate from that qubit to the target. The target stays in , while quantum phase kickback producesSince , this is . The inverse quantum Fourier transform on the control quantum register therefore gives . The quantum measurement in the computational basis returns with certainty, soThe quantum circuit below reads left to right. The upper wires are control qubits, with least significant; the vertical ellipsis represents the intervening control wires and powers. The inverse quantum Fourier transform acts on the entire control quantum register, including any bit-order permutations.
Quantum phase estimation and spectral filtering
. Details. A supplied controlled- can implement controlled- by repetitions with the same control. Hence this exact quantum circuit uses calls to the supplied controlled-, unless controlled powers are additionally available cheaply. The cost of exact phase estimation on a dyadic spectrum is not automatically polynomial in ; the question asks for an exact algorithm, not that stronger complexity guarantee. Exactness also uses the promised dyadic eigenphase, ideal gates, and the supplied inverse quantum Fourier transform.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 3 b ii Solution Created 2026-10-03 Updated 2026-10-06
Apply to the data and phase quantum registers, leaving the flag quantum ancilla untouched. This inverse needs no extra oracle assumption: the promised dyadic eigenvalues give , hence . The inverse of each controlled unitary gate used in can therefore be built from repeated uses of the supplied controlled-, and the known Hadamard gates and quantum Fourier transform gates can be reversed. Uncomputation is necessary to erase the eigenvalue label coherently. The resulting quantum state isA quantum measurement in the computational basis of the flag followed by postselection on one yieldsThis requires . For a normalized input and nonnegative eigenvalues, the success probability of positive quantum spectral filtering satisfies . In the general inequality, equality holds precisely when the input is supported on the minimum-eigenvalue eigenspace. Omitting uncomputation and discarding the phase quantum register would instead leave a mixed state with diagonal weights proportional to , rather than the desired coherent pure state.
The printed universal nonzero-success request needs a nonkernel-input hypothesis. An -qubit Hermitian operator has eigenvalues, counted with multiplicity. All are distinct, and the printed dyadic grid contains exactly possible values. They therefore occupy the entire grid, including zero: this is a multiplicity-free complete dyadic spectrum, and . Taking , , and satisfies every printed spectral promise but gives . No normalized output vector exists, so no algorithm can deliver it with nonzero probability.
For every input outside the kernel, the procedure above has , giving the requested strict bound on the meaningful domain. The corrected result is therefore exact quantum spectral filtering conditional on , with the boxed probability. This does not require knowing the input probability amplitudes or making extra copies of an unknown quantum state. Arbitrarily small nonzero support outside the kernel gives arbitrarily small success probability, and a failed flag measurement disturbs the input; fresh independent trials cannot be assumed when only one unknown physical input is supplied.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 324 3 b i Solution Created 2026-10-03 Updated 2026-10-06
Let denote the coherent exact quantum phase estimation unitary operator from the preceding part, with the data quantum register written first. For every eigenvector of ,because and lies in , with no phase-aliasing ambiguity. Apply coherently to the input quantum state and a clean quantum register; do not measure the eigenvalue label. By linearity it produces .
Append a quantum ancilla in , and use the provided quantum variable rotation with , choosing the nonnegative cosine. The resulting normalized quantum state isThe sum covers both terms; this fixes the potentially ambiguous sum placement in the abbreviated display. The orthonormal basis of eigenvectors and the unit length of each rotated quantum ancilla show that its norm is one. This is quantum spectral filtering by multiplication, not the reciprocal rotation used in the HHL algorithm.
Quantum collision finding Created 2026-10-06 Updated 2026-10-07
Given a function with an -bit output, accessed through the unitary operator , quantum collision finding asks for distinct inputs with equal outputs. Here is bitwise exclusive or on the -bit answer quantum register. The distinctness requirement excludes the uninformative pair . For a two-to-one function on inputs, Grover search algorithm methods yield a cube-root quantum query complexity, despite a square-root cost for finding a partner of just one preselected input.
Quantum oracle 2026-10-25
A quantum oracle supplies coherent access to a function through a specified unitary operator. For a function with binary string output, the standard construction retains the input and adds the output into an answer quantum register by bitwise exclusive or. This operation is its own inverse, even when the function is not injective. A Boolean quantum oracle is the single-output-bit case; Simon's algorithm uses several answer qubits. Other encodings, such as a modular-addition quantum oracle or a phase gate encoding, require their own explicit query conventions.
Simon coset state 2026-10-25
In Simon's algorithm, conditioning on a function value leaves the first quantum register in an equal coherent sum of its two preimages. This is a pure state, even though discarding the second quantum register without retaining its outcome generally leaves a mixed state. The label depends on the measured value; the period does not.



