An adaptive algorithm for quantum circuit simulation

Roman Schutski, Danil Lykov, Ivan V. OseledetsarXiv 2019

Abstract

Classical simulation of quantum circuits often faces a choice between memory-intensive full-state methods and time-intensive single-amplitude methods. This paper introduces an adaptive algorithm that bridges this gap by leveraging graph theory—specifically chordal graphs and tree decomposition. By enabling the efficient simulation of "batches" of amplitudes, the proposed method allows for a flexible trade-off between available memory and computation time, facilitating the study of quantum circuits beyond the reach of traditional full-state simulators.

Introduction

The classical simulation of quantum circuits is a fundamental computational bottleneck in the development and verification of quantum hardware. Currently, researchers typically rely on two extreme approaches: full-state simulation, which calculates the entire probability distribution but is limited by exponential memory growth (hitting a "memory wall" around 50 qubits), and single-amplitude simulation, which is memory-efficient but prohibitively slow for sampling multiple outcomes.

There exists a significant middle ground where researchers need probabilities for a specific subset of bitstrings. This paper addresses the lack of a unified, adaptive approach capable of simulating arbitrary batches of amplitudes without the overhead of a full-state vector.

Methodology: Graph-Based Tensor Contraction

The core of the proposed algorithm treats quantum circuit simulation as a tensor network contraction problem. The circuit is mapped to a graphical model where qubits serve as nodes and gates are represented as cliques (fully connected subgraphs).

Graph representation of a quantum circuit where nodes represent qubit states and edges represent gate operations.

The technical innovation lies in finding a restricted elimination order. In standard variable elimination, the computational cost is determined by the "treewidth" (the size of the largest intermediate tensor created). To simulate a batch of $c$ qubits, these specific qubits must be eliminated last. While forcing an elimination order typically increases treewidth and computational cost, the authors utilize chordal graphs to maintain efficiency. By applying a modified Restricted Maximum Cardinality Search (MCS) algorithm, they transform an optimal unrestricted order into a restricted one that preserves the minimal treewidth while keeping target qubits at the end of the sequence.

Evaluation and Results

The algorithm was evaluated using Random Quantum Circuits (RQC) benchmarks, including grid sizes of $7 \times 7$ (49 qubits), $8 \times 8$ (64 qubits), and $9 \times 9$ (81 qubits) at depths of approximately 25 layers.

Key results include:

  • Significant Speedup: Batch simulation drastically reduces the total number of floating-point operations (FLOPs) compared to calculating amplitudes individually. For large circuits, the cost per amplitude drops significantly as batch size increases.
  • Memory-Time Trade-off: A clear trade-off exists; while batching saves time, it increases memory requirements for storing intermediate "clique" tensors.
  • Scalability: The algorithm successfully simulates subsets of amplitudes for 81-qubit circuits, a regime where full-state simulators would require petabytes of RAM.

Key Insights: The Efficiency of Batching

A central finding is that "batching is cheap." As long as the number of qubits in a batch is smaller than the overall treewidth of the circuit, calculating all amplitudes in that batch costs nearly the same as calculating a single amplitude.

Illustration of the elimination process reducing a complex circuit graph to a final clique of target qubits for batch simulation.

This reinforces treewidth as the fundamental measure of simulation hardness. By connecting quantum simulation to mature graph algorithms from Bayesian network literature, the authors provide a robust framework for manipulating circuit graphs to keep treewidth low and simulations tractable.

Conclusion and Future Work

While the current algorithm provides a powerful sequential framework for adaptive simulation, it remains memory-bound, with performance often limited by data movement rather than raw calculation speed. Future work will focus on parallelization strategies for high-performance computing (HPC) clusters and optimizing operation scheduling for heterogeneous memory architectures, such as GPU memory and system RAM.

Summary updated

BibTeX
@misc{schutski2019adaptive,
  author = {Roman Schutski and Danil Lykov and Ivan V. Oseledets},
  title = {{An adaptive algorithm for quantum circuit simulation}},
  year = {2019},
  eprint = {1911.12242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.12242},
}
Figure