NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Quantum circuits for OR and AND of ORs

Howard Barnum, H. J. Bernstein, Lee SpectorJournal of Physics A Mathematical and General 2000

TL;DR

This paper presents the first quantum circuits capable of computing the logical OR of a function's outputs with a single query, achieving a speedup over classical methods. This work completes the set of fundamental logical operations (OR and XOR) for which quantum computation offers a demonstrable advantage in this simplified setting.

What Problem Does This Paper Address?

The paper tackles the problem of evaluating Boolean properties of black-box functions using quantum computation. Specifically, it focuses on the "OR" operation for a function $f$ that takes a single bit as input and outputs a single bit ($f: \{0, 1\} \to \{0, 1\}$). The goal is to determine if $f(0)$ OR $f(1)$ is true. Classically, to be certain of the OR result, one might need to evaluate the function for both inputs ($f(0)$ and $f(1)$). The paper investigates whether quantum mechanics allows us to determine $f(0) \lor f(1)$ more efficiently, specifically with a single query to the function's quantum equivalent. This is a fundamental question in understanding the power of quantum computation for simple logical tasks.

Methods

The authors employ a combination of quantum circuit design and genetic programming (GP) to discover and optimize quantum algorithms.

  • Quantum Circuit Design: They construct specific sequences of quantum gates (Hadamard, controlled-NOT, rotations, and a custom "ORACLE" gate that applies the black-box function) to perform the computation. The key is to manipulate quantum states (superpositions and entanglement) to extract information about the function $f$.
  • Genetic Programming (GP): For more complex problems (like the AND/OR tree), GP is used to evolve populations of quantum circuits. This involves randomly mutating, recombining, and selecting circuits based on their performance (e.g., minimizing error probability). The paper mentions that the OR circuits were derived by simplifying larger circuits found via GP.
  • Analysis of Error Probabilities: A crucial aspect is the detailed analysis of error probabilities ($p_{max}$) for their circuits. They compare these probabilities to classical limits to demonstrate a quantum advantage. They also analyze the role of "global phase" in quantum algorithms, which can be a hindrance in some cases but is utilized constructively in their OR algorithm.

Datasets

Not discussed in the paper. The "datasets" in this context are the possible black-box functions $f$ themselves, which are not treated as datasets in the traditional machine learning sense but rather as abstract inputs to the quantum algorithms.

Key Insights and Ideas

  • Completing the Set of Quantum Speedups: The paper establishes that OR, alongside XOR (parity), represents the full set of fundamental logical connectives (up to relabeling) for which a single-query quantum speedup is possible for a one-bit black-box function.
  • Constructive Use of Phase Information: Unlike some quantum algorithms where global phase can be problematic (e.g., nesting PARITY algorithms), the authors show how phase information, which is irrelevant for classical OR or quantum PARITY, can be constructively used in their OR circuit. This phase information allows for interference that helps determine the OR result.
  • Better-than-Classical Performance: The developed circuits achieve a lower error probability ($p_{max}$) than any possible classical circuit for the same task with a single query.
  • Connection to Deutsch's PARITY Algorithm: The OR algorithm shares significant similarities with Deutsch's original quantum algorithm for PARITY, highlighting how subtle changes in measurement strategy can lead to different computational goals.
  • Foundation for More Complex Problems: The OR circuit is presented as a subroutine that can be part of more complex quantum algorithms, such as those for evaluating AND/OR trees, suggesting its utility beyond this basic logical operation.

Key Results

  • Quantum Circuit for OR: The paper presents a quantum circuit that computes $f(0) \lor f(1)$ with a single query to the black-box function $f$.
  • Error Probability: The proposed OR circuit achieves an error probability ($p_{max}$) that is better than classical limits. For one specific version, $p_{max} < 1/6$ (two-sided error) with one query, which is better than the classical requirement of $p_{max} < 1/3$.
  • AND/OR$_2$ Algorithm: A more complex algorithm for a depth-two AND/OR tree is also presented, demonstrating error probabilities that are constant on orbits of the automorphism group of the property, and also showing a speedup over classical methods.

Limitations and Future Work

  • Error vs. Exactness: The OR circuits presented are Monte Carlo algorithms, meaning they have a non-zero error probability. While better than classical, they are not exact. The paper notes that exact one-query routines are not possible for OR.
  • Scalability of AND/OR Trees: While the paper provides circuits for depth-one and depth-two AND/OR problems, the scalability of these circuits to larger AND/OR trees remains an open question. The authors suggest that controlling the flow of phase information from lower-level recursive calls to higher-level ones is a significant challenge for building scalable algorithms.
  • Integration of Phase Information: The paper highlights that integrating phase information from different oracle calls is a complex task that their current work doesn't fully address, but it's crucial for building more sophisticated quantum algorithms.
  • Future Directions: The authors suggest that their work might provide clues for constructing scalable algorithms for families of properties like alternating binary AND/OR trees. They also point out the need for careful control of phase information flow for recursive quantum algorithms.

Summary updated

BibTeX
@article{barnum2000quantum,
  author = {Howard Barnum and H. J. Bernstein and Lee Spector},
  title = {{Quantum circuits for OR and AND of ORs}},
  journal = {Journal of Physics A Mathematical and General},
  year = {2000},
  doi = {10.1088/0305-4470/33/45/304},
}
Figure