Quantum Outpost

Algorithm Zoo · Linear algebra

HHL Algorithm

Also known as: Quantum linear systems

First described: Harrow, Hassidim, Lloyd, 2009

Status: Conjectured Maturity: Theoretical only Speedup: Exponential in N (with caveats)

The problem

Given a sparse, well-conditioned matrix A and vector b, output a state |x⟩ proportional to A^{-1}|b⟩.

Solves linear systems Ax = b in time poly(log N, κ, 1/ε) where N is the dimension, κ is the condition number, ε is precision. Crucially, the output is a quantum state — not the vector — and extracting useful classical information requires measurement.

Best classical

Õ(N · √κ) for Krylov-based sparse solvers (e.g. conjugate gradient)

Quantum complexity

Õ(log(N) · κ · s · 1/ε) (sparsity s, condition number κ)

Our verdict

Asymptotically exponential, practically encumbered. The four caveats (sparse A, well-conditioned A, easy state preparation, easy expectation-value readout) rarely all apply to real engineering problems. Treat as a primitive for QML pipelines, not as a 'solve any linear system' button.

When to use it

When not to use it

Classical baseline

Conjugate gradient and other Krylov methods are extremely strong on real problems. Aaronson's 'Read the Fine Print' (2015) lists four caveats that HHL must clear simultaneously; few real problems clear all four.

Hardware cost

Per Aaronson: requires QRAM-like state preparation (not yet engineered), exponentially precise condition-number estimation, and well-conditioned A. Each caveat adds qubit and depth overhead. No demonstration has solved a problem a classical CG step couldn't.

Key papers

Deep-dive tutorials

Last verified: 2026-05-24

Weekly dispatch

Quantum, for people who already code.

One serious tutorial per week, plus the industry moves that actually matter. No hype, no hand-waving.

Free. Unsubscribe anytime. We will never sell your email.