Accelerating Quantum Algorithm Simulations in Multi-Processor Architectures: Optimisation Techniques with Cython, Numba, and Jax
Description
Accelerating Quantum Algorithm Simulations in Multi-Processor Architectures: Optimisation Techniques with Cython, Numba, and Jax
Mehmet Keçeci
ORCID : https://orcid.org/0000-0001-9937-9839
Received: 07.10.2025
“Article 9 of the series”
Abstract:
While the theoretical potential of quantum algorithms is revolutionary, particularly for solving complex problems, their practical development and validation rely heavily on simulations performed on classical computers. However, due to the exponential growth of the Hilbert space of quantum systems, the computational cost of simulations increases rapidly with the number of qubits, creating a significant performance bottleneck. To overcome this challenge, leveraging the parallel computing capabilities offered by modern multi-processor architectures is of critical importance. This study (Accelerating Quantum Algorithm Simulations in Multi-Processor Architectures [Unpublished pre-doctoral IX. Report]. Gebze Technical University, Kocaeli, Türkiye [467, 478–480]) investigates the use of advanced optimisation tools—namely Cython, Numba, and Jax—to enhance the performance of quantum algorithm simulations developed using the Python programming language, and examines their efficacy in multi-processor environments. Cython translates Python code into C or C++, offering the advantages of static typing and compilation. This process eliminates Python’s interpretation overhead and, under specific conditions, bypasses the Global Interpreter Lock (GIL) constraint, enabling genuine thread-level parallelism. Numba employs a Just-In-Time (JIT) compiler to translate Python functions, particularly those with numerically intensive loops operating on NumPy arrays, into machine code at runtime, achieving significant speedups. It also provides automatic parallelisation capabilities through directives such as “@njit(parallel=True)”. Jax, through its automatic differentiation and the XLA compiler, offers optimisation and supports a data parallelism model via its “pmap” function. This facilitates the distribution of operations across multiple CPU cores or accelerators like GPUs/TPUs, while “vmap” enables automatic vectorisation. The integration and effective use of these optimisation techniques can substantially reduce the execution times of quantum algorithm simulations. This work assesses the individual and combined impact of these tools in simulating computationally intensive tasks, such as quantum error correction codes and variational quantum algorithms. The resultant performance gains will facilitate the study of larger and more complex quantum systems using classical resources, thereby contributing to the advancement of research in quantum computing. In conclusion, the compilation and parallelisation strategies provided by Cython, Numba, and Jax offer powerful and flexible solutions for running quantum simulations efficiently on multi-processor architectures.
Keywords:
Quantum Algorithm Simulation, Multi-Processor Architectures, Performance Optimisation, Parallel Computing, Cython, Numba, Jax, Python, High-Performance Computing, Quantum Computing.
Note: Citations and numbering are in continuation of the previous articles.
Files
Accelerating Quantum Algorithm Simulations in Multi-Processor Architectures.pdf
Files
(8.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:85ee22ce63299c21678c37abeb80253f
|
8.3 MB | Preview Download |