Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2108.09004 · IEEE Access

A Step-by-Step HHL Algorithm Walkthrough to Enhance Understanding of Critical Quantum Computing Concepts

Anika Zaman, Hector Jose Morrell, Hiu Yung Wong

Published Jan 1, 2023• 47 citations
arXivHTMLPDF

Abstract

After learning basic quantum computing concepts, it is desirable to reinforce the learning using an important and relatively complex algorithm through which students can observe and appreciate how qubits evolve and interact with each other. Harrow-Hassidim-Lloyd (HHL) quantum algorithm, which can solve linear system problems with exponential speed-up over the classical method and is the basis of many important quantum computing algorithms, is used to serve this purpose. The HHL algorithm is explained analytically followed by a 4-qubit numerical example in bra-ket notation. Matlab code corresponding to the numerical example is available for students to gain a deeper understanding of the HHL algorithm from a pure matrix point of view. A quantum circuit programmed using qiskit is also provided for real hardware execution in IBM quantum computers. After going through the material, students are expected to have a better appreciation of the concepts such as basis transformation, bra-ket and matrix representations, superposition, entanglement, controlled operations, measurement, quantum Fourier transformation, quantum phase estimation, and quantum programming. To help readers review these basic concepts, brief explanations augmented by the HHL numerical examples in the main text are provided in the Appendix.

DOI
10.1109/access.2023.3297658

Related papers

Extending the Step-by-Step HHL Algorithm Walkthrough: Advanced Concepts for Practical Quantum Computing Applications

Pietro Asinari, Matteo Maria Piredda, Giulio Barletta +2 more

Quantum computing has generated significant expectations within the scientific community. However, the development of noise-resilient quantum computers capable of addressing a broad class of practical problems is expected to require at least another decade. During this ongoing evolution, rigorous step-by-step tutorials are essential not only to clarify fundamental concepts but also to disseminate them beyond the core quantum computing community to the wider engineering audience interested in applications. In many engineering fields, the efficient solution of linear systems of equations is a central computational task. For this reason, although it remains an open question whether the Harrow–Hassidim–Lloyd (HHL) algorithm will ultimately play a decisive role in future fault-tolerant application-scale quantum (FASQ) computers, clear and rigorous tutorials on this paradigmatic algorithm remain of fundamental importance. While well-structured introductions to elementary implementations of HHL already exist, certain simplifying assumptions—appropriate for pedagogical clarity—may limit their extension to more general or application-oriented settings. In this work, the HHL algorithm is presented through a detailed analytical treatment, followed by a complete example including a generic module for eigenvalue inversion. A corresponding Jupyter Notebook implementation in Qiskit is provided to support practical understanding. After working through the material, readers are expected to gain a clearer appreciation of how quantum computing concepts operate in practice and why quantum approaches are of interest for combinatorial optimization and machine learning problems.

IEEE Access•Jan 1, 2026•0 citations

Solving Linear Systems of Equations with the Quantum HHL Algorithm: A Tutorial on the Physical and Mathematical Foundations for Undergraduate Students

Lucas Queiroz Galvão, de Souza, Anna Beatriz M., A. Santos +2 more

Quantum computing enables the efficient resolution of complex problems, often outperforming classical methods across various applications. In 2009, Harrow, Hassidim and Lloyd proposed an algorithm for solving linear systems of equations, demonstrating exponential speedup (under ideal conditions) with a complexity of $poly(\log N)$, in contrast to classical approaches, which in the general case exhibit a complexity of $O(N^3)$, although they can achieve $O(N)$ in specific cases involving sparse matrices. This algorithm holds promise for advancements in machine learning, the solution of differential equations, linear regression, and cryptographic analysis. However, its structure is intricate, and there is a notable lack of detailed instructional materials in the literature. In this context, this paper presents a tutorial addressing the physical and mathematical foundations of the HHL algorithm, aimed at undergraduate students, explaining its theoretical construction and its implementation for solving linear equation systems. After discussing the underlying mathematical and physical concepts, we present numerical examples that illustrate the evolution of the quantum circuit. Finally, the algorithm's complexity, limitations, and future prospects are analyzed. The examples are compared with their classical simulations, allowing for an operational assessment of the algorithm's performance.

arXiv:2509.16640•Sep 20, 2025•0 citations

Quantum Speedup for Linear Systems: An Analysis of the HHL Algorithm Using IBM Qiskit

V Shwetha, Abinaya Selvarajan, A Aarthi +1 more

One of the most significant developments in quantum computing is the Harrow-Hassidim-Lloyd (HHL) method, which can solve linear equation systems at exponential speedup. Because linear systems are essential to many scientific fields, including physics, engineering, and machine learning, this approach has great potential to revolutionize computational paradigms. The HHL algorithm is thoroughly examined in this work, with particular attention paid to its theoretical framework, real-world application utilizing IBM's Qiskit platform, and the difficulties in simulating quantum algorithms on noisy intermediate-scale quantum (NISQ) devices. Using parameters like fidelity, time complexity, and scalability, the research further evaluates the HHL algorithm's performance in comparison to traditional methods. According to the findings, quantum simulations work well for small-scale matrices like 2x2 and 4x4, but expanding the approach to bigger systems is still difficult because of hardware and software constraints. Finally, the research emphasizes the key directions for advancing quantum hardware and algorithms to overcome current scalability challenges, enabling broader applicability of the HHL algorithm in solving complex linear systems.

Journal of Electronics and Informatics•Jan 9, 2025•0 citations

Improved circuit implementation of the HHL algorithm and its simulations on QISKIT

Meng Zhang, Lihua Dong, Yong Zeng +1 more

In 2019, Yonghae Lee et al. combined the circuit implementation of the Harrow-Hassidim-Lloyd (HHL) algorithm with a classical computer, and designed a hybrid HHL algorithm to reduce experimental errors caused by decoherence and so on. However, the improvement is achieved only in the auxiliary quantum coding phase, and no quantum resource reduction is done on the quantum phase estimation and inverse quantum phase estimation stages. At the same time, the circuit improvement illustration on a [Formula: see text] linear system just has the result and no specific process. In this paper, based on the idea of the hybrid HHL algorithm and a generic circuit of HHL algorithm, an improved circuit implementation of the HHL algorithm is proposed. The feasibility of the improved circuit implementation of the HHL algorithm is verified by IBM's qiskit. The improved circuit illustrations on a [Formula: see text] linear system show that the improved circuit implementation of the HHL algorithm can effectively reduce quantum resources without losing the fidelity of the results. Thus the improved circuit implementation of the HHL algorithm can further avoid some result errors than the existing implementation methods.

Scientific Reports•Aug 2, 2022•19 citations

Quantum linear systems algorithms: a primer

Danial Dervovic, Mark Herbster, Peter Mountney +3 more

The Harrow-Hassidim-Lloyd (HHL) quantum algorithm for sampling from the solution of a linear system provides an exponential speed-up over its classical counterpart. The problem of solving a system of linear equations has a wide scope of applications, and thus HHL constitutes an important algorithmic primitive. In these notes, we present the HHL algorithm and its improved versions in detail, including explanations of the constituent sub- routines. More specifically, we discuss various quantum subroutines such as quantum phase estimation and amplitude amplification, as well as the important question of loading data into a quantum computer, via quantum RAM. The improvements to the original algorithm exploit variable-time amplitude amplification as well as a method for implementing linear combinations of unitary operations (LCUs) based on a decomposition of the operators using Fourier and Chebyshev series. Finally, we discuss a linear solver based on the quantum singular value estimation (QSVE) subroutine.

arXiv:1802.08227•Feb 22, 2018•62 citations

The HHL algorithm: Implementation and research directions

Varsha Sambhaje, Anju Chaurasia

Linear systems of equations lie at the heart of numerous scientific and engineering challenges. In cutting-edge arena like artificial intelligence, machine learning and neuro-computation, these systems serve as a fundamental tool for mathematical modeling. Classical algorithms for solving linear systems have been extensively developed and forms the backbone of diverse applications across various scientific disciplines. While classical algorithms exist for solving linear systems, they often encounter limitations termed “NP-completeness” as data complexity increases. The emerging field of quantum computing offers a revolutionary approach to deal with these kinds of problems. The Harrow–Hassidim–Lloyd (HHL) algorithm tackles these challenges and opens new avenues for research. This study delves into the contemporary effectiveness of the HHL algorithm to address systems of linear equations. By examining recent research in quantum machine learning, we aim to assess the HHL algorithm’s potential to revolutionize the process of optimizing hyperparameters for machine learning models, resulting in increased efficiency and cost savings. This paper meticulously analyzes the HHL algorithm and explores its evolution from conception to the latest advancements. A comprehensive examination of the HHL algorithm, including its evolution over time, is thoroughly explored. The investigation delves into the potential challenges and limitations that might hinder the practical deployment of the HHL algorithm. Identifying these roadblocks will pave the way for future research and development efforts.

International Journal of Quantum Information•May 31, 2024•2 citations
After learning basic quantum computing concepts, it is desirable to reinforce the learning using an important and relatively complex algorithm through which students can observe and appreciate how qubits evolve and interact with each other. Harrow-Hassidim-Lloyd (HHL) quantum algorithm, which can solve linear system problems with exponential speed-up over the classical method and is the basis of many important quantum computing algorithms, is used to serve this purpose. The HHL algorithm is explained analytically followed by a 4-qubit numerical example in bra-ket notation. Matlab code corresponding to the numerical example is available for students to gain a deeper understanding of the HHL algorithm from a pure matrix point of view. A quantum circuit programmed using qiskit is also provided for real hardware execution in IBM quantum computers. After going through the material, students are expected to have a better appreciation of the concepts such as basis transformation, bra-ket and matrix representations, superposition, entanglement, controlled operations, measurement, quantum Fourier transformation, quantum phase estimation, and quantum programming. To help readers review these basic concepts, brief explanations augmented by the HHL numerical examples in the main text are provided in the Appendix.
Quantum computing has generated significant expectations within the scientific community. However, the development of noise-resilient quantum computers capable of addressing a broad class of practical problems is expected to require at least another decade. During this ongoing evolution, rigorous step-by-step tutorials are essential not only to clarify fundamental concepts but also to disseminate them beyond the core quantum computing community to the wider engineering audience interested in applications. In many engineering fields, the efficient solution of linear systems of equations is a central computational task. For this reason, although it remains an open question whether the Harrow–Hassidim–Lloyd (HHL) algorithm will ultimately play a decisive role in future fault-tolerant application-scale quantum (FASQ) computers, clear and rigorous tutorials on this paradigmatic algorithm remain of fundamental importance. While well-structured introductions to elementary implementations of HHL already exist, certain simplifying assumptions—appropriate for pedagogical clarity—may limit their extension to more general or application-oriented settings. In this work, the HHL algorithm is presented through a detailed analytical treatment, followed by a complete example including a generic module for eigenvalue inversion. A corresponding Jupyter Notebook implementation in Qiskit is provided to support practical understanding. After working through the material, readers are expected to gain a clearer appreciation of how quantum computing concepts operate in practice and why quantum approaches are of interest for combinatorial optimization and machine learning problems.
Quantum computing enables the efficient resolution of complex problems, often outperforming classical methods across various applications. In 2009, Harrow, Hassidim and Lloyd proposed an algorithm for solving linear systems of equations, demonstrating exponential speedup (under ideal conditions) with a complexity of poly(log⁡N)poly(\log N)poly(logN), in contrast to classical approaches, which in the general case exhibit a complexity of O(N3)O(N^3)O(N3), although they can achieve O(N)O(N)O(N) in specific cases involving sparse matrices. This algorithm holds promise for advancements in machine learning, the solution of differential equations, linear regression, and cryptographic analysis. However, its structure is intricate, and there is a notable lack of detailed instructional materials in the literature. In this context, this paper presents a tutorial addressing the physical and mathematical foundations of the HHL algorithm, aimed at undergraduate students, explaining its theoretical construction and its implementation for solving linear equation systems. After discussing the underlying mathematical and physical concepts, we present numerical examples that illustrate the evolution of the quantum circuit. Finally, the algorithm's complexity, limitations, and future prospects are analyzed. The examples are compared with their classical simulations, allowing for an operational assessment of the algorithm's performance.
One of the most significant developments in quantum computing is the Harrow-Hassidim-Lloyd (HHL) method, which can solve linear equation systems at exponential speedup. Because linear systems are essential to many scientific fields, including physics, engineering, and machine learning, this approach has great potential to revolutionize computational paradigms. The HHL algorithm is thoroughly examined in this work, with particular attention paid to its theoretical framework, real-world application utilizing IBM's Qiskit platform, and the difficulties in simulating quantum algorithms on noisy intermediate-scale quantum (NISQ) devices. Using parameters like fidelity, time complexity, and scalability, the research further evaluates the HHL algorithm's performance in comparison to traditional methods. According to the findings, quantum simulations work well for small-scale matrices like 2x2 and 4x4, but expanding the approach to bigger systems is still difficult because of hardware and software constraints. Finally, the research emphasizes the key directions for advancing quantum hardware and algorithms to overcome current scalability challenges, enabling broader applicability of the HHL algorithm in solving complex linear systems.
In 2019, Yonghae Lee et al. combined the circuit implementation of the Harrow-Hassidim-Lloyd (HHL) algorithm with a classical computer, and designed a hybrid HHL algorithm to reduce experimental errors caused by decoherence and so on. However, the improvement is achieved only in the auxiliary quantum coding phase, and no quantum resource reduction is done on the quantum phase estimation and inverse quantum phase estimation stages. At the same time, the circuit improvement illustration on a [Formula: see text] linear system just has the result and no specific process. In this paper, based on the idea of the hybrid HHL algorithm and a generic circuit of HHL algorithm, an improved circuit implementation of the HHL algorithm is proposed. The feasibility of the improved circuit implementation of the HHL algorithm is verified by IBM's qiskit. The improved circuit illustrations on a [Formula: see text] linear system show that the improved circuit implementation of the HHL algorithm can effectively reduce quantum resources without losing the fidelity of the results. Thus the improved circuit implementation of the HHL algorithm can further avoid some result errors than the existing implementation methods.
The Harrow-Hassidim-Lloyd (HHL) quantum algorithm for sampling from the solution of a linear system provides an exponential speed-up over its classical counterpart. The problem of solving a system of linear equations has a wide scope of applications, and thus HHL constitutes an important algorithmic primitive. In these notes, we present the HHL algorithm and its improved versions in detail, including explanations of the constituent sub- routines. More specifically, we discuss various quantum subroutines such as quantum phase estimation and amplitude amplification, as well as the important question of loading data into a quantum computer, via quantum RAM. The improvements to the original algorithm exploit variable-time amplitude amplification as well as a method for implementing linear combinations of unitary operations (LCUs) based on a decomposition of the operators using Fourier and Chebyshev series. Finally, we discuss a linear solver based on the quantum singular value estimation (QSVE) subroutine.
Linear systems of equations lie at the heart of numerous scientific and engineering challenges. In cutting-edge arena like artificial intelligence, machine learning and neuro-computation, these systems serve as a fundamental tool for mathematical modeling. Classical algorithms for solving linear systems have been extensively developed and forms the backbone of diverse applications across various scientific disciplines. While classical algorithms exist for solving linear systems, they often encounter limitations termed “NP-completeness” as data complexity increases. The emerging field of quantum computing offers a revolutionary approach to deal with these kinds of problems. The Harrow–Hassidim–Lloyd (HHL) algorithm tackles these challenges and opens new avenues for research. This study delves into the contemporary effectiveness of the HHL algorithm to address systems of linear equations. By examining recent research in quantum machine learning, we aim to assess the HHL algorithm’s potential to revolutionize the process of optimizing hyperparameters for machine learning models, resulting in increased efficiency and cost savings. This paper meticulously analyzes the HHL algorithm and explores its evolution from conception to the latest advancements. A comprehensive examination of the HHL algorithm, including its evolution over time, is thoroughly explored. The investigation delves into the potential challenges and limitations that might hinder the practical deployment of the HHL algorithm. Identifying these roadblocks will pave the way for future research and development efforts.