Consider the problem of evaluating an AND-OR formula on an N-bit black-box input. We present a bounded-error quantum algorithm that solves this problem in time $N^{1/2+o(1)}$. In particular, approximately balanced formulas can be evaluated in $O(\sqrt{N})$ queries, which is optimal. The idea of the algorithm is to apply phase estimation to a discrete-time quantum walk on a weighted tree whose spectrum encodes the value of the formula.

MSC codes

  1. 68Q10
  2. 81P68


  1. quantum computation
  2. quantum query complexity
  3. formula evaluation
  4. AND-OR trees
  5. quantum walk

Get full access to this article

View all available purchase options and get full access to this article.


A. Ambainis, A. M. Childs, F. Le Gall, and S. Tani, The quantum query complexity of certification, Quantum Information and Computation, to appear.
A. Ambainis, A. M. Childs, B. W. Reichardt, R. Špalek, and S. Zhang, Any AND-OR formula of size N can be evaluated in time $N^{1/2 + o(1)}$ on a quantum computer, in Proceedings of the 48th IEEE FOCS, 2007, pp. 363–372.
A. Ambainis, Polynomial degree vs. quantum query complexity, J. Comput. System Sci., 72 (2006), pp. 220–238.
A. Ambainis, A nearly optimal discrete query quantum algorithm for evaluating NAND formulas, arXiv quant-ph/0704.3628, 2007.
M. L. Bonet and S. R. Buss, Size-depth tradeoffs for Boolean formulae, Inform. Process. Lett., 49 (1994), pp. 151–155.
R. Beals, H. Buhrman, R. Cleve, M. Mosca, and R. de Wolf, Quantum lower bounds by polynomials, J. ACM, 48 (2001), pp. 778–797.
N. H. Bshouty, R. Cleve, and W. Eberly, Size-depth tradeoffs for algebraic formulas, SIAM J. Comput., 24 (1995), pp. 682–705.
H. Buhrman, R. Cleve, and A. Wigderson, Quantum vs. classical communication and computation, in Proceedings of the 30th ACM STOC, 1998, pp. 63–68.
H. Barnum and M. Saks, A lower bound on the quantum query complexity of read-once functions, J. Comput. System Sci., 69 (2004), pp. 244–258.
A. M. Childs, R. Cleve, S. P. Jordan, and D. Yeung, Discrete-query quantum algorithm for NAND trees, Theory of Computing, 5 (2009), pp. 119–123.
R. Cleve, A. Ekert, C. Macchiavello, and M. Mosca, Quantum algorithms revisited, Proc. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci., 454 (1969), pp. 339–354.
A. M. Childs, On the relationship between continuous- and discrete-time quantum walk, Commun. Math. Phys., to appear.
A. M. Childs, B. W. Reichardt, R. Špalek, and S. Zhang, Every NAND formula of size N can be evaluated in time $N^{1/2+o(1)}$ on a quantum computer, arXiv quant-ph/0703015, 2007.
E. Farhi, J. Goldstone, and S. Gutmann, A quantum algorithm for the Hamiltonian NAND tree, Theory Comput., 4 (2008), pp. 169–190.
L. K. Grover, A fast quantum mechanical algorithm for database search, Phys. Rev. Lett., 79 (1997), pp. 325–328.
L. K. Grover, Tradeoffs in the quantum search algorithm, arXiv quant-ph/0201152, 2002.
P. Høyer, M. Mosca, and R. de Wolf, Quantum search on bounded-error inputs, in Proceedings of the 30th ICALP, 2003, pp. 291–299. Lecture Notes in Comput. Sci. 2719, Springer, New York.
T. S. Jayram, R. Kumar, and D. Sivakumar, Two applications of information complexity, in Proceedings of the 35th ACM STOC, 2003, pp. 673–682.
A. R. Klivans, R. O'Donnell, and R. A. Servedio, Learning intersections and thresholds of halfspaces, J. Comput. System Sci., 68 (2004), pp. 808–840.
A. R. Klivans and R. A. Servedio, Learning DNF in time $2^{\tilde{O}(n^{1/3})}$ J. Comput. System Sci., 68 (2004), pp. 303–318.
A. Y. Kitaev, A. H. Shen, and M. N. Vyalyi, Classical and Quantum Computation, Grad. Stud. Math. 47, American Mathematical Society, Providence, RI, 2002.
S. Laplante, T. Lee, and M. Szegedy, The quantum adversary method and classical formula size lower bounds, Comput. Complexity, 15 (2006), pp. 163–196.
F. Magniez, A. Nayak, J. Roland, and M. Santha, Search via quantum walk, in Proceedings of the 39th ACM STOC, 2007, pp. 575–584.
R. O'Donnell and R. A. Servedio, New degree bounds for polynomial threshold functions, in Proceedings of the 35th ACM STOC, 2003, pp. 325–334.
B. W. Reichardt and R. Špalek, Span-program-based quantum algorithm for evaluating formulas, in Proceedings of the 40th ACM STOC, 2008, pp. 103–112.
M. Santha, On the Monte Carlo decision tree complexity of read-once formulae, Random Structures Algorithms, 6 (1995), pp. 75–87.
M. Snir, Lower bounds on probabilistic linear decision trees, Theoret. Comput. Sci., 38 (1985), pp. 69–82.
M. Saks and A. Wigderson, Probabilistic Boolean decision trees and the complexity of evaluating game trees, in Proceedings of the 27th IEEE FOCS, 1986, pp. 29–38.
M. Szegedy, Quantum speed-up of Markov chain based algorithms, in Proceedings of the 45th IEEE FOCS, 2004, pp. 32–41.

Information & Authors


Published In

cover image SIAM Journal on Computing
SIAM Journal on Computing
Pages: 2513 - 2530
ISSN (online): 1095-7111


Submitted: 2 January 2008
Accepted: 16 July 2009
Published online: 30 April 2010

MSC codes

  1. 68Q10
  2. 81P68


  1. quantum computation
  2. quantum query complexity
  3. formula evaluation
  4. AND-OR trees
  5. quantum walk



Metrics & Citations



If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited By







Copy the content Link

Share with email

Email a colleague

Share on social media

The SIAM Publications Library now uses SIAM Single Sign-On for individuals. If you do not have existing SIAM credentials, create your SIAM account https://my.siam.org.