, Volume 76, Issue 1, pp 1–16 | Cite as

Improving Quantum Query Complexity of Boolean Matrix Multiplication Using Graph Collision

  • Stacey Jeffery
  • Robin Kothari
  • François Le Gall
  • Frédéric Magniez


The quantum query complexity of Boolean matrix multiplication is typically studied as a function of the matrix dimension, \(n\), as well as the number of \(1\)s in the output, \(\ell \). We prove an upper bound of \(\widetilde{\hbox {O}}(n\sqrt{\ell +1})\) for all values of \(\ell \). This is an improvement over previous algorithms for all values of \(\ell \). On the other hand, we show that for any \(\varepsilon < 1\) and any \(\ell \le \varepsilon n^2\), there is an \(\Omega (n\sqrt{\ell })\) lower bound for this problem, showing that our algorithm is essentially tight. We first reduce Boolean matrix multiplication to several instances of graph collision. We then provide an algorithm that takes advantage of the fact that the underlying graph in all of our instances is very dense to find all graph collisions efficiently. Using similar ideas, we also show that the time complexity of Boolean matrix multiplication is \(\tilde{O}(n\sqrt{\ell +1}+\ell \sqrt{n})\).


Quantum algorithms Boolean matrix multiplication Query complexity 


  1. 1.
    Ambainis, A.: Quantum walk algorithm for element distinctness. In: Proceedings of the 45th IEEE Symposium on Foundations of Computer Science, pp. 22–31 (2004)Google Scholar
  2. 2.
    Amossen, R.R., Pagh, R: Faster join-projects and sparse matrix multiplications. In: Proceedings of Database Theory—ICDT, pp. 121–126 (2009)Google Scholar
  3. 3.
    Bennett, C.H., Bernstein, E., Brassard, G., Vazirani, U.: Strengths and weaknesses of quantum computing. SIAM J. Comput. 26, 1510–1523 (1997). (special issue on quantum computing)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Beals, R., Buhrman, H., Cleve, R., Mosca, M., de Wolf, R.: Quantum lower bounds by polynomials. J. ACM 48, 778–797 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Boyer, M., Brassard, G., Høyer, P., Tapp, A.: Tight bounds on quantum searching. Fortschr. der Phys. 46(4–5), 493–505 (1998)CrossRefGoogle Scholar
  6. 6.
    Belovs, A.: Span programs for functions with constant-sized 1-certificates: extended abstract. In: Proceedings of the 44th Symposium on Theory of Computing Conference, pp. 77–84 (2012)Google Scholar
  7. 7.
    Buhrman, H., Špalek, R.: Quantum verification of matrix products. In: Proceedings of the 17th ACM-SIAM Symposium On Discrete Algorithms, pp. 880–889 (2006)Google Scholar
  8. 8.
    Bansal, N., Williams, R.: Regularity lemmas and combinatorial algorithms. In: Proceedings of the 50th Annual IEEE Symposium on Foundations of Computer Science, pp. 745–754 (2009)Google Scholar
  9. 9.
    Childs, A., Kimmel, S., Kothari, R.: The quantum query complexity of read-many formulas. Technical Report arXiv:1112.0548v1, arXiv (2011)
  10. 10.
    Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symb. Comput. 9(3), 251–280 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Dürr, C., Høyer, P.: A quantum algorithm for finding the minimum. Technical Report arXiv:quant-ph/9607014v2, arXiv (1996)
  12. 12.
    Dürr, C., Heiligman, M., Høyer, P., Mhalla, M.: Quantum query complexity of some graph problems. SIAM J. Comput. 35(6), 1310–1328 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Dor, D., Halperin, S., Zwick, U.: All-pairs almost shortest paths. SIAM J. Comput. 29(5), 1740–1759 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Fischer, M.J., Meyer, A.R.: Boolean matrix multiplication and transitive closure. In: Proceedings of the 12th Annual Symposium on Switching and Automata Theory, pp. 129–131 (1971)Google Scholar
  15. 15.
    Furman, M.E.: Application of a method of fast multiplication of matrices in the problem of finding the transitive closure of a graph. Sov. Math. Dokl. 11(5), 1252 (1970)MathSciNetzbMATHGoogle Scholar
  16. 16.
    Galil, Z., Margalit, O.: All pairs shortest distances for graphs with small integer length edges. Inf. Comput. 134(2), 103–139 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Proceedings of the 28th ACM Symposium on Theory of Computing, pp. 212–219 (1996)Google Scholar
  18. 18.
    Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. SIAM J. Comput. 7(4), 413–423 (1978)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Jeffery, S., Kothari, R., Magniez, F.: Improving quantum query complexity of boolean matrix multiplication using graph collision. In: Proceedings of 39th International Colloquium on Automata, Languages and Programming, pp. 522–532 (2012)Google Scholar
  20. 20.
    Le Gall, F.: Improved output-sensitive quantum algorithms for Boolean matrix multiplication. In: Proceedings of the 23rd ACM-SIAM Symposium On Discrete Algorithms, pp. 1464–1476 (2012)Google Scholar
  21. 21.
    Le Gall, F.: A time-efficient output-sensitive quantum algorithm for Boolean matrix multiplication. In: Proceedings of the 23rd International Symposium on Algorithms and Computation, pp. 639–648 (2012)Google Scholar
  22. 22.
    Lingas, A.: A fast output-sensitive algorithm for Boolean matrix multiplication. Algorithmica 61(1), 36–50 (2011)Google Scholar
  23. 23.
    Lee, T., Mittal, R., Reichardt, B.W., Spalek, R., Szegedy, M.: Quantum query complexity of state conversion. In: 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pp. 344–353 (2011)Google Scholar
  24. 24.
    Lee, T., Magniez, F., Santha, M.: Improved quantum query algorithms for triangle finding and associativity testing. In: Proceedings of the 24th ACM-SIAM Symposium On Discrete Algorithms (SODA 2013), pp. 1486–1502 (2013)Google Scholar
  25. 25.
    Magniez, F., Santha, M., Szegedy, M.: Quantum algorithms for the triangle problem. SIAM J. Comput. 37(2), 413–424 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Munro, I.J.: Efficient determination of the transitive closure of a directed graph. Inf. Process. Lett. 1(2), 56–58 (1971)MathSciNetCrossRefzbMATHGoogle Scholar
  27. 27.
    Rytter, W.: Fast recognition of pushdown automaton and context-free languages. Inf. Control 67(1–3), 12–22 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  28. 28.
    Seidel, R.: On the all-pairs-shortest-path problem in unweighted undirected graphs. J. Comput. Syst. Sci. 51(3), 400–403 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26, 1484–1509 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  30. 30.
    Shoshan, A., Zwick, U.: All pairs shortest paths in undirected graphs with integer weights. In: Proceedings of the 40th Annual Symposium on Foundations of Computer Science, pp. 605–615 (1999)Google Scholar
  31. 31.
    Valiant, L.G.: General context-free recognition in less than cubic time. J. Comput. Syst. Sci. 10(2), 308–315 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  32. 32.
    Vassilevska Williams, V.: Multiplying matrices faster than Coppersmith-Winograd. In: Proceedings of the 44th ACM Symposium on Theory of Computing, pp. 887–898 (2012)Google Scholar
  33. 33.
    Vassilevska Williams, V., Williams, R.: Sub-cubic equivalences between path, matrix and triangle problems. In: Proceedings of the 51st IEEE Symposium on Foundations of Computer Science, pp. 645–654 (2010)Google Scholar

Copyright information

© Springer Science+Business Media New York 2015

Authors and Affiliations

  • Stacey Jeffery
    • 1
    • 2
  • Robin Kothari
    • 1
    • 2
  • François Le Gall
    • 3
  • Frédéric Magniez
    • 4
  1. 1.David R. Cheriton School of Computer ScienceUniversity of WaterlooWaterlooCanada
  2. 2.Institute for Quantum ComputingUniversity of WaterlooWaterlooCanada
  3. 3.Graduate School of Information Science and TechnologyThe University of TokyoTokyoJapan
  4. 4.Univ Paris Diderot, Sorbonne Paris-CitéParisFrance

Personalised recommendations