Introduction
Classical simulation of quantum circuits is a critical tool for quantum research, yet it faces a fundamental "memory wall." State-vector simulation, which tracks the exact probability amplitude of every possible state, requires memory that scales exponentially with the number of qubits ($2^n$). For instance, a 48-qubit simulation demands approximately 4.6 Petabytes of RAM, exceeding the capacity of even the largest supercomputers. While alternative methods like tensor network simulators exist, they struggle with highly entangled circuits typical of algorithms like QAOA or VQE.
Previous attempts to integrate data compression into simulators have been hampered by significant performance overheads—often requiring decompression for every gate—and a lack of robust, GPU-native error control. BMQSim addresses these challenges by introducing a high-fidelity, GPU-accelerated compression framework that optimizes both memory footprint and computational throughput.
Methodology: The BMQSim Framework
BMQSim achieves its performance gains through four integrated innovations: circuit partitioning, pipelined workflows, specialized error control, and multi-level memory management.
Optimal-Compression Circuit Partitioning
Rather than processing gates individually, BMQSim performs an offline analysis to group gates into stages based on their target qubits. This approach minimizes the frequency of compression and decompression cycles. By identifying which qubits are "local" to a memory block and which are "global," the system can apply multiple gates to a decompressed block in GPU memory before re-compressing it.
Transfer-Concealed Workflow and Error Control
To maximize GPU utilization, BMQSim employs a multi-stream pipeline that overlaps data movement (host-to-device), decompression, computation, and compression. This ensures that the GPU remains active while data is being prepared or stored.
Maintaining quantum state fidelity requires strict point-wise relative error bounds. Since standard GPU compressors typically only support absolute error bounds, BMQSim utilizes a logarithmic transformation to map relative error requirements into the absolute space. This allows for high-speed hardware acceleration without compromising the accuracy of the quantum amplitudes.
Two-Level Memory Management
Given that lossy compression ratios are data-dependent and unpredictable, BMQSim incorporates a safety mechanism using NVIDIA’s GPUDirect Storage (GDS). If the compressed state vector exceeds available RAM, the system seamlessly spills data to NVMe SSDs, preventing out-of-memory errors while maintaining low latency.
Evaluation and Results
The framework was evaluated using the NWQBench suite, covering algorithms such as qft, qaoa, and ghz_state with qubit counts ranging from 23 to 47.
- Memory Efficiency: BMQSim achieved an average memory reduction of over 10x, reaching up to 678x for specific circuits like
cat_state. - Scalability: On a workstation with 128GB of RAM, BMQSim successfully simulated up to 42 qubits. Utilizing the SSD fallback, it reached 47 qubits, a capacity comparable to the Frontier supercomputer and roughly 14 qubits more than standard simulators like Qiskit or cuQuantum on the same hardware.
- Performance: BMQSim demonstrated a 1385x speedup over previous CPU-based compression simulators (SC19-Sim) and matched the speed of industry-standard tools like Qiskit-Aer, all while maintaining a state fidelity greater than 0.99.
Conclusion
BMQSim represents a significant step forward in classical quantum simulation, effectively breaking the memory barrier through intelligent systems design and mathematical transformations. By decoupling the compression framework, future iterations could enhance existing backends like cuQuantum, combining memory efficiency with peak computational performance.
Summary updated