Lossy Compression for Schrödinger-style Quantum Simulations

Noah Huffman, Dmitri S. Pavlichin, Tsachy WeissmanarXiv 2024 · DOI

TL;DR

Researchers at Stanford have demonstrated that Schrödinger-style quantum simulations can be significantly compressed using scalar and vector quantization with minimal loss in accuracy. By prioritizing significand bits over exponent bits, they maintained simulation fidelities $>0.99$ using only 7 bits per amplitude component, and showed that memory requirements for a fixed fidelity scale only logarithmically with circuit depth.

What Problem Does This Paper Address?

Simulating quantum circuits on classical hardware is essential for verifying "quantum supremacy" and developing algorithms for the Noisy Intermediate-Scale Quantum (NISQ) era. However, Schrödinger-style simulations—which track the full state vector—face a massive "memory wall." Because an $n$-qubit system requires storing $2^n$ complex amplitudes, memory requirements grow exponentially.

While other methods like Feynman path integrals or tensor networks exist, they often struggle with deep circuits or high connectivity. Schrödinger-style simulation scales linearly with circuit depth but is strictly limited by RAM. This paper investigates whether lossy compression can break this memory bottleneck by reducing the number of bits used to store each amplitude without destroying the physical validity (fidelity) of the simulation.

Methods

The authors explore two primary compression strategies:

  1. Scalar Quantization: They test standard low-precision formats (float32, float16, bfloat16) and a custom "floatk" format. In "floatk," they systematically truncate the significand (mantissa) to $k$ bits while keeping the exponent fixed. This allows them to pinpoint exactly how much precision is required for the real and imaginary parts of quantum amplitudes.
  2. Vector Quantization: Instead of quantizing components individually, they treat amplitudes as points in the complex plane. They use a "two-pass" k-means clustering algorithm:
  3. Pass 1: Run the simulation once without compression to collect the distribution of all amplitudes.
  4. Pass 2: Use k-means to find $2^m$ optimal "codewords" (centroids). In subsequent runs, each amplitude is simply stored as an $m$-bit index pointing to the nearest codeword.

Datasets

The primary benchmark used is the Quantum Fourier Transform (QFT).

  • Configuration: 6 qubits ($n=6$).
  • Depth: The circuit was repeated 31 times for a total depth of $d=651$ gates to test long-term error accumulation.
  • Evaluation: Fidelity was measured against an "ideal" simulation performed in complex double precision (128 bits per amplitude).

Key Insights and Ideas

  • Significand > Exponent: A major finding is that for quantum simulations, the number of significand bits is far more important than the exponent range. Interestingly, bfloat16 (which has more exponent bits but fewer significand bits) performed worse than standard float16. This suggests that quantum amplitudes are distributed in a way that benefits more from local precision than from representing massive dynamic ranges.
  • The "Float4" Threshold: The authors found a "sweet spot" at 4 significand bits. Above this, simulations maintain high fidelity ($>0.9$) even after hundreds of gates. Below 4 bits, fidelity collapses rapidly.
  • Logarithmic Scaling of Memory: By fitting a logistic function to their vector quantization data, the authors derived a theoretical bound. They found that to maintain a constant fidelity, the number of bits required per amplitude ($m$) only needs to grow logarithmically with the depth of the circuit ($O(\log d)$). This is a highly encouraging result for simulating deep circuits.

Key Results

  • High Fidelity Scalar Quantization: Using "float7" (7 significand bits), the simulation maintained a fidelity of $>0.99$ for the QFT.
  • Extreme Compression: Even with only 4 significand bits, fidelity remained above 0.9 after 651 gates.
  • Vector Quantization Performance: Using $2^{15}$ codewords (15 bits per amplitude), they achieved fidelities $>0.98$.
  • Deep Circuit Projection: The model predicts that for a 6-qubit QFT, 15 bits per amplitude is sufficient to maintain a fidelity of $>0.9$ even at a massive depth of $10^4$ gates.

Limitations and Future Work

  • The "Two-Pass" Hurdle: The current vector quantization method requires running the simulation uncompressed first to find the codewords. This is a "chicken and egg" problem for circuits that are too large to fit in memory in the first place. The authors suggest a "one-pass" solution where codewords are updated dynamically during the simulation.
  • Hardware Support: Most current CPUs/GPUs are optimized for standard float32 or float16. To truly see the speed and memory benefits of "float7" or "float4," custom hardware or specialized software kernels would be needed.
  • Generalization: While QFT is a standard benchmark, different quantum algorithms (like VQE or QAOA) might have different amplitude distributions that could affect compression performance.
  • Post-Compression: The authors suggest that quantized state vectors could be further compressed using lossless tools like gzip or SZ for even greater storage savings.

Summary updated

Abstract

Simulating quantum circuits on classical hardware is a powerful and necessary tool for developing and testing quantum algorithms and hardware as well as evaluating claims of quantum supremacy in the Noisy Intermediate-Scale Quantum (NISQ) regime. Schrödinger-style simulations are limited by the exponential growth of the number of state amplitudes which need to be stored. In this work, we apply scalar and vector quantization to Schrödinger-style quantum circuit simulations as lossy compression schemes to reduce the number of bits needed to simulate quantum circuits. Using quantization, we can maintain simulation fidelities $>0.99$ when simulating the Quantum Fourier Transform, while using only 7 significand bits in a floating-point number to characterize the real and imaginary components of each amplitude. Furthermore, using vector quantization, we propose a method to bound the number of bits/amplitude needed to store state vectors in a simulation of a circuit that achieves a desired fidelity, and show that for a 6 qubit simulation of the Quantum Fourier Transform, 15 bits/amplitude is sufficient to maintain fidelity $>0.9$ at $10^4$ depth.
BibTeX
@misc{huffman2024lossy,
  author = {Noah Huffman and Dmitri S. Pavlichin and Tsachy Weissman},
  title = {{Lossy Compression for Schrödinger-style Quantum Simulations}},
  year = {2024},
  eprint = {2401.11088},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.11088},
}

Loading related content...

Figure