Skip to main content
KetQat

Appearance

Algorithm · advanced

HHL algorithm

Solves the quantum linear systems problem for a sparse Hermitian matrix by phase estimation of exp(iAt), a controlled rotation that multiplies each eigencomponent by C/lambda, uncomputation and post-selection; running time of order log(N) s^2 kappa^2 / epsilon up to slowly growing factors.

Peer-reviewed resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Write ∣b⟩=∑jβj∣uj⟩\ket{b} = \sum_j \beta_j\ket{u_j} in the eigenbasis of AA, A∣uj⟩=λj∣uj⟩A\ket{u_j} = \lambda_j\ket{u_j}, so that A−1∣b⟩=∑jβjλj−1∣uj⟩A^{-1}\ket{b} = \sum_j \beta_j\lambda_j^{-1}\ket{u_j}.

Procedure.

  1. Prepare ∣b⟩\ket{b} in the system register.
  2. Run phase estimation of the unitary eiAt0e^{iAt_0} (by Hamiltonian simulation) into a clock register, approximately producing ∑jβj∣uj⟩∣λ~j⟩\sum_j \beta_j\ket{u_j}\ket{\tilde\lambda_j} with λ~j≈λj\tilde\lambda_j \approx \lambda_j.
  3. Controlled on ∣λ~j⟩\ket{\tilde\lambda_j}, rotate an ancilla: ∣0⟩↦1−C2/λ~j2 ∣0⟩+(C/λ~j)∣1⟩\ket{0} \mapsto \sqrt{1 - C^2/\tilde\lambda_j^2}\,\ket{0} + (C/\tilde\lambda_j)\ket{1} with C=O(1/κ)C = O(1/\kappa).
  4. Undo phase estimation to clear the clock register.
  5. Measure the ancilla; on outcome 1 the system holds (approximately) ∑jβj(C/λj)∣uj⟩∝A−1∣b⟩\sum_j \beta_j (C/\lambda_j)\ket{u_j} \propto A^{-1}\ket{b}. Repeat, or use amplitude amplification, until success.

Cost. With t0=O(κ/ε)t_0 = O(\kappa/\varepsilon) the eigenvalue estimates are accurate enough for output error ε\varepsilon; the success probability is Ω(1/κ2)\Omega(1/\kappa^2) and amplitude amplification needs O(κ)O(\kappa) rounds. Harrow, Hassidim and Lloyd state a total running time of O~(κTB+log⁡(N) s2κ2/ε)\tilde O\big(\kappa T_B + \log(N)\, s^2\kappa^2/\varepsilon\big), where O~\tilde O suppresses more slowly growing factors.

Output. A state close to ∣x⟩\ket{x}, from which expectation values ⟨x∣M∣x⟩\bra{x}M\ket{x} are estimated by repetition; the paper frames the task this way and compares with classical algorithms that find x⃗\vec x and estimate x⃗†Mx⃗\vec x^\dagger M\vec x in time O~(Nκ)\tilde O(N\sqrt\kappa) for sparse systems. Non-Hermitian AA is handled by the Hermitian dilation, and ill-conditioned parts of the spectrum can be filtered out with a flag qubit (also discussed in the paper).

Holds when

  • AA is Hermitian, ss-sparse with efficiently computable entries, and its eigenvalues satisfy 1/κ≤∣λ∣≤11/\kappa \le \lvert\lambda\rvert \le 1.
  • A unitary preparing ∣b⟩\ket{b} in time TBT_B is available.

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Aram W. Harrow, Avinatan Hassidim, Seth Lloyd (2009). Quantum algorithm for linear systems of equations. Physical Review Letters 103, 150502. doi:10.1103/PhysRevLett.103.150502arXiv:0811.3171

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass with notes · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Procedure, t0 = O(kappa/eps), C = O(1/kappa), success probability Omega(1/kappa^2), O(kappa) amplification rounds, total run time O~(kappa T_B + log(N) s^2 kappa^2/eps), Hermitian dilation, well-conditioned-part filtering and the classical comparison compared with Harrow–Hassidim–Lloyd arXiv:0811.3171 (abstract, Section II, Appendix A, Section III).

    The classical comparison was written O(N sqrt(kappa)); HHL state O~(N sqrt(kappa)). Changed O to O~.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision a35b61cd9dfee2ef. Source file knowledge/records/algorithm/hhl-algorithm.md in the content repository (readable there once it is public).