Suppose a reversible circuit computes the angle bits in , where are known binary place values. Apply a controlled unitary gate to the target for each set angle bit. The rotations about the y-axis commute and their angles add, giving . Finally perform uncomputation of the angle and arithmetic workspace. An -bit angle needs controlled rotations and twice the reversible angle-computation cost. This preserves coherent superpositions of inputs and underlies the HHL controlled reciprocal rotation.
Controlled-unitary entangling criterion 2026-10-24
For a qubit control and finite-dimensional target with unitary operator V, the controlled unitary gate is entangling if and only if V is not scalar. If , the controlled operation is a phase gate on the control tensored with the target identity and preserves every product state.
Otherwise the spectral theorem supplies two orthonormal eigenvectors with distinct eigenvalues . Set and use product input . The two conditional target vectors and are linearly independent because their eigenbasis coefficients would otherwise require . The conditional-vector product-state criterion shows that their coherent controlled superposition is entangled. Thus even a target gate arbitrarily close to scalar can be entangling, although the resulting entanglement need not be large.
Global phase of a controlled quantum gate 2026-10-24
Multiplying a target unitary operator by changes the controlled operation by a relative quantum phase on its control-one branch. Substitution in proves the displayed identity. In particular, rather than the identity operator. Preparing the control at and applying a final Hadamard gate distinguishes from with certainty, independently of the target quantum state. The global phase of an uncontrolled quantum gate is unobservable, but a specified controlled unitary gate provides a branch relative to which that phase can be measured.
A physical unitary gate used without coherent control gives the same quantum channel for and :Interleaving any preparations, known operations and measurements preserves this equality. Equivalently, each fixed measurement branch with uses gains only the overall factor , which cancels in its probability. Thus unrestricted repeated uncontrolled uses do not determine the common phase of the eigenvalues. A supplied controlled unitary gate is a different resource: changes by a relative control phase when is replaced by . Such controlled access permits quantum phase estimation to measure that phase relative to the identity branch.
Hadamard conjugation of a controlled gate 2026-10-24
For a controlled unitary gate , Hadamard gates on the target before and after the gate produce . Proof: the control-zero branch applies , while the control-one branch applies . Linearity extends the identity to arbitrary quantum states. Since too, a pair of controlled Hadamard gates surrounding the same target operation can be replaced by ordinary target Hadamard gates. No single controlled Hadamard gate is thereby identified with an ordinary one.
By the spectral theorem, the nonscalar unitary V has orthonormal eigenvectors with distinct eigenvalues . Choose . Then is not proportional to .
On the product input , the controlled unitary gate producesIts two conditional target vectors are linearly independent, so the conditional-vector product-state criterion proves that the output is entangled. Equivalently, in the control computational basis and target eigenbasis its coefficient matrix is , whose determinant is . Thus U is an entangling gate. The excluded scalar case would only apply a phase gate to the control and could not entangle the factors; this is the controlled-unitary entangling criterion.
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 givesHere is exclusive or: the oracle changes the sign of the inputs with . With the identity matrix and the Pauli Z gate, all four cases areThe 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 iswhere the rightmost matrix acts first. The control-zero branch is the identity operator. The Hadamard conjugation of a controlled gate identity givesIndeed, 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.
Read the source network as a Hadamard test: a Hadamard gate on the first qubit, a controlled unitary gate with the first qubit as control, and another Hadamard gate on that control. Starting from , the successive quantum states areApply b to the last line. Since by unitarity,For the Pauli Z gate observable on the first qubit, the two eigenvalues are and . ThusAs a check, returns outcome zero certainly, while returns one certainly. The controlled unitary gate makes this relative phase measurable even though multiplying an isolated system's quantum state by is only a global phase.
Yes. Replace the target qubit by a register of qubits and implement the controlled unitary gateThe algebra in c uses only normalization and unitarity, so for an arbitrary pure register quantum state it still gives . For a mixed register quantum state , linearity gives . With ,Only the control qubit needs to be pure. A uniformly randomized computational basis preparation supplies the target maximally mixed state. This is the principle of trace estimation by a maximally mixed Hadamard test. The extension is algebraic; efficiently implementing controlled- still requires a known suitable gate construction. Moreover, estimating the unnormalized trace to fixed additive precision requires increasingly precise estimation of the normalized signal as grows. There is no automatic efficient reconstruction of all entries of .
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 33 5 Solution Created 2026-10-03 Updated 2026-10-14
Let be a unitary operator and suppose initially that the target is an eigenstate with , . Use control qubits, so . Hadamard gates prepare the uniform superposition . For each binary control position , apply the controlled unitary gate . The resulting state isApply the inverse quantum Fourier transform, with convention , and measure the control. The exact amplitude and probability areFor an exactly representable phase , orthogonality of roots of unity makes the outcome certain. Otherwise the finite geometric series givesThe estimate is , with phases interpreted modulo one.
To prove an error bound, choose a nearest label to on the circular grid and put in the interval . For , concavity of sine on gives , while . Therefore the nearest-integer success bound for quantum phase estimation isHere . At an exact grid point the probability is one. If two nearest labels tie, either one separately has the displayed lower bound.
For high confidence one can prove a stronger quantum phase estimation tail bound. Let be the centered distance between and , chosen with . The denominator estimate implies away from the exact-phase case. A label at circular integer distance from has , and there are at most two labels at each such distance. For , summing the tails givesOn the complementary event the circular phase error is at most . Thus, for desired bits of accuracy, take with and to obtainTaking makes the right side at most . This adds only control qubits. Efficient QFT is not by itself a guarantee of efficient controlled powers of an arbitrary : implementing them by repeated oracle calls uses calls. The modular-arithmetic application has efficient powers, as follows.
Assume and , and let be the multiplicative order of modulo . Define the unitary operator on , and extend it as the identity on unused computational-basis labels of the binary register. Coprimality makes multiplication a permutation, so this extension really is unitary. The orbit of consists of the distinct states . Its modular multiplication eigenstates areThe last relation follows by shifting the index cyclically; orthogonality follows from the finite Fourier sum. We do not need to know to prepare one of these eigenstates: the readily prepared target obeysRunning quantum phase estimation on this state produces the mixture of the eigenphase distributions, each with weight , because the target eigenstates are orthogonal. Thus it samples a uniformly random phase label and estimates with the bounds just proved. Equivalently the state before the inverse QFT is , which is obtained by quantum modular exponentiation directly.
The controlled power multiplies by , whose constant is computed by repeated squaring. Under the assumed efficient modular exponentiation, these controlled multiplications and the QFT use a number of gates polynomial in the register lengths. Taking requires only phase qubits. The nearest-label event has probability at least and yields an estimate within of . Since , continued-fraction recovery in quantum order finding then identifies the reduced fraction . The denominator is , not necessarily : when and are coprime it is the desired order, and when they are not it is only a divisor. One may test candidate denominators using modular exponentiation and repeat with fresh samples; denominators from successful samples can also be combined by a least common multiple. The probability of a nearest-label sample with coprime to is at least . These qualifications explain exactly what the phase estimate yields without falsely assuming that the unknown order or an eigenstate was available at the start.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 53 1 Solution Created 2026-10-03 Updated 2026-10-14
Write for the controlled unitary gate. For a normalized eigenvector , the first Hadamard gate and quantum phase kickback giveThe final Hadamard gate therefore produces the unentangled outputThe auxiliary system is unchanged, while its eigenphase becomes accessible through interference of the control qubit. The special unitary group assumption is not needed for this calculation; unitarity and the normalized eigenvector suffice.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 57 4 a Solution Created 2026-10-03 Updated 2026-10-14
Label the control qubits by binary weight: the bit contributes to . For each , use that qubit as the control of the supplied controlled-, with the same target eigenstate . The controlled unitary gate acts bysince . The target remains unchanged after every application. Multiplying these factors givesThe ordering of the tensor factors is chosen to match the binary place values. Discarding the unchanged target leaves the required phase register. This uses quantum phase kickback in the phase accumulation step of quantum phase estimation.
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 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 2019 iii Paper 324 4 b Solution Created 2026-10-03 Updated 2026-10-05
Use a reversible circuit to compute an -bit representation of the angle into a workspace register, with all additional work bits retained:Write that representation as , with known binary place values (including the fixed scale and any integer bit). On the target, apply a controlled unitary gate controlled by each angle bit . Rotations about the same axis add their angles, so their product isFinally apply to perform uncomputation. The workspace returns to zero while the control register and rotated target remain unchanged; the construction works coherently on every superposition of .
A polynomial time classical calculation has a polynomial-size reversible circuit with Toffoli gates, and each Toffoli gate has a constant-size decomposition into one-qubit and two-qubit gates. The controlled rotations are themselves two-qubit gates. Thus the total quantum circuit size is . This is the binary-angle implementation of a quantum variable rotation; the stipulated angle precision is understood.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 3 15D d Solution Created 2026-09-24 Updated 2026-09-25
After the first Hadamard gate and the controlled unitary gate, the state isThe final Hadamard gate givesHence the Hadamard test returns one with probabilityIf , then and the outcome is zero with certainty. If , then modulo and the outcome is one with certainty. The single measurement therefore distinguishes the two promised cases exactly.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 324 4 a Solution 2026-09-25
First construct a controlled unitary gate from the uncontrolled oracle. Keep the supplied in a reference register. Controlled on an extra qubit, swap the data and reference registers, query on the register that contains in one branch, and swap back. Because , that branch is unchanged, while the other branch acquires on the data. Reversing the control convention with Pauli X gates gives controlled-. The reference state is returned unchanged, and each use costs one query to and controlled-SWAP gates.
Expand in an eigenbasis of . Exact quantum phase estimation with an -qubit phase register producesApply the available phase gates, controlled by the corresponding bits of , to multiply branch byThen reverse phase estimation. Although no oracle was supplied, every eigenvalue obeys , so . The inverse controlled powers can therefore be implemented with forward calls to . Since , phase estimation and its inverse use only queries. The phase register returns to , while the data register isAs a direct check, the same spectral promise implies .
Choose the Pauli matrices with , and let be an angular frequency. The computational basis is an orthonormal basis of energy eigenstates for the qubit Hamiltonian operatorIn this convention is the lower energy eigenstate; the labels describe a basis choice, not a universal ground state/excited state ordering. Start in the Hadamard basis pure state . ThenThe first factor in the second expression is a global phase. The ratio of the two probability amplitudes has relative quantum phase , so its sign follows directly from .
Multiplying this density matrix by each Pauli matrix and taking its trace gives the Bloch vector:The Bloch vector travels counterclockwise around the equator of the Bloch sphere, from toward when viewed from . A computational-basis measurement always has , while the Hadamard basis and eigenbasis measurements giveAt , the quantum state is up to a global phase, giving . At , it is up to a global phase, giving . Both retain equal energy measurement probabilities.
At , the time-evolution operator is , so . The physical quantum state ray, its density operator, and every measurement's probabilities have returned. The representative vector returns exactly only at , when . The minus sign is a global phase for this isolated evolution; comparing an evolved branch with an unevolved branch through a controlled unitary gate can make it a relative quantum phase, as explained in global phase of an uncontrolled quantum gate is unobservable.

