Quantum computers can outperform their classical counterparts at some tasks, but the full scope of their power is unclear. A new quantum algorithm hints at the possibility of farreaching applications.
Quantum mechanical computers have the potential to quickly perform calculations that are infeasible with present technology. There are quantum algorithms to simulate efficiently the dynamics of quantum systems^{1} and to decompose integers into their prime factors^{2}, problems thought to be intractable for classical computers. But quantum computation is not a magic bullet — some problems cannot be solved dramatically faster by quantum computers than by classical ones. Is a quantum computer necessarily a specialpurpose device then, suitable only for numbertheoretic calculations or problems that are inherently quantum? There might be hope for more generality. Writing in Physical Review Letters^{3}, Aram Harrow, Avinatan Hassidim and Seth Lloyd describe how quantum computers can extract information about the solutions to linear equations, a fundamental task with broad applications.
The basic problem of finding a vector x satisfying A x = b for some given matrix A and vector b arises throughout science and engineering. For example, signal processing, convex optimization and finiteelement analysis all rely on solving linear equations. Owing to the importance of linear systems, considerable effort has been spent on finding fast algorithms for solving them. One simple approach is known as Gaussian elimination, a method that was already used in ancient China, and that today is standard fare in courses on linear algebra. Alternative methods offer improved speed and better numerical stability, and some can take advantage of special properties such as sparsity of A. However, if A is an N × N matrix (or a rectangular matrix for which the larger dimension is N), all of these methods use a number of operations at least proportional to N.
The authors^{3} suggest approaching this problem using quantum simulation. Given an N × N sparse Hermitian matrix A, a quantum state b〉 and a time t, quantum simulation provides a method for preparing the quantum state e^{−}^{iAt}b〉 using a number of operations that is only polynomial in log(N) (ref. 4). In the approach of Harrow et al., the vector b is first encoded into a quantum state b〉. Then, by a wellknown technique called phase estimation^{5}, the ability to produce e^{−}^{iAt}b〉 is leveraged to create a quantum state x〉 proportional to A^{−1}b〉. (A similar approach can be applied when the matrix A is nonHermitian, or even when A is nonsquare.) The result is a solution to the system of linear equations encoded as the quantum state x〉.
Producing a quantum state proportional to A^{−1}b〉 does not, by itself, solve the task at hand. To extract information from a quantum state, we must perform a measurement. Learning all N amplitudes of an Ndimensional quantum state requires a number of measurements at least proportional to N. Thus, if our goal is to completely reconstruct a solution x, there is no hope for a quantum algorithm to offer a significant advantage over classical methods. However, for some problems we might not be interested in the entire vector x, but rather in some special feature of it, such as an expectation value. Then a quantum computer may be able to solve the problem rapidly.
In addition to readout, the approach suffers from other significant limitations. The vector b must be given in a way that allows quick preparation of the quantum state b〉. Methods are available for doing this if b has a suitable implicit description, but the approach is useless if b is given by explicit classical data. Furthermore, as in classical methods for solving linear equations, the performance depends crucially on the condition number κ, a measure of how close A is to being singular. The running time of the quantum algorithm is polynomial in log(N) and in κ, so the quantum advantage is only significant when κ is not too large.
Having lowered the bar for the sense in which we hope to solve a system of linear equations, one might wonder whether this quantum algorithm^{3} offers a real advantage over classical computing at all. To address this concern, in perhaps the most interesting aspect of their work, Harrow, Hassidim and Lloyd prove that the problem they solve is as hard as anything a quantum computer can do. In particular, they show that any quantum computation can be encoded into an instance of solving linear equations, even with the restrictions required for their quantum solver to be efficient. Therefore, either ordinary classical computers can efficiently simulate quantum ones — a highly unlikely proposition — or the quantum algorithm for solving linear equations performs a task that is beyond the reach of classical computation.
Proving 'hardness' results of this kind is a widely used strategy for establishing the nontriviality of quantum algorithms. Similar constructions are known for problems such as finding ground states by adiabatic evolution^{6}, computing invariants of knots^{7}, estimating entries of powers of matrices^{8} and contracting tensor networks^{9}, among other tasks. But what sets linear equations apart is their ubiquity in scientific computing and engineering applications.
Will the quantum solution of linear equations^{3} turn out to be a widely used tool, or are its limitations too great for the technique to be of practical significance? Unfortunately, no concrete task has yet been proposed for which the quantum algorithm provides a clear advantage. But it will be exciting to explore the impact of this and related applications of quantum computing, in particular as the methods can be put into practice.
References
Feynman, R. P. Int. J. Theor. Phys. 21, 467–488 (1982).
Shor, P. W. SIAM J. Comput. 26, 1484–1509 (1997).
Harrow, A. W., Hassidim, A. & Lloyd, S. Phys. Rev. Lett. 103, 150502 (2009).
Aharonov, D. & TaShma, A. in Proc. 35th ACM Symp. Theor. Comput. 20–29 (ACM, 2003).
Cleve, R., Ekert, A., Macchiavello, C. & Mosca, M. Proc. R. Soc. Lond. A 454, 339–354 (1998).
Aharonov, D. et al. in Proc. 45th IEEE Found. Comput. Sci. 42–51 (IEEE, 2004).
Bordewich, M., Freedman, M., Lovász, L. & Welsh, D. Comb. Probab. Comput. 14, 737–754 (2005).
Janzing, D. & Wocjan, P. Theor. Comput. 3, 61–79 (2007).
Arad, I. & Landau, Z. Preprint at http://www.arxiv.org/abs/0805.0040 (2008).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Childs, A. Equation solving by simulation. Nature Phys 5, 861 (2009). https://doi.org/10.1038/nphys1473
Issue Date:
DOI: https://doi.org/10.1038/nphys1473
This article is cited by

Hybrid classicalquantum linear solver using Noisy IntermediateScale Quantum machines
Scientific Reports (2019)

Quantum Algorithm Design: Techniques and Applications
Journal of Systems Science and Complexity (2019)

Read the fine print
Nature Physics (2015)