Memory-Efficient Quantum Circuit Simulation by Using Lossy Data Compression

Xin-Chuan Wu, Sheng Di, Franck Cappello, Hal Finkel, Yuri Alexeev, Frederic T. ChongarXiv 2018

TL;DR

Classical simulation of quantum circuits is severely bottlenecked by the exponential memory required to store quantum state amplitudes. By dividing the state vector into slices and applying lossy data compression, this paper demonstrates that researchers can trade computation time for memory space, enabling the simulation of up to 63 qubits on existing supercomputers.

What Problem Does This Paper Address?

To develop, debug, and validate new quantum algorithms, researchers rely heavily on classical computer simulations. "Full amplitude-vector update" simulators are the gold standard for this task because they track every single quantum state amplitude in detail.

However, these simulators hit a hard memory wall. The number of amplitudes grows exponentially with the number of qubits: an $n$-qubit system requires $2^{n+4}$ bytes of storage. For example, simulating a 45-qubit system demands 0.5 petabytes of RAM, and going beyond 49 qubits is practically impossible on modern classical hardware. The authors address this strict memory limitation by exploring whether data compression can drastically lower the memory footprint.

Methods

The authors propose a memory-efficient simulation framework by integrating the SZ lossy compressor into Intel-QS, a distributed high-performance quantum circuit simulator.

Instead of keeping the entire state vector uncompressed in memory, their methodology breaks the vector down into smaller slices. The simulation then proceeds gate-by-gate using the following pipeline for each slice:

  1. Decompress the specific state vector slice needed for the current gate.
  2. Normalize the slice. Because lossy compression introduces tiny errors, the state vector drifts off the mathematical "Bloch sphere." Normalization resets it, preventing errors from compounding.
  3. Compute the quantum gate application on the slice.
  4. Compress the slice back down and store it in memory.

To mitigate the performance hit of this constant compression/decompression cycle, the authors utilize the Message-Passing Interface (MPI) to process multiple slices in parallel across supercomputer nodes.

Datasets

The framework was evaluated on the Argonne Theta supercomputer using two classic quantum algorithm benchmarks:

  • Quantum Fourier Transform (QFT) at 20, 26, and 30 qubits. QFT generates highly varied amplitude values, representing a "worst-case scenario" for data compression.
  • Grover’s Search Algorithm at 30 qubits. Grover's search maintains highly uniform amplitude values throughout most of the simulation, representing an ideal scenario for compression.

Key Insights and Ideas

  • Trading Time for Space: The core philosophy is that at extreme scales, computation time is cheaper than memory capacity. Accepting a runtime overhead allows researchers to simulate larger quantum systems that would otherwise be completely unaddressable.
  • The Bloch Sphere Reset: Lossy compression inherently discards some precision. The authors' "aha moment" was realizing that a simple normalization step before each gate computation acts as a regular reset button, successfully halting error propagation.
  • Algorithm-Dependent Success: The effectiveness of lossy compression is highly dependent on the quantum algorithm's structure. Algorithms like Grover's search, which feature highly repetitive data states, are perfect candidates for extreme compression.

Key Results

  • QFT Benchmarks: For a 30-qubit QFT simulation, the method achieved a compression ratio greater than 6x (reducing memory to 16.5% of the original requirement) while maintaining 98% state fidelity.
  • Grover's Search Benchmarks: Thanks to the uniform nature of the amplitudes, the SZ compressor achieved an astonishing 445,144x compression ratio (reducing memory to $2.24 \times 10^{-6}$ of the original) with 99.75% fidelity.
  • Performance Overhead: This memory savings comes at the cost of speed. The runtime overheads ranged from 24x down to 19x. Interestingly, the overhead trend decreases as the qubit count increases, because compression overhead becomes relatively small when dealing with larger datasets.

The authors note that these results imply a 45-qubit memory allocation (0.8 petabytes) could be stretched to simulate a 63-qubit Grover's search algorithm.

Fig. 1: Compression ratio and fidelity of QFT benchmarks.
Fig. 2: Performance overhead of QFT benchmarks.

Limitations and Future Work

The primary limitation of this approach is the significant computational slowdown (up to 24x), driven by the repetitive compression, decompression, and normalization cycles.

For future work, the authors plan to execute the full 63-qubit Grover's search simulation on the Theta supercomputer. They also intend to analyze how lossy compression errors mathematically relate to real-world physical quantum noise, evaluate alternative compression algorithms, and combine their framework with other approximate simulation techniques.

Summary updated

Abstract

In order to evaluate, validate, and refine the design of new quantum algorithms or quantum computers, researchers and developers need methods to assess their correctness and fidelity. This requires the capabilities of quantum circuit simulations. However, the number of quantum state amplitudes increases exponentially with the number of qubits, leading to the exponential growth of the memory requirement for the simulations. In this work, we present our memory-efficient quantum circuit simulation by using lossy data compression. Our empirical data shows that we reduce the memory requirement to 16.5% and 2.24E-06 of the original requirement for QFT and Grover's search, respectively. This finding further suggests that we can simulate deep quantum circuits up to 63 qubits with 0.8 petabytes memory.
BibTeX
@misc{wu2018memory,
  author = {Xin-Chuan Wu and Sheng Di and Franck Cappello and Hal Finkel and Yuri Alexeev and Frederic T. Chong},
  title = {{Memory-Efficient Quantum Circuit Simulation by Using Lossy Data Compression}},
  year = {2018},
  eprint = {1811.05630},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.05630},
}

Loading related content...

Figure