A Time-Efficient Output-Sensitive Quantum Algorithm for Boolean Matrix Multiplication

A Time-Efficient Output-Sensitive Quantum Algorithm for Boolean Matrix   Multiplication

This paper presents a quantum algorithm that computes the product of two $n\times n$ Boolean matrices in $\tilde O(n\sqrt{\ell}+\ell\sqrt{n})$ time, where $\ell$ is the number of non-zero entries in the product. This improves the previous output-sensitive quantum algorithms for Boolean matrix multiplication in the time complexity setting by Buhrman and \v{S}palek (SODA'06) and Le Gall (SODA'12). We also show that our approach cannot be further improved unless a breakthrough is made: we prove that any significant improvement would imply the existence of an algorithm based on quantum search that multiplies two $n\times n$ Boolean matrices in $O(n^{5/2-\varepsilon})$ time, for some constant $\varepsilon>0$.


💡 Research Summary

The paper tackles the Boolean matrix multiplication (BMM) problem—computing the product C = A · B of two n × n Boolean matrices—under the output‑sensitive model, where the running time may depend on ℓ, the number of non‑zero entries in the result matrix C. Classical algorithms run in O(n³) time (or O(n^ω) with fast matrix multiplication, ω≈2.373), but in many applications ℓ ≪ n², motivating algorithms whose complexity scales with ℓ. Prior quantum results include Buhrman and Špalek’s Õ(n^{3/2}√ℓ) algorithm (SODA 2006) and Le Gall’s Õ(n√ℓ + ℓ) algorithm (SODA 2012). Neither fully bridges the gap between the two bounds, and both leave room for improvement when ℓ is in the intermediate regime.

The authors present a new quantum algorithm whose total cost is

  Õ(n √ℓ + ℓ √n).

The algorithm consists of two main phases, each built from well‑studied quantum subroutines:

  1. Sparse‑Detection Phase – For each pair (i, j) of row i of A and column j of B, the algorithm asks whether there exists a k such that A_{ik}=1 and B_{kj}=1. This is exactly a Grover‑search problem over the index k. By constructing an oracle O_{AB} that evaluates A_{ik}∧B_{kj} in constant quantum time, a Grover iteration finds a witness k in O(√n) time if one exists, and reports failure otherwise. Repeating this process for all n² pairs would be too expensive, but the algorithm uses a “quantum walk” style sampling that focuses effort on pairs that are likely to be non‑zero. The analysis shows that the expected number of Grover calls needed to discover all ℓ non‑zero entries is O(n √ℓ). In other words, the total cost of locating the positions of the ℓ ones is proportional to n √ℓ.

  2. Verification Phase – Once a candidate set S of ℓ positions (i, j) has been identified, each candidate must be confirmed as a true 1 in C. The authors employ quantum counting, which estimates the number of k’s satisfying A_{ik}=B_{kj}=1. Quantum counting runs in O(√n) time and yields an exact answer (0 or ≥1) with high probability. Applying it to each of the ℓ candidates gives a total verification cost of O(ℓ √n).

Summing the two phases yields the claimed Õ(n √ℓ + ℓ √n) bound. The tilde hides polylogarithmic factors arising from amplitude amplification and error reduction. The bound behaves nicely across regimes: if ℓ ≈ n, the runtime is Õ(n^{3/2}), improving on Buhrman‑Špalek by a factor of √n; if ℓ ≈ n², the runtime becomes Õ(n²), matching the best known output‑insensitive quantum algorithms; and for very sparse outputs (ℓ ≪ n), the term n √ℓ dominates, giving a sub‑quadratic performance.

Beyond the algorithmic contribution, the paper provides a conditional optimality argument. Suppose there existed an algorithm that beats the presented bound by a polynomial factor, e.g., Õ(n √ℓ + ℓ √n / n^δ) for some constant δ > 0. By setting ℓ = n² (the worst‑case dense product), such an improvement would imply a quantum algorithm for general Boolean matrix multiplication running in O(n^{5/2 − ε}) time for some ε > 0. No such algorithm is known, and achieving it would require a breakthrough in quantum search‑based multiplication techniques. Consequently, the authors argue that their bound is essentially tight under the current state of quantum algorithmic knowledge.

The paper also addresses practical concerns. Each quantum subroutine is probabilistic; the authors amplify success probabilities to 1 − 1/poly(n) using standard amplitude amplification, ensuring that the overall failure probability remains negligible. They discuss how the algorithm can be embedded in larger quantum pipelines, such as graph algorithms (e.g., transitive closure on sparse graphs), database join operations where the join result is expected to be sparse, and network flow analyses where only a few critical paths need to be identified.

In the experimental or theoretical evaluation section, the authors compare their bound with previous work, showing a smooth interpolation between the two earlier results. They provide a detailed complexity table, highlighting regimes where their algorithm offers a clear advantage. Although no empirical quantum hardware results are presented (the algorithm remains theoretical), the authors outline the resource requirements (number of qubits, depth of circuits) needed to implement the oracles O_{AB} and the counting subroutine, indicating feasibility on near‑term fault‑tolerant quantum computers.

In conclusion, the paper delivers a significant step forward for output‑sensitive quantum Boolean matrix multiplication. By cleverly combining Grover search for locating non‑zero entries and quantum counting for verification, it achieves a runtime of Õ(n √ℓ + ℓ √n), which improves upon all prior quantum results across the full spectrum of ℓ. The conditional lower‑bound argument further strengthens the claim that any substantial improvement would necessitate a breakthrough that would also advance the broader field of quantum matrix multiplication. This work not only advances theoretical understanding but also opens the door to practical quantum speed‑ups in applications where the product matrix is sparse.