  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 1s
in the output, \ell. We prove an upper bound of O (n\sqrt{\ell}) 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 \eps < 1 and any \ell <= \eps
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.
