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.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 324 4 a ii Solution Created 2026-10-03 Updated 2026-10-05
Write the normalized input as , where and . Use a data register, an -qubit eigenvalue register, and a flag quantum ancilla. Begin with .
Apply exact quantum phase estimation to . Its controlled evolutions and inverse quantum Fourier transform produceApply the HHL controlled reciprocal rotation, with :The function of is computed by quantum arithmetic; the rotation is a quantum variable rotation. On a zero eigenvalue label with no input amplitude, define any unitary action, for example no rotation.
Run the inverse phase-estimation circuit. Because each amplitude multiplier depends only on , the eigenvalue register is reset to on both flag branches. Measuring the flag and conditioning on outcome one leavesThe successful unnormalized branch is , giving the probability in the preceding part. The operations independent of are the Hadamard gates preparing the phase register, the inverse quantum Fourier transform, the reversible reciprocal/angle arithmetic, the controlled fixed-angle rotations, and the final flag measurement. Uncomputation removes all arithmetic workspace; the -dependent controlled evolutions and the -dependent state-preparation circuit supply the input-specific operations.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 324 4 a i Solution Created 2026-10-03 Updated 2026-10-05
The usual sufficient input promises for the HHL algorithm are efficient quantum state preparation of the nonzero vector , efficient access to a sparse matrix with at most nonzero entries per row, and a condition number after an efficiently known normalization. Both the positions and values of the nonzero matrix elements must be computable coherently in polynomial time. More generally, efficient Hamiltonian simulation can replace the sparsity promise. We assume is invertible; if zero eigenvalues occur, one must instead restrict to their orthogonal complement and specify the desired inverse on that support.
With and a known bound , choose . The HHL controlled reciprocal rotation then succeeds with probabilityThis is the required inverse-polynomial lower bound. In the usual approximate algorithm, inverse-polynomial requested error also gives polynomial runtime under these input promises. The original HHL paper states the dependence on sparsity, conditioning, and accuracy.
There is a qualification for a literally exact version. Representability of the eigenvalues in bits does not itself make exact quantum phase estimation efficient: using requires controlled powers corresponding to evolution times as large as . Under the paper's idealization we may describe their exact action, but polynomial runtime for that exact circuit additionally requires efficient implementations of those controlled powers, or equivalent efficient exact spectral access. Assuming an operation executes exactly does not bound its cost. This distinction is recorded in cost of exact phase estimation on a dyadic spectrum.