New Developments in Quantum Algorithms
In this talk, we describe two recent developments in quantum algorithms.
The first new development is a quantum algorithm for evaluating a Boolean formula consisting of AND and OR gates of size in time . This provides quantum speedups for any problem that can be expressed via Boolean formulas. This result can be also extended to span problems, a generalization of Boolean formulas. This provides an optimal quantum algorithm for any Boolean function in the black-box query model.
The second new development is a quantum algorithm for solving systems of linear equations. In contrast with traditional algorithms that run in time where is the size of the system, the quantum algorithm runs in time . It outputs a quantum state describing the solution of the system.
1 History of quantum algorithms
1.1 First quantum algorithms
Quantum computing (and, more broadly, quantum information science) is a new area at the boundary of computer science and physics. It studies how to apply quantum mechanics to solve problems in computer science and information processing. The area of quantum computing was shaped by the discoveries of two major quantum algorithms in mid-1990s.
The first of the these two discoveries was Shor’s polynomial time quantum algorithm for factoring and discrete logarithms. Factoring and discrete logarithm are very hard number theoretic problems. The difficulty of these problems has been used to design cryptosystems (such as RSA and Diffie-Helman key exchange) for secure data transmission over an insecure network (such as Internet). The security of data transmission is based on the assumption that it is hard to factor (or find discrete logarithm of) large numbers. Until recently, this assumption was not in doubt. Mathematicians had tried to devise an efficient way of factoring large numbers for centuries, with no success.
In 1994, Shor  discovered a fast algorithm for factoring large numbers - on a quantum mechanical computer. This shook up the foundations of cryptography. If a quantum mechanical computer is built, today’s methods for secure data transmission over the Internet will become insecure.
Another, equally strikingly discovery was made in 1996, by Lov Grover . He invented a quantum algorithm for speeding up exhaustive search problems. Grover’s algorithm solves a generic exhaustive search problem with possible solutions in time . This provides a quadratic speedup for a range of search problems, from problems that are in P classically to NP-complete problems.
Since then, each of the two algorithms has been analyzed in great detail. Shor’s algorithm has been generalized to solve a class of algebraic problems that can be abstracted to Abelian hidden subgroup problem . Besides factoring and discrete logarithm, the instances of Abelian HSP include cryptanalysis of hidden linear equations , solving Pell’s equation, principal ideal problem  and others.
1.2 Quantum walks and adiabatic algorithms
Quantum walks are quantum generalizations of classical random walks. They have been used to obtain quantum speedups for a number of problems. The typical setting is as follows. Assume that we have a classical Markov chain, on a state-space in which some states are special (marked). The Markov chain starts in a uniformly random state and stops if it reaches a marked state. If the classical Markov chain reaches a marked state in expected time , then there is a quantum algorithm which can find it in time , assuming some conditions on the Markov chain [58, 44, 42].
Another application of quantum walks is to the ”glued trees” problem . In this problem, we have a graph with two particular vertices , designed as the entrance and the exit. The problem is to find the vertex , if we start at the vertex . There is a special exponential size graph called ”glued trees” on which any classical algorithm needs exponential time to find but a quantum algorithm can find in polynomial time .
Adiabatic computation is a physics-based paradigm for quantum algorithms. In this paradigm, we design two quantum systems:
whose lowest-energy state encodes a solution to a computational problem (for example, a satisfying assignment for SAT).
whose lowest-energy state is such that we can easily prepare .
We then prepare and slowly transform the forces acting on the quantum system from to . Adiabatic theorem of quantum mechanics guarantees that, if the transformation is slow enough, is transformed into a state close to .
The key question here is: what is ”slowly enough”? Do we need a polynomial time or an exponential time to transform to (thus solving SAT by a quantum algorithm)? This is a subject of an ongoing debate [31, 29, 2].
1.3 Most recent algorithms
Two most recent discoveries in this field are the quantum algorithms for formula evaluation  and solving systems of linear equations . Both of those algorithms use the methods from the previous algorithms but do it in a novel, unexpected way. Formula evaluation uses quantum walks but in a form that is quite different from the previous approach (which we described above). Quantum algorithm for formula evaluation uses eigenvalue estimation  which is the key technical subroutine of Shor’s factoring algorithm  and the related quantum algorithms. But, again, eigenvalue estimation is used in a very unexpected way.
2 Formula evaluation
We consider evaluating a Boolean formula of variables consisting of ANDs and ORs, with each variable occuring exactly once in the formula. Such a formula can be described by a tree, with variables at the leaves and AND/OR gates at the internal nodes. This problem has many applications because Boolean formulas can be used to describe a number of different situations. The most obvious one is determining if the input data satisfy certain constraints that can be expressed by AND/OR gates.
For a less obvious application, we can view formula evaluation as a black-box model for a 2-player game (such as chess) if both players play their optimal strategies. In this case, the game can be represented by a game tree consisting of possible positions. The leaves of a tree correspond to the possible end positions of the game. Each of them contains a variable , with if the player wins and otherwise. If an internal node corresponds to a position in which the player makes the next move, then contains a value that is OR of the values of ’s children. (The player wins if he has a move that leads to a position from which he can win.) If is a node for which the player makes the next move, then contains a value that is AND of the values of ’s children. (In this case, the player wins if he wins for any possible move of the player.)
The question is: assuming we have no further information about the game beyond the position tree, how many of the variables do we have to examine to determine whether the player has a winning strategy?
Classically, the most widely studied case is the full binary tree of depth , with leaves. It can be evaluated by looking at leaves and this is optimal [54, 53, 57]. A natural question was whether one could achieve a better result, using quantum algorithms. This question was a well known open problem in the quantum computing community since mid-1990s. Until 2007, the only known result was that quantum steps are necessary, for any AND-OR tree [3, 14].
2.2 The model
By standard rules from Boolean logic (de Morgan’s laws), we can replace both AND and OR gates by NAND gates. A NAND gate outputs 1 if (i.e., for at least one ) and 0 otherwise. Then, we have a tree with at the leaves and NAND gates at the internal vertices. The advantage of this transformation is that we now have to deal with just one type of logic gates (instead of two - AND and OR).
To define , we represent basis states as where . The query transformation (where ) maps to and to for (i.e., we change phase depending on , unless in which case we do nothing).
Our algorithm can involve queries and arbitrary non-query transformations that do not depend on . The task is to solve a computational problem (e.g., to compute a value of a NAND formula) with as few queries as possible.
In 2007, in a breakthrough result, Farhi et al.  showed that the full binary AND-OR tree can be evaluated in quantum time in continuous-time counterpart of the query model.
Several improvements followed soon. Ambainis et al. [27, 8, 12] translated the algorithm of  to the conventional discrete time quantum query model and extended it to evaluating arbitrary Boolean formulas with quantum queries.
Soon after, Reichardt and Špalek  discovered a far-reaching generalization of this result. Namely, the quantum algorithm was generalized to evaluating span programs. A span program is an algebraic model of computation, originally invented for proving lower bounds on circuit size .
In a span program, we have a target vector in some linear space. We also have other vectors , each of which is associated with some condition or . The span program evaluates to 1 on an input if is equal to a linear combination of vectors which are associated with conditions that are true for the given input . Otherwise, the span program evaluates to 0.
Here is an example of a span program. We have a two dimensional linear space, with the following vectors:
where are any three distinct non-zero numbers. Vectors are associated with conditions , , , respectively.
Given any two of , we can express any vector in two dimensions (including ) as their linear combination. Thus, this span program computes the majority function which is 1 whenever at least 2 of variables are equal to 1.
Logic formulae can be embedded into span programs. That is, if we have two span programs computing functions and , we can combine them into span programs for AND and OR in a fairly simple way.
Reichardt and Špalek  invented a complexity measure, witness size for span programs. This measure generalizes formula size: a logic formula of size can be transformed into a span program with witness size .  gave a quantum algorithm for evaluating a span program of witness size with queries. This is a very interesting result because it allows to evaluate formulas with gates other than AND and OR by designing span programs for those gates and them composing them into one big span program. The next step was even more interesting.
The next step was even more surprising. Reichardt [48, 49, 51] discovered that the span program approach is optimal, for any Boolean function . That is , if is the minimum number of quantum queries for evaluating (by any quantum algorithm), then there is a span program with witness size . Thus, a span-program based algorithm can evaluate with queries, within a constant factor of the best possible number of queries.
This fact linked two lines of research: quantum formula evaluation algorithms and ”quantum adversary” lower bounds. ”Quantum adversary” (invented in ) is a method for proving lower bounds on the number of queries to evaluate by a quantum algorithm. Several progressively stronger versions of ”quantum adversary” have been invented [7, 15, 43, 38], with the strongest being the ”negative adversary” method of .
Finding the best lower bound for quantum algorithms provable via ”negative adversary” method is a semidefinite program (SDP). Reichardt [48, 49, 51] considered the dual of this SDP and showed that the dual SDP gives the span program with the smallest witness size. Thus, the span programs are optimal (in terms of query complexity) for any Boolean function . (Finding the optimal span program, however, requires solving a semidefinite program of size .)
2.4 Algorithmic ideas
We now give a very informal sketch the simplest version of formula evaluation algorithm. We augment the formula tree with a finite ”tail” of length as shown in Figure 1.
We then consider a quantum walk on this tree. At the leaves of the tree, the transformations that are performed depend on whether the leaf holds or . (This is achieved by querying the respective and then performing one of two transformations, depending on the outcome of the query.)
The starting state is an appropriately chosen quantum state consisting of the states in the tail. If the quantum walk is set up properly, an amazing thing happens! Whenever the formula evaluates to 0, the state remains almost unchanged. Whenever the formula evaluates to 1, after steps, the state is almost completely different from . This means that we can distinguish between the two cases by running the walk for steps and measuring whether the state is still . Surprisingly, the behaviour of the walk only depends on the value of the formula and not on which particular variables are 1.
The algorithm for evaluating span programs is essentially the same, except that the quantum walk is performed on a weighted graph that corresponds to the span program.
For more information on this topic, we refer the reader to the survey  and the original papers.
3 Linear equations
Solving large systems of linear equations is a very common problem in scientific computing, with many applications. We consider solving a system of linear equations with unknowns: where
and are given to us. The task is to find .
The best classical algorithm for solving a general system runs in time . The reason for that was that even outputting the solution requires time because the solution contains values for variables. Thus, it seemed that there was no hope for achieving more than a polynomial speedup by a quantum algorithm.
Recently, Harrow, Hassidim and Lloyd  discovered a surprising quantum algorithm that allows to solve systems of linear equations in time - in an unconventional sense. Namely, the algorithm of  generates the quantum state
with the coefficients being equal to the values of variables in the solution of the system .
What can we do with this quantum state? We cannot extract all the values from it. If we measured this state, we would obtain one value , with probabilities of different proportional to .
We can, however, estimate some quantities that depend on all of . For example, if all variables in the solution had values 1 or -1, having the quantum state would enable us to estimate the fraction of variables . Moreover, similar tasks appear to be hard classically. As shown by , a classical -time algorithm for computing any quantity of this type implies a polynomial time classical algorithm for simulating any quantum computation. Thus (unless P=BQP), this quantum algorithm provides a genuine speedup over the classical algorithms.
3.2 More details
In more detail, the running times of both classical and quantum algorithms for solving systems of linear equations actually depend on several parameters. One parameter is , the number of equations (and variables). Another parameter is , the condition number of the system. is defined as where and are the smallest and the largest singular values of the matrix [37, Chapter 5.8].
Intuitively, the condition number describes the closeness of the matrix to a singular matrix. For a singular matrix, and . Larger condition number means that the matrix is closer to a singular matrix. In this case, small changes to input data and (or small numerical inaccuracies) can cause large changes to solution . To compensate, if we have a matrix with large , we have to perform the computation with a higher accuracy. This increases the running time of all algorithms for solving systems of linear equations but the exact increase varies greatly from algorithm to algorithm.
The main classical algorithms for solving systems of linear equations are:
The running time of the quantum algorithm  is where is the time necessary to implement the transformation on a quantum computer. varies greatly, depending on . For sparse with at most nonzero values in each row and each column, . Thus, in this case the running time of the quantum algorithm is . This achieves an exponential speedup for the case when is large and is relatively small (e.g., or ).
The key bottleneck is the dependence on which is actually worse than in the classical algorithms. We have been able to improve it to . Unfortunately, further improvement is very unlikely.  have shown that an time quantum algorithm would imply BQP=PSPACE.
-  S. Aaronson. D-Wave Easter Spectacular. A blog post, April 7, 2007. http://scottaaronson.com/blog/?p=225.
-  B. Altshuler, H. Krovi, J. Roland. Anderson localization casts clouds over adiabatic quantum optimization. arxiv:0912.0746.
-  A. Ambainis. Quantum lower bounds by quantum arguments. Journal of Computer and System Sciences, 64:750-767, 2002. Also available as quant-ph/0002066.
-  A. Ambainis. Quantum walks and their algorithmic applications. International Journal of Quantum Information, 1:507-518, 2003. Also quant-ph/0403120.
-  A. Ambainis. Quantum walk algorithm for element distinctness. SIAM Journal on Computing, 37(1): 210-239, 2007. Also FOCS’04 and quant-ph/0311001.
-  A. Ambainis. Quantum search algorithms (a survey). SIGACT News, 35(2):22-35, 2004. Also quant-ph/0504012.
-  A. Ambainis. Polynomial degree vs. quantum query complexity. Journal of Computer and System Sciences, 72(2): 220-238, 2006. Also quant-ph/0305028.
-  A. Ambainis. A nearly optimal discrete query quantum algorithm for evaluating NAND formulas. arxiv:0704.3628.
-  A. Ambainis. Quantum random walks - New method for designing quantum algorithms. Proceedings of SOFSEM’08, pp. 1-4.
-  A. Ambainis. Quantum algorithms for formula evaluation. Proceedings of the NATO Advanced Research Workshop ”Quantum Cryptography and Computing: Theory and Implementations”, to appear. Also arxiv:1006.3651.
-  A. Ambainis. Variable time amplitude amplification and a faster quantum algorithm for systems of linear equations. In preparation, 2010.
-  A. Ambainis, A. Childs, B. Reichardt, R. Spalek, S. Zhang. Any AND-OR formula of size N can be evaluated in time on a quantum computer. Proceedings of FOCS’07, pp.363-372.
-  A. Ambainis, J. Kempe, A. Rivosh, Coins make quantum walks faster. Proceedings of SODA’05, pp. 1099-1108. Also quant-ph/0402107.
-  H. Barnum, M. Saks, A lower bound on the quantum complexity of read once functions. Journal of Computer and System Sciences, 69:244-258, 2004. Also quant-ph/0201007.
-  H. Barnum, M. E. Saks, M. Szegedy. Quantum query complexity and semi-definite programming. IEEE Conference on Computational Complexity 2003, pp. 179-193.
-  D. W. Berry, G. Ahokas, R. Cleve, B. C. Sanders. Efficient quantum algorithms for simulating sparse Hamiltonians. Communications in Mathematical Physics, 270(2):359-371, 2007. Also quant-ph/0508139.
-  D. W. Berry, A. Childs. The quantum query complexity of implementing black-box unitary transformations. arxiv:0910.4157.
-  D. Boneh, R. Lipton. Quantum cryptanalysis of hidden linear functions (extended abstract). Proceedings of CRYPTO’95, pp. 424-437.
-  H. Buhrman, R. Špalek: Quantum verification of matrix products. Proceedings of SODA’06, pp. 880-889. Also quant-ph/0409035.
-  H. Buhrman, R. de Wolf. Complexity measures and decision tree complexity: a survey. Theoretical Computer Science, 288:21-43, 2002.
-  G. Brassard, P. Høyer, M. Mosca, A. Tapp. Quantum amplitude amplification and estimation. In Quantum Computation and Quantum Information Science, AMS Contemporary Mathematics Series, 305:53-74, 2002. Also quant-ph/0005055.
-  G. Brassard, P. Hoyer, A. Tapp. Quantum cryptanalysis of hash and claw-free functions. Proceedings of LATIN’98, pp. 163-169. Also quant-ph/9705002.
-  G. Brassard, P. Høyer, A. Tapp. Quantum counting. Proceedings of ICALP’98, pp. 820-831. Also quant-ph/9805082.
-  J.R. Bunch, J.E. Hopcroft, Triangular factorization and inversion by fast matrix multiplication, Mathematics of Computation, 28:231-236, 1974.
-  A. Childs. On the relationship between continuous- and discrete-time quantum walk. Communications in Mathematical Physics 294:581-603, 2010. Also arXiv:0810.0312.
-  A. M. Childs, R. Cleve, E. Deotto, E. Farhi, S. Gutmann, D. A. Spielman, Exponential algorithmic speedup by quantum walk. Proceedings of STOC’03, pp. 59-68. Also quant-ph/0209131.
-  A. Childs, B. Reichardt, R. Špalek, S. Zhang. Every NAND formula on N variables can be evaluated in time , quant-ph/0703015, version v1, March 2, 2007.
-  D. Coppersmith, S. Winograd, Matrix multiplication via arithmetic progressions, Journal of Symbolic Computation 9(3): 251-280, 1990.
-  W. van Dam, M. Mosca, U. Vazirani. How Powerful is Adiabatic Quantum Computation?. Proceedings of FOCS’2001, pp. 279-287.
-  D-Wave Systems. http://www.dwavesys.com
-  E. Farhi, J. Goldstone, S. Gutman, M. Sipser. A quantum adiabatic algorithm applied to random instances of an NP-complete problem, Science 292:472-476, 2001. Also quant-ph/0104129.
-  E. Farhi, J. Goldstone, S. Gutman, A Quantum Algorithm for the Hamiltonian NAND Tree. Theory of Computing, 4:169-190, 2008. Also quant-ph/0702144.
-  G. Golub, C. van Loan. Matrix Computations, 3rd edition. John Hopkins University Press, 1996.
-  L. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC’96, pp. 212-219. Also quant-ph/9605043.
-  S. Hallgren. Polynomial-time quantum algorithms for Pell’s equation and the principal ideal problem. Journal of the ACM, 54:1, 2007.
-  A. Harrow, A. Hassidim, S. Lloyd. Quantum algorithm for linear systems of equations. Physical Review Letters, 103:150502, 2008. Also arXiv:0907.3920.
-  R. Horn, C. Johnson. Matrix Analysis, Cambridge University Press, 1985.
-  P. Høyer, T. Lee, R. Špalek. Negative weights make adversaries stronger. Proceedings of STOC’07, pp. 526-535. Also quant-ph/0611054.
-  R. Jozsa. Quantum factoring, discrete logarithms, and the hidden subgroup problem. Computing in Science and Engineering, 3:34-43, 2001. Also quant-ph/0012084.
-  M. Karchmer, A. Wigderson. On Span Programs. Structure in Complexity Theory Conference 1993, pp. 102-111.
-  J. Kempe. Quantum random walks - an introductory overview. Contemporary Physics, 44 (4):307-327, 2003. Also quant-ph/0303081.
-  H. Krovi, F. Magniez, M. Ozols and J. Roland. Finding is as easy as detecting for quantum walks. Proceedings of ICALP’2010, to appear. Also arxiv:1002.2419.
-  S. Laplante, F. Magniez. Lower Bounds for Randomized and Quantum Query Complexity Using Kolmogorov Arguments. SIAM Journal on Computing, 38(1): 46-62, 2008. Also CCC’2004 and quant-ph/0311189.
-  F. Magniez, A. Nayak, J. Roland, M. Santha. Search via quantum walk. Proceedings of STOC’07, pp. 575-584. Also quant-ph/0608026.
-  F. Magniez, M. Santha, M. Szegedy. Quantum algorithms for the triangle problem. SIAM Journal on Computing, 37(2): 413-424, 2007. Also quant-ph/0310134.
-  M. Mosca, A. Ekert. The Hidden Subgroup Problem and Eigenvalue Estimation on a Quantum Computer. Proceedings of QCQC’98, pp. 174-188. Also quant-ph/9903071.
-  A. Nayak, F. Wu. The quantum query complexity of approximating the median and related statistics. Proceedings of STOC’99, pp. 384-393. Also quant-ph/9804066.
-  B. Reichardt. Span programs and quantum query complexity: The general adversary bound is nearly tight for every boolean function. Proceedings of FOCS’2009. Also arXiv:0904.2759.
-  B. Reichardt. Span-program-based quantum algorithm for evaluating unbalanced formulas. arXiv:0907.1622.
-  B. Reichardt. Faster quantum algorithm for evaluating game trees. arXiv:0907.1623.
-  B. Reichardt. Reflections for quantum query algorithms. arxiv:1005.1601.
-  B. Reichardt, R. Špalek. Span-program-based quantum algorithm for evaluating formulas. Proceedings of STOC’2008, pp. 103-112. Also arXiv:0710.2630.
-  M. Saks, A. Wigderson. Probabilistic Boolean decision trees and the complexity of evaluating game trees, Proceedings of FOCS’86, pp. 29-38.
-  M. Santha. Quantum walk based search algorithms. Proceedings of TAMC’2008, pp. 31-46. Also arXiv:0808.0059.
-  J. Shewchuk. An introduction to the conjugate gradient method without the agonizing pain. Technical Report CMU-CS-94-125, School of Computer Science, Carnegie Mellon University, 1994.
-  P. Shor. Algorithms for Quantum Computation: Discrete Logarithms and Factoring. Proceedings of FOCS’94, pp. 124-134. Also quant-ph/9508027.
-  M. Snir. Lower bounds on probabilistic linear decision trees. Theoretical Computer Science, 38: 69-82, 1985.
-  M. Szegedy. Quantum speed-up of Markov chain based algorithms. Proceedings of FOCS’04, pp. 32-41.
-  T. A. Tulsi. Faster quantum walk algorithm for the two dimensional spatial search, Physical Review A, 78:012310, 2008. Also arXiv:0801.0497.
-  S. E. Venegas-Andrade. Quantum Walks for Computer Scientists. Morgan and Claypool, 2008.