FeynmanDD: Quantum Circuit Analysis with Classical Decision Diagrams

Ziyuan Wang, Bin Cheng, Longxiang Yuan, Zhengfeng Ji

Abstract

Classical simulation of quantum circuits is a fundamental challenge due to the exponential growth of the state space. FeynmanDD introduces a paradigm shift by reframing quantum simulation and equivalence checking as a classical counting problem. By applying standard Binary Decision Diagrams (BDDs) to the Feynman path integral formulation, FeynmanDD bypasses the limitations of traditional state-vector compression. This approach enables orders-of-magnitude speedups in amplitude computation and scales to thousands of qubits for specific benchmarks, demonstrating the power of mature classical verification tools in the quantum domain.

Introduction

Simulating quantum circuits on classical hardware is notoriously difficult because quantum states grow exponentially with the number of qubits. Most existing decision-diagram-based simulators use a "Schrödinger-style" approach, attempting to compress the massive quantum state vector directly. However, this often requires specialized, non-standard BDD variants to handle complex-valued amplitudes and intricate patterns.

The authors of FeynmanDD propose a different strategy: utilizing standard, classical BDD packages—the same tools used for decades in hardware verification—to simulate quantum circuits. Instead of state-vector evolution, they utilize the Feynman path integral, which represents the output of a circuit as a massive sum of paths.

Methods

The core of FeynmanDD is a three-step pipeline that transforms quantum mechanics into a combinatorial counting problem:

  1. Sum-of-Powers (SOP) Representation: The circuit is converted into a multilinear polynomial. For many common gate sets (like Clifford+T), matrix elements are represented as powers of a root of unity (e.g., $(-1)^f$ or $\omega^f$).
  2. Binary Synthesis: To build the BDD representation without memory blowup, a recursive "binary synthesis" method partitions terms into groups, builds sub-BDDs, and combines them.
  3. Counting as Simulation: Once the BDD is constructed, calculating a quantum amplitude becomes a matter of counting variable assignments that lead to specific values in the polynomial. BDDs can perform this counting in time linear to the number of nodes.
Quantum circuit represented as a sum of paths with variables assigned to gate inputs and outputs.

To maintain efficiency, the researchers introduced variable ordering heuristics (Qubit Order, Gate Order, and Tensor Order), as BDD performance is highly sensitive to the order in which variables are processed.

Key Insights

  • The Counting Connection: FeynmanDD exploits the deep theoretical link between quantum complexity (BQP) and counting complexity (#P) by using BDDs for their primary strength: counting solutions to Boolean-like functions.
  • Algebraic Pre-processing: Simplifying the polynomial algebraically through variable substitution and contraction before generating the BDD significantly reduces the resulting data structure size.
  • Classical Tools for Quantum Problems: By using the well-established CUDD library, FeynmanDD benefits from decades of optimization in classical Electronic Design Automation (EDA) tools.
A CNOT gate identity used for circuit simplification and equivalence checking.

Key Results

FeynmanDD was evaluated against state-of-the-art simulators (DDSIM, SliQSim) and equivalence checkers (MQT-QCEC) across various benchmarks:

  • Amplitude Computation: On Google supremacy circuits, FeynmanDD computed amplitudes for 25-qubit circuits in just 0.04 seconds, while other simulators took over 100 seconds or timed out.
  • Scalability: In Bernstein-Vazirani (BV) tests, FeynmanDD handled up to 10,000 qubits for amplitude computation in approximately 24 seconds.
  • Equivalence Checking: The tool proved highly effective at functional verification, significantly outperforming MQT-QCEC on GHZ and linear-network benchmarks with sub-second completion times.
  • Memory Efficiency: Despite the complexity of the tasks, FeynmanDD rarely exceeded 1 GB of memory usage, making it viable for standard workstations.

Conclusion and Future Work

While FeynmanDD is exceptionally fast at computing single amplitudes, its performance in "weak simulation" (sampling) is currently slower due to quadratic complexity relative to BDD size. Future work includes optimizing for arbitrary single-qubit rotations, exploring multi-core BDD packages like Sylvan for parallelism, and investigating BDD-based approximation techniques to scale to noisier, larger-scale quantum systems.

Summary updated

BibTeX
@inproceedings{wang2025feynmandd,
  author = {Ziyuan Wang and Bin Cheng and Longxiang Yuan and Zhengfeng Ji},
  title = {{FeynmanDD: Quantum Circuit Analysis with Classical Decision Diagrams}},
  booktitle = {CAV},
  year = {2025},
  doi = {10.1007/978-3-031-98685-7\_2},
}
Figure