Abstract
In response to the challenges in large-scale quantum state simulation on classical computing platforms, including memory limits, frequent disk I/O, and high computational complexity, this study builds upon a previously proposed hierarchical storage-based quantum simulation system and introduces an optimization framework, the Quantum Vector Optimization Framework (QVecOpt). QVecOpt integrates four strategies: amplitude pairing, cache optimization, block storage optimization, and parallel optimization. These collectively enhance state vector storage and computational scheduling. The amplitude pairing mechanism locates relevant amplitude pairs via bitwise XOR, reducing traversal complexity of single-qubit gates from $O(2^n)$ to $O(1)$. Cache optimization pre-allocates buffers and loads only required data, cutting disk I/O. Block storage optimization partitions the state vector for on-demand loading and local updates, reducing redundant access. Parallel optimization distributes the state vector across nodes for collaborative computation, achieving near-linear speedup. Complexity analysis shows that, compared with hierarchical storage simulation, the method reduces state vector traversals for single-qubit gates from $2^n$ to 1, removing the main bottleneck. It also lowers computational and I/O complexity from $O(2^n)$ to $O(2^n/C)$ and $O(2^n/B)$. In simulations of 16-29 qubits, efficiency improves nearly tenfold, breaking the memory bottleneck of existing tools and enabling high-bit quantum circuit simulations beyond traditional methods.
Introduction
Simulating large-scale quantum circuits on classical hardware—known as Schrödinger-state simulation—requires representing the system's state as a dense vector of complex numbers. For an $n$-qubit system, this vector has $2^n$ dimensions, leading to exponential growth in memory requirements. When the state vector exceeds available RAM, "hierarchical storage" (using disk as an extension) is often employed. However, traditional simulation methods based on dense matrix-vector multiplication require traversing the entire state vector $2^n$ times for a single-qubit gate. This results in a catastrophic disk I/O bottleneck and unmanageable computational complexity of $O(2^{2n})$.
The QVecOpt Framework
The Quantum Vector Optimization Framework (QVecOpt) shifts the simulation paradigm from a "multi-pass" to a "single-pass" model. This is achieved through gate fusion and the integration of four core strategies designed to minimize data movement and maximize computational efficiency.
1. Amplitude Pairing and Cache Optimization
Instead of standard matrix multiplication, QVecOpt exploits the locality of single-qubit gates. A gate acting on the $k$-th qubit only affects specific pairs of amplitudes. By utilizing a bitwise XOR operation ($i \oplus 2^k$), the system dynamically identifies and couples these pairs. This allows the simulator to update the entire state vector in just one sequential traversal, reducing complexity from $O(2^n)$ to $O(1)$.
To support this, a sliding-window state cache is implemented. Rather than loading the entire vector, the system pre-allocates a memory buffer and dynamically loads only the subset of states required for the current computation, drastically cutting disk read/write operations.
2. Block Storage and Parallelization
The massive state vector on disk is partitioned into fixed-size, structured blocks. This Block Storage Optimization allows for on-demand loading and localized updates, preventing the system from reading irrelevant data. Furthermore, these blocks are distributed across multiple computing nodes. Because the amplitude pairing mechanism is highly localized, nodes can process their assigned chunks in parallel with minimal cross-node communication, achieving near-linear speedup.
Key Results
Empirical evaluation was conducted on an Intel Core i7 system with 64GB RAM, simulating circuits ranging from 16 to 29 qubits.
- Computational Efficiency: QVecOpt reduces the number of state vector traversals per gate from $2^n$ to 1. It lowers computational complexity to $O(2^n/C)$ and I/O complexity to $O(2^n/B)$, where $C$ is the number of nodes and $B$ is the cache size.
- Performance Speedup: QVecOpt achieved nearly a tenfold speedup over Qiskit (v1.3.1). For a 24-qubit simulation, Qiskit required 13.31 seconds, while QVecOpt (dual-threaded) completed the task in 0.65 seconds.
- Memory Scalability: At 28 and 29 qubits, Qiskit failed due to Out-Of-Memory (OOM) errors. QVecOpt successfully simulated the 29-qubit circuit (an 8 GB state vector) in 14.55 seconds, effectively breaking the memory barrier of traditional tools.
Conclusion and Future Work
QVecOpt provides an efficient, scalable solution for classical simulation of large-scale quantum computation. By moving to an "on-demand loading + in-cache computation" model, the framework demonstrates that disk I/O does not have to be a bottleneck for quantum simulation. Future research will explore applying these optimization strategies to partial-amplitude simulations and tensor network-based methods to further push the boundaries of classical quantum research.
Summary updated