Shallow Quantum Circuit Implementation of Symmetric Functions with Limited Ancillary Qubits

Wei Zi, Junhong Nie, Xiaoming SunIEEE TCAD 2024

TL;DR

This paper introduces a novel method for implementing symmetric Boolean functions—where the output depends only on the number of 1s in the input—using quantum circuits that are both "shallow" (low depth) and "slim" (low ancilla count). By combining phase estimation techniques with clever use of "borrowed" qubits and higher-energy qutrit states, the authors achieve a poly-logarithmic circuit depth of $O(\log^2 n)$ using only $O(\log n)$ extra qubits, or even just a single extra qutrit.

What Problem Does This Paper Address?

In the current "Noisy Intermediate-Scale Quantum" (NISQ) era, researchers face a constant tug-of-war between circuit depth (how many sequential operations you perform before noise ruins the calculation) and ancilla count (the number of extra "workspace" qubits required).

Symmetric functions are a fundamental building block in quantum computing, appearing in everything from quantum machine learning to Grover’s search algorithm oracles. Historically, you had to pick your poison: you could have a very shallow circuit that required a massive number of extra qubits ($O(n)$ or more), or a circuit with no extra qubits that was painfully slow ($O(n^2)$ depth). This paper aims to break that trade-off, providing a high-speed implementation that fits within a very tight memory budget.

Methods

The authors' approach relies on two primary innovations:

  1. An Efficient Hamming Weight Circuit: The core of any symmetric function is calculating the Hamming weight (the count of 1s in a bitstring). The authors design a circuit that uses a "fan-out" architecture to encode the Hamming weight into the phases of a few target qubits. By applying an Inverse Quantum Fourier Transform ($QFT^\dagger$), they move this information from the phase into the computational basis ($|0\rangle$ and $|1\rangle$ states) without needing any intermediate ancilla qubits for the count itself.
  2. The "Borrowed" Qubit Strategy: Once the Hamming weight is calculated and stored in $\lceil \log(n+1) \rceil$ clean ancilla qubits, the original $n$ input qubits are essentially "idle." The authors treat these original qubits as borrowed ancilla—workspace that can be in any state, as long as it is returned to its original state by the end of the operation. This allows them to implement complex logic gates (using the Exclusive-or Sum-Of-Products, or ESOP, form) with very low overhead.
  3. Qutrit Leveraging: By moving from qubits (2 levels) to qutrits (3 levels), the authors use the third energy level ($|2\rangle$) to store "garbage" information or intermediate carries. This effectively turns every qubit into its own workspace, reducing the total external ancilla requirement to just one.

Datasets

As this is a theoretical paper focused on quantum circuit complexity and architecture, no external datasets were used. The authors evaluate their methods using mathematical proofs of complexity classes and numerical simulations of circuit depth for input sizes ranging from $n=31$ to $n=4095$.

Key Insights and Ideas

  • Phase as a Workspace: The most striking "aha moment" is using the Phase Estimation Algorithm (PEA) logic to compute Hamming weight. Instead of using traditional adders that require many carry qubits, they "hide" the counting math in the phase of the qubits and then "extract" it at the end.
  • Symmetry as a Shortcut: Because the function only cares about the count of 1s, the authors can compress an $n$-bit input problem into a $\log n$-bit logic problem.
  • Parallelization via Fan-out: The use of quantum fan-out gates allows them to perform operations on many qubits simultaneously, which is the key to achieving $O(\log^2 n)$ depth rather than linear or quadratic depth.

Key Results

  • State-of-the-Art Efficiency: The proposed circuit achieves a depth of $O(\log^2 n)$ with only $\lceil \log(n+1) \rceil$ clean ancilla qubits. For context, previous work with similar depth required $O(n \log^2 n)$ borrowed ancilla.
  • The Qutrit Advantage: They proved that in a qutrit system, any symmetric function can be implemented in $O(\log^2 n)$ depth with exactly one ancillary qutrit.
  • Concrete Scaling: For a 1023-qubit symmetric function, their method requires only 10 ancillary qubits and reaches a depth of roughly 5378 gates (Table III). While this sounds high, it is significantly lower than the millions of gates required by older $O(n^2)$ methods.

Limitations and Future Work

  • Asymptotic Optimality: While $O(\log^2 n)$ is a massive improvement, the authors note that the theoretical "holy grail" is $O(\log n)$ depth. It remains an open question whether this can be achieved without blowing up the ancilla count.
  • Fault Tolerance: The paper focuses on the logical gate level. Future work is needed to see how these circuits perform when mapped to specific fault-tolerant architectures, like surface codes, where "fan-out" operations might have different costs.
  • Beyond Symmetry: The techniques used here—specifically the phase-based Hamming weight calculation—might be applicable to non-symmetric functions that have "near-symmetric" properties, which could broaden the impact of the research.

Summary updated

Abstract

In quantum computation, optimizing depth and number of ancillary qubits in quantum circuits is crucial due to constraints imposed by current quantum devices. This paper presents an innovative approach to implementing arbitrary symmetric Boolean functions using poly-logarithmic depth quantum circuits with logarithmic number of ancillary qubits. Symmetric functions are those whose outputs rely solely on the Hamming weight of the inputs. These functions find applications across diverse domains, including quantum machine learning, arithmetic circuit synthesis, and quantum algorithm design (e.g., Grover's algorithm). Moreover, by fully leveraging the potential of qutrits (an additional energy level), the ancilla count can be further reduced to 1. The key technique involves a novel poly-logarithmic depth quantum circuit designed to compute Hamming weight without the need for ancillary qubits. The quantum circuit for Hamming weight is of independent interest because of its broad applications, such as quantum memory and quantum machine learning.
BibTeX
@article{zi2024shallow,
  author = {Wei Zi and Junhong Nie and Xiaoming Sun},
  title = {{Shallow Quantum Circuit Implementation of Symmetric Functions with Limited Ancillary Qubits}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2024},
}
Figure