An Early Investigation of the HHL Quantum Linear Solver for Scientific Applications

Muqing Zheng, Chenxu Liu, Samuel Stein, Xiangyu Li, Johannes Mülmenstädt, Yousu Chen, Ang Li · DOI

Abstract

In this paper, we explore using the Harrow-Hassidim-Lloyd (HHL) algorithm to address scientific and engineering problems through quantum computing, utilizing the NWQSim simulation package on a high-performance computing platform. Focusing on domains such as power-grid management and climate projection, we demonstrate the correlations of the accuracy of quantum phase estimation, along with various properties of coefficient matrices, on the final solution and quantum resource cost in iterative and non-iterative numerical methods. We summarize the exponential resource cost from quantum phase estimation before and after quantum error correction and illustrate a potential way to reduce the demands on physical qubits. This work lays down a preliminary step for future investigations, urging a closer examination of quantum algorithms' scalability and efficiency in domain applications.

Introduction: Bridging the Utility Gap

The Harrow-Hassidim-Lloyd (HHL) algorithm is a cornerstone of quantum computing, promising an exponential speedup for solving linear systems ($Ax = b$). However, a massive "utility gap" exists between theoretical speedup and practical application. Most HHL research focuses on asymptotic complexity rather than the concrete number of qubits and gates needed for real-world scientific problems.

This investigation provides a "reality check" for HHL by moving beyond theoretical proofs to practical resource estimation for power-grid and climate modeling. Scientific applications like power flow analysis or heat transfer simulations have specific matrix properties—such as sparsity and condition numbers—that heavily influence HHL’s performance and resource requirements.

Methodology and Simulation

The researchers employed a multi-layered approach to evaluate HHL:

  1. Simulation: Using NWQSim (Northwest Quantum Circuit Simulation Environment), a high-performance simulator that utilizes GPU acceleration and "gate fusion" to handle deep circuits.
  2. Hybrid Workflows: Integrating HHL into classical numerical frameworks, specifically the Newton-Raphson Method for non-linear power flow and the Finite Difference Method for 2D heat diffusion.
  3. Resource Estimation: Utilizing the Microsoft Azure Quantum Resource Estimator to project physical requirements for fault-tolerant hardware using surface codes and T-factories.
The HHL quantum circuit architecture, featuring Quantum Phase Estimation (QPE), eigenvalue inversion, and inverse QPE.

The core HHL circuit involves loading data, performing Quantum Phase Estimation (QPE) to extract eigenvalues, inverting those eigenvalues, and then performing inverse QPE to return to the computational basis.

Scientific Benchmarks and Resource Scaling

The study utilized specific scientific benchmarks to test the algorithm's viability across different problem dimensions and state preparation methods.

Resource requirements and problem dimensions for the linear systems evaluated in the study, comparing different state preparation methods.
  • Power Flow: A standard 4-bus test case expanded to a 16x16 Hermitian matrix.
  • Heat Transfer: 2D heat diffusion lattices with $3 \times 3$ (9x9 system) and $5 \times 5$ (25x25 system) grid points.
  • Random Matrices: Used for initial benchmarking of circuit properties and simulation performance.

Key Insights: Precision and Efficiency

One of the most significant findings is that high-precision QPE isn't always necessary. In iterative methods like Newton-Raphson, the algorithm can converge to a highly accurate solution even if the quantum solver uses a low number of "clock qubits" ($n_c$). This suggests a potential trade-off: reducing quantum precision to significantly lower circuit depth without sacrificing the final scientific result.

Furthermore, the authors found that NWQSim’s gate fusion strategy reduced the total gate count by approximately 79-80% across all tested HHL circuits. This highlights the critical role of compiler-level optimizations in making deep quantum circuits feasible for near-term simulation.

Results and Fault-Tolerant Costs

The study revealed that gate counts and runtime scale exponentially with the number of clock qubits. For a small 5x5 system, the circuit depth can exceed 500,000 gates. To solve a tiny 5x5 power flow iteration, the estimator projected a need for roughly 28,000 to 32,000 physical qubits (using a distance-7 surface code) with runtimes ranging from milliseconds to seconds depending on hardware assumptions.

Interestingly, in fault-tolerant regimes, the number of physical qubits doesn't always increase with algorithm complexity. Because T-factories operate over time, a longer-running, more complex circuit might actually require fewer parallel T-factories, leading to a counter-intuitive drop in total physical qubit demand as $n_c$ increases slightly.

Limitations and Future Outlook

The primary bottleneck remains the data-loading process. Current methods for loading classical data into a quantum state are exponentially expensive, which currently negates HHL's theoretical speedup. Future work must integrate more efficient schemes like block-encoding or QRAM. Additionally, while the test cases were well-conditioned, real-world problems are often ill-conditioned, which will significantly increase HHL's complexity. This work lays a preliminary step for future investigations into the scalability and efficiency of quantum algorithms in domain-specific applications.

Summary updated

BibTeX
@article{zheng2025early,
  author = {Muqing Zheng and Chenxu Liu and Samuel Stein and Xiangyu Li and Johannes Mülmenstädt and Yousu Chen and Ang Li},
  title = {{An Early Investigation of the HHL Quantum Linear Solver for Scientific Applications}},
  journal = {Algorithms},
  year = {2025},
  doi = {10.3390/a18080491},
}
Figure