In quantum computing, a quantum algorithm is an algorithm which runs on a realistic model of quantum computation, the most commonly used model being the quantum circuit model of computation. A classical (or non-quantum) algorithm is a finite sequence of instructions, or a step-by-step procedure for solving a problem, where each step or instruction can be performed on a classical computer. Similarly, a quantum algorithm is a step-by-step procedure, where each of the steps can be performed on a quantum computer. Although all classical algorithms can also be performed on a quantum computer, the term quantum algorithm is usually used for those algorithms which seem inherently quantum, or use some essential feature of quantum computation such as quantum superposition or quantum entanglement.
All problems which can be solved on a quantum computer can be solved on a classical computer. In particular, problems which are undecidable using classical computers remain undecidable using quantum computers. What makes quantum algorithms interesting is that they might be able to solve some problems faster than classical algorithms.
The most well known algorithms are Shor's algorithm for factoring, and Grover's algorithm for searching an unstructured database or an unordered list. Shor's algorithms runs exponentially faster than the best known classical algorithm for factoring, the general number field sieve. Grover's algorithm runs quadratically faster than the best possible classical algorithm for the same task.
- 1 Overview
- 2 Algorithms based on the quantum Fourier transform
- 3 Algorithms based on amplitude amplification
- 4 Algorithms based on quantum walks
- 5 BQP-complete problems
- 6 See also
- 7 References
- 8 External links
Quantum algorithms are usually described, in the commonly used circuit model of quantum computation, by a quantum circuit which acts on some input qubits and terminates with a measurement. A quantum circuit consists of simple quantum gates which act on at most a fixed number of qubits, usually 2 or 3. Quantum algorithms may also be stated in other models of quantum computation, such as the Hamiltonian oracle model.
Quantum algorithms can be categorized by the main techniques used by the algorithm. Some commonly used techniques/ideas in quantum algorithms include phase kick-back, phase estimation, the quantum Fourier transform, quantum walks, amplitude amplification and topological quantum field theory. Quantum algorithms may also be grouped by the type of problem solved, for instance see the survey on quantum algorithms for algebraic problems.
Algorithms based on the quantum Fourier transform
The quantum Fourier transform is the quantum analogue of the discrete Fourier transform, and is used in several quantum algorithms. The Hadamard transform is also an example of a quantum Fourier transform over an n-dimensional vector space over the field F2. The quantum Fourier transform can be efficiently implemented on a quantum computer using only a polynomial number of quantum gates.
The Deutsch–Jozsa algorithm solves a black-box problem which probably requires exponentially many queries to the black box for any deterministic classical computer, but can be done with exactly 1 query by a quantum computer. If we allow both bounded-error quantum and classical algorithms, then there is no speedup since a classical probabilistic algorithm can solve the problem with a constant number of queries with small probability of error. The algorithm determines whether a function f is either constant (0 on all inputs or 1 on all inputs) or balanced (returns 1 for half of the input domain and 0 for the other half).
Simon's algorithm solves a black-box problem exponentially faster than any classical algorithm, including bounded-error probabilistic algorithms. This algorithm, which achieves an exponential speedup over all classical algorithms that we consider efficient, was the motivation for Shor's factoring algorithm.
Quantum phase estimation algorithm
Shor's algorithm solves the discrete logarithm problem and the integer factorization problem in polynomial time, whereas the best known classical algorithms take super-polynomial time. These problems are not known to be in P or NP-complete. It is also one of the few quantum algorithms that solves a non–black-box problem in polynomial time where the best-known classical algorithms run in super-polynomial time.
Hidden subgroup problem
The abelian hidden subgroup problem is a generalization of many problems that can be solved by a quantum computer, such as Simon's problem, solving Pell's equation, testing the principal ideal of a ring R and factoring. There are efficient quantum algorithms known for the Abelian hidden subgroup problem. The more general hidden subgroup problem, where the group isn't necessarily abelian, is a generalization of the previously mentioned problems and graph isomorphism and certain lattice problems. Efficient quantum algorithms are known for certain non-abelian groups. However, no efficient algorithms are known for the symmetric group, which would give an efficient algorithm for graph isomorphism and the dihedral group, which would solve certain lattice problems.
Estimating Gauss sums
A Gauss sum is a type of exponential sum. The best known classical algorithm for estimating these sums takes exponential time. Since the discrete logarithm problem reduces to Gauss sum estimation, an efficient classical algorithm for estimating Gauss sums would imply an efficient classical algorithm for computing discrete logarithms, which is considered unlikely. However, quantum computers can estimate Gauss sums to polynomial precision in polynomial time.
Fourier fishing and Fourier checking
We have an oracle consisting of n random Boolean functions mapping n-bit strings to a Boolean value. We are required to find n n-bit strings z1,..., zn such that for the Hadamard-Fourier transform, at least 3/4 of the strings satisfy
and at least 1/4 satisfies
Algorithms based on amplitude amplification
Amplitude amplification is a technique that allows the amplification of a chosen subspace of a quantum state. Applications of amplitude amplification usually lead to quadratic speedups over the corresponding classical algorithms. It can be considered to be a generalization of Grover's algorithm.
Grover's algorithm searches an unstructured database (or an unordered list) with N entries, for a marked entry, using only queries instead of the Ω(N) queries required classically. Classically, Ω(N) queries are required, even if we allow bounded-error probabilistic algorithms.
Quantum counting solves a generalization of the search problem. It solves the problem of counting the number of marked entries in an unordered list, instead of just detecting if one exists. Specifically, it counts the number of marked entries in an -element list, with error making only queries, where is the number of marked elements in the list. More precisely, the algorithm outputs an estimate for , the number of marked entries, with the following accuracy: .
Algorithms based on quantum walks
A quantum walk is the quantum analogue of a classical random walk, which can be described by a probability distribution over some states. A quantum walk can be described by a quantum superposition over states. Quantum walks are known to give exponential speedups for some black-box problems. They also provide polynomial speedups for many problems. A framework for the creation quantum walk algorithms exists and is quite a versatile tool.
Element distinctness problem
The element distinctness problem is the problem of determining whether all the elements of a list are distinct. Classically, Ω(N) queries are required for a list of size N, since this problem is harder than the search problem which requires Ω(N) queries. However, it can be solved in queries on a quantum computer. The optimal algorithm is by Andris Ambainis. Scott Aaronson and Yaoyun Shi first proved a tight lower bound for a large but restricted class of functions. Ambainis and Kutin independently (and via different proofs) extended their work to obtain the lower bound for all functions.
The triangle-finding problem is the problem of determining whether a given graph contains a triangle (a clique of size 3). The best-known lower bound for quantum algorithms is Ω(N), but the best algorithm known requires O(N1.297) queries, an improvement over the previous best O(N1.3) queries.
A formula is a tree with a gate at each internal node and an input bit at each leaf node. The problem is to evaluate the formula, which is the output of the root node, given oracle access to the input.
A well studied formula is the balanced binary tree with only NAND gates. This type of formula requires Θ(Nc) queries using randomness (where ), but can be solved in Θ(N0.5) queries by a quantum algorithm. No better quantum algorithm for this case was known until one was found for the unconventional Hamiltonian oracle model. The same result for the standard setting soon followed.
Fast quantum algorithms for more complicated formulas are also known.
The problem is to determine if a black box group, given by k generators, is commutative. A black box group is a group with an oracle function, which must be used to perform the group operations (multiplication, inversion, and comparison with identity). We are interested in the query complexity, which is the number of oracle calls needed to solve the problem. The deterministic and randomized query complexities are and respectively. A quantum algorithm requires queries but the best known algorithm uses queries.
Computing knot invariants
Witten had shown that the Chern-Simons topological quantum field theory (TQFT) can be solved in terms of Jones polynomials. A quantum computer can simulate a TQFT, and thereby approximate the Jones polynomial, which as far as we know, is hard to compute classically in the worst case scenario.
The idea that quantum computers might be more powerful than classical computers originated in Richard Feynman's observation that classical computers seem to require exponential time to simulate many-particle quantum systems. Since then, the idea that quantum computers can simulate quantum physical processes exponentially faster than classical computers has been greatly fleshed out and elaborated. Efficient (that is, polynomial-time) quantum algorithms have been developed for simulating both Bosonic and Fermionic systems and in particular, the simulation of chemical reactions beyond the capabilities of current classical supercomputers requires only a few hundred qubits. Quantum computers can also efficiently simulate topological quantum field theories. In addition to its intrinsic interest, this result has led to efficient quantum algorithms for estimating "quantum"[clarification needed] topological invariants such as Jones and HOMFLY  polynomials, and the Turaev-Viro invariant of three-dimensional manifolds.
- Nielsen, M.; Chuang, I. (2000). Quantum Computation and Quantum Information. Cambridge University Press. ISBN 0-521-63503-9.
- Mosca, M. (2008). "Quantum Algorithms". arXiv:0808.0369 [quant-ph].
- Farhi, E.; Goldstone, J.; Gutmann, S. (2007). "A Quantum Algorithm for the Hamiltonian NAND Tree". arXiv:quant-ph/0702144 [quant-ph].
- Childs, A. M.; van Dam, W. (2008). "Quantum algorithms for algebraic problems". Reviews of Modern Physics 82: 1–52. arXiv:0812.0380. Bibcode:2010RvMP...82....1C. doi:10.1103/RevModPhys.82.1.
- Shor, P. W. (1997). "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer". SIAM Journal on Scientific and Statistical Computing 26: 1484. arXiv:quant-ph/9508027. Bibcode:1995quant.ph..8027S.
- Boneh, D.; Lipton, R. J. (1995). "Quantum cryptoanalysis of hidden linear functions". In Coppersmith, D. Proceedings of the 15th Annual International Cryptology Conference on Advances in Cryptology. Springer-Verlag. pp. 424–437. ISBN 3-540-60221-6.
- Moore, C.; Russell, A.; Schulman, L. J. (2005). "The Symmetric Group Defies Strong Fourier Sampling: Part I". arXiv:quant-ph/0501056 [quant-ph].
- Regev, O. (2003). "Quantum Computation and Lattice Problems". arXiv:cs/0304005 [cs.DS].
- van Dam, W.; Seroussi, G. (2002). "Efficient Quantum Algorithms for Estimating Gauss Sums". arXiv:quant-ph/0207131 [quant-ph].
- Aaronson, S. (2009). "BQP and the Polynomial Hierarchy". arXiv:0910.4698 [quant-ph].
- Grover, L. K. (1996). "A fast quantum mechanical algorithm for database search". arXiv:quant-ph/9605043 [quant-ph].
- Brassard, G.; Hoyer, P.; Tapp, A. (1998). "Quantum Counting". arXiv:quant-ph/9805082 [quant-ph].
- Brassard, G.; Hoyer, P.; Mosca, M.; Tapp, A. (2000). "Quantum Amplitude Amplification and Estimation". arXiv:quant-ph/0005055 [quant-ph].
- Childs, A. M.; Cleve, R.; Deotto, E.; Farhi, E.; Gutmann, S.; Spielman, D. A. (2003). "Exponential algorithmic speedup by quantum walk". Proceedings of the 35th Symposium on Theory of Computing. Association for Computing Machinery. pp. 59–68. arXiv:quant-ph/0209131. doi:10.1145/780542.780552. ISBN 1-58113-674-9.
- Childs, A. M.; Schulman, L. J.; Vazirani, U. V. (2007). "Quantum Algorithms for Hidden Nonlinear Structures". Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science. IEEE. pp. 395–404. arXiv:0705.2784. doi:10.1109/FOCS.2007.18. ISBN 0-7695-3010-9.
- Magniez, F.; Nayak, A.; Roland, J.; Santha, M. (2007). "Search via quantum walk". Proceedings of the 39th Annual ACM Symposium on Theory of Computing. Association for Computing Machinery. pp. 575–584. doi:10.1145/1250790.1250874. ISBN 978-1-59593-631-8.
- Ambainis, A. (2007). "Quantum Walk Algorithm for Element Distinctness". SIAM Journal on Computing 37 (1): 210–239. doi:10.1137/S0097539705447311.
- Aaronson, S.; Shi, Y. (2004). "Quantum lower bounds for the collision and the element distinctness problems". Journal of the ACM 51 (4): 595–605. doi:10.1145/1008731.1008735.
- Ambainis, A. (2005). "Polynomial Degree and Lower Bounds in Quantum Complexity: Collision and Element Distinctness with Small Range". Theory of Computing 1 (1): 37–46. doi:10.4086/toc.2005.v001a003.
- Kutin, S. (2005). "Quantum Lower Bound for the Collision Problem with Small Range". Theory of Computing 1 (1): 29–36. doi:10.4086/toc.2005.v001a002.
- Aleksandrs Belovs (2011). "Span Programs for Functions with Constant-Sized 1-certificates". arXiv:1105.4024 [quant-ph].
- Magniez, F.; Santha, M.; Szegedy, M. (2007). "Quantum Algorithms for the Triangle Problem". SIAM Journal on Computing 37 (2): 413–424. doi:10.1137/050643684.
- Aaronson, S. (3 February 2007). "NAND now for something completely different". Shtetl-Optimized. Retrieved 2009-12-17.
- Saks, M.E.; Wigderson, A. (1986). "Probabilistic Boolean Decision Trees and the Complexity of Evaluating Game Trees". Proceedings of the 27th Annual Symposium on Foundations of Computer Science. IEEE. pp. 29–38. doi:10.1109/SFCS.1986.44. ISBN 0-8186-0740-8.
- Ambainis, A. (2007). "A nearly optimal discrete query quantum algorithm for evaluating NAND formulas". arXiv:0704.3628 [quant-ph].
- Reichardt, B. W.; Spalek, R. (2008). "Span-program-based quantum algorithm for evaluating formulas". Proceedings of the 40th Annual ACM symposium on Theory of Computing. Association for Computing Machinery. pp. 103–112. doi:10.1145/1374376.1374394. ISBN 978-1-60558-047-0.
- Pak, I.; Ashwin Nayak (2000). "Testing commutativity of a group and the power of randomization". arXiv:quant-ph/0506265 [quant-ph].
- Magniez, F.; Nayak, A. (2007). "Quantum Complexity of Testing Group Commutativity". Algorithmica 48 (3): 221–232. doi:10.1007/s00453-007-0057-8.
- Aharonov, D.; Jones, V.; Landau, Z. (2006). "A polynomial quantum algorithm for approximating the Jones polynomial". Proceedings of the 38th Annual ACM symposium on Theory of Computing. Association for Computing Machinery. pp. 427–436. doi:10.1145/1132516.1132579.
- Feynman, R. P. (1982). "Simulating physics with computers". International Journal of Theoretical Physics 21 (6–7): 467. Bibcode:1982IJTP...21..467F. doi:10.1007/BF02650179.
- Abrams, D. S.; Lloyd, S. (1997). "Simulation of many-body Fermi systems on a universal quantum computer". Physical Review Letters 79 (13): 2586–2589. arXiv:quant-ph/9703054. Bibcode:1997PhRvL..79.2586A. doi:10.1103/PhysRevLett.79.2586.
- Kassal, I.; Jordan, S. P.; Love, P. J.; Mohseni, M.; Aspuru-Guzik, A. (2008). "Polynomial-time quantum algorithm for the simulation of chemical dynamics". Proceedings of the National Academy of Sciences of the United States of America 105 (48): 18681–86. arXiv:0801.2986. Bibcode:2008PNAS..10518681K. doi:10.1073/pnas.0808245105. PMC 2596249. PMID 19033207.
- Freedman, M.; Kitaev, A.; Wang, Z. (2002). "Simulation of Topological Field Theories by Quantum Computers". Communications in Mathematical Physics 227 (3): 587–603. arXiv:quant-ph/0001071. Bibcode:2002CMaPh.227..587F. doi:10.1007/s002200200635.
- Aharonov, D.; Jones, V.; Landau, Z. (2009). "A polynomial quantum algorithm for approximating the Jones polynomial". Algorithmica 55 (3): 395–421. arXiv:quant-ph/0511096. doi:10.1007/s00453-008-9168-0.
- Wocjan, P.; Yard, J. (2008). "The Jones polynomial: quantum algorithms and applications in quantum complexity theory". Quantum Information and Computation 8 (1): 147–180. arXiv:quant-ph/0603069.
- Alagic, G.; Jordan, S.P.; König, R.; Reichardt, B. W. (2010). "Approximating Turaev-Viro 3-manifold invariants is universal for quantum computation". Physical Review A 82 (4): 040302. arXiv:1003.0923. Bibcode:2010PhRvA..82d0302A. doi:10.1103/PhysRevA.82.040302.
- The Quantum Algorithm Zoo: A comprehensive list of quantum algorithms that provide a speedup over the fastest known classical algorithms.
- Smith, J.; Mosca, M. (2012). "Algorithms for Quantum Computers". Handbook of Natural Computing. p. 1451. doi:10.1007/978-3-540-92910-9_43. ISBN 978-3-540-92909-3.
- Childs, A. M.; Van Dam, W. (2010). "Quantum algorithms for algebraic problems". Reviews of Modern Physics 82: 1. doi:10.1103/RevModPhys.82.1.