Few quantum algorithms have an asterisk next to every line of their performance sheet quite like HHL. The headline is striking: solve for sparse, well-conditioned in time polylogarithmic in the problem dimension. The fine print is more striking: you need the input as a quantum state, you cannot read the output as a classical vector, and the condition number can shred the speedup. What’s left, once you read the fine print, determines whether HHL is a billion-dollar industrial algorithm or a mathematical curiosity.
The algorithm, briefly
The HHL procedure uses quantum phase estimation to diagonalize in the eigenbasis, rotates by for each eigenvalue, and inverse-phase-estimates. The output is the state within precision .
The running time depends on:
- = condition number of
- = dimension (exponential in qubit count)
- = sparsity (rows with non-zeros)
- = precision
The final state is quantum, a vector in Hilbert space. Measuring it gives one classical sample per run, and the amplitudes themselves are not efficiently read out.
The three small-print clauses
Clause 1: State preparation. HHL requires already prepared as a quantum state. If is a classical vector with entries, preparing in general takes time, erasing the claimed exponential speedup. Only if can be quantum-prepared from an efficient quantum circuit (e.g., it arises from a physics simulation, or is stored in QRAM) does the input cost not dominate.
Clause 2: Output extraction. We get the state , not its classical entries. Extracting a single entry would require amplitude estimation with precision , taking measurements. Computing all entries takes , again erasing exponential speedup.
Clause 3: Condition number. If , the algorithm is no faster than classical. Real-world matrices often have poor conditioning; preconditioners help classically but not always quantumly.
The Aaronson litmus test
Aaronson 2015 [2] articulated the four conditions for HHL to provide genuine speedup:
- must be efficiently quantum-preparable.
- must be efficiently quantum-accessible (e.g., sparse and row-accessible, or stored in QRAM).
- Only global properties of are wanted (not individual entries).
- The condition number must be polylogarithmic or polynomial in interesting parameters.
When all four hold, HHL is efficient and classical conjugate gradient is not. Such settings exist (differential equations with structured sources, machine learning inner loops with implicit matrices) but are rare in practice.
Dequantization via Tang
Tang 2018 [3] introduced classical -norm sampling access as a classical analog of QRAM. Under this access model, many “exponentially faster” quantum linear-algebra subroutines (recommender systems, SVMs, PCA) become classically efficient with polynomial overhead. HHL itself has partial dequantization under related assumptions [4].
The Tang result was not a “quantum computing doesn’t work” finding. It was: the claimed exponential speedups assumed a quantum-favored input format. If classical and quantum are put on even input footing, some speedups evaporate.
Hardware prospects
HHL on current NISQ hardware has been demonstrated for systems [5]. Scaling to (the regime where HHL would be useful) requires error correction. Preskill 2025 [6] lists HHL among the applications of interest for the coming Megaquop machine era, alongside chemistry, materials science, and selected ML routines.
References
[1] Harrow, A. W., Hassidim, A., Lloyd, S. (2009). Quantum Algorithm for Linear Systems of Equations. Phys. Rev. Lett. 103, 150502.
[2] Aaronson, S. (2015). Read the fine print. Nature Physics 11, 291–293.
[3] Tang, E. (2018/2019). A quantum-inspired classical algorithm for recommendation systems. STOC 2019, 217–228.
[4] Gilyén, A., Song, Z., Tang, E. (2022). An improved quantum-inspired algorithm for linear regression. Quantum 6, 754.
[5] Zaman, A., Wong, H. (2022). Study of Error Propagation in HHL. IEEE LAEDC 2022.
[6] Preskill, J. (2025). Beyond NISQ: The Megaquop Machine. ACM Trans. Quantum Comput.