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.
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.
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 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(logN), in contrast to classical approaches, which in the general case exhibit a complexity of O(N3), 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.
We analyze the performance of the Harrow-Hassidim-Lloyd algorithm (HHL algorithm) for solving linear problems and of a variant of this algorithm (HHL variant) commonly encountered in literature. This variant relieves the algorithm of preparing an entangled initial state of an auxiliary register. We prove that the computational error of the variant algorithm does not always converge to zero when the number of qubits is increased, unlike the original HHL algorithm. Both algorithms rely upon two fundamental quantum algorithms, the quantum phase estimation and the amplitude amplification. In particular, the error of the HHL variant oscillates due to the presence of undesired phases in the amplitude to be amplified, while these oscillations are suppressed in the original HHL algorithm. Then, we propose a modification of the HHL variant, by amplifying an amplitude of the state vector that does not exhibit the above destructive interference. We also study the complexity of these algorithms in the light of recent results on simulation of unitaries used in the quantum phase estimation step, and show that the modified algorithm has smaller error and lower complexity than the HHL variant. We supported our findings with numerical simulations.
Solving systems of linear equations is important both in classical and quantum computing. Harrow-Hassidim-Lloyd algorithm (HHL algorithm), a quantum algorithm for solving systems of linear equations, has achieved exponentially improved performance compared with corresponding classical algorithm. We will show in this article that the HHL algorithm is actually a duality quantum algorithm with non- unitary transformation from initial to the final state. We present a detailed realization of the HHL algorithm in a duality quantum computing formalism that allows the construction of non- unitary operations. The divider structure, combinor structure, and the total quantum circuit for the HHL algorithm in the duality quantum computing formalism are given explicitly.
Solving linear systems of equations plays a fundamental role in numerous computational problems from different fields of science. The widespread use of numerical methods to solve these systems motivates investigating the feasibility of solving linear systems problems using quantum computers. In this work, we provide a survey of the main advances in quantum linear systems algorithms, together with some applications. We summarize and analyze the main ideas behind some of the algorithms for the quantum linear systems problem in the literature. The analysis begins by examining the Harrow-Hassidim-Lloyd (HHL) solver. We note its limitations and reliance on computationally expensive quantum methods, then highlight subsequent research efforts which aimed to address these limitations and optimize runtime efficiency and precision via various paradigms. We focus in particular on the post-HHL enhancements which have paved the way towards optimal lower bounds with respect to error tolerance and condition number. By doing so, we propose a taxonomy that categorizes these studies. Furthermore, by contextualizing these developments within the broader landscape of quantum computing, we explore the foundational work that have inspired and informed their development, as well as subsequent refinements. Finally, we discuss the potential applications of these algorithms in differential equations, quantum machine learning, and many-body physics.
Quantum computing is certainly one of the greatest advances in the computer science field. Thanks to the parallelism and entanglement properties, it has proved to offer several advantages compared to the classical algorithms especially in the great reduction of the processing time. Quantum phase estimation (QPE) is one of the most important algorithms for quantum computing. It is known as the eigenvalue finding module for unitary operators. The Fourier transform is the key to this procedure. It has been researched and used to solve many problems such as the order finding problem, and the factoring problem. It was also applied for quantum sampling algorithms and the calculation of the eigenvalues of unitary matrices. In this paper, we study three important quantum algorithms for machine learning that use the QPE algorithm as a subroutine: the quantum principal components analysis (PCA) for data visualization, the Harrow-Hassidim-Lloyd (HHL) algorithm for solving linear systems, and the quantum singular value thresholding (SVT) for matrix completion in recommender systems. We also discuss the advantages and limits of such algorithms compared to their classical versions. Then we discuss potential ways of amelioration of such algorithms, and end with a proposed approach for further improvement.