Quantum circuit simulation is crucial for algorithm development and cryptanalysis given the limited qubit counts and high noise in today’s quantum hardware. We present a Qiskit MPI framework that accelerates classical simulation of quantum circuits focusing on Shor’s integer factoring algorithm by distributing workloads across high performance computing (HPC) resources. A novel dynamic shot allocation strategy balances simulation tasks across MPI processes, preventing idle CPUs even when the total number of circuit "shots" (independent runs) is not evenly divisible. This load balancing approach, combined with support for hybrid CPU/GPU execution on each node, achieves near linear speedups (e.g. 7.5× on 8 processes and 14× on 16 processes) in simulating Shor’s algorithm circuits. We validate the correctness of our parallel simulator by showing that distributed execution produces identical quantum output distributions as a serial run, thus maintaining fidelity. All experiments are performed with fixed random seeds and provided in open source form for reproducibility. We also discuss compatibility with the emerging Quantum Message Passing Interface (QMPI), which extends MPI to quantum computing contexts. By enabling fast, scalable simulation of cryptographically relevant algorithms like Shor’s on classical clusters, our framework allows researchers to prototype quantum attacks and assess quantum algorithm performance ahead of large scale quantum hardware. We report extensive experiments, including factoring small composite numbers, that demonstrate significant wall clock speedups without loss of accuracy. These results position our approach as a practical tool for scalable quantum algorithm prototyping and cryptanalysis research in the pre-quantum era.
Quantum circuit simulation is crucial for algorithm development and cryptanalysis given the limited qubit counts and high noise in today’s quantum hardware. We present a Qiskit MPI framework that accelerates classical simulation of quantum circuits focusing on Shor’s integer factoring algorithm by distributing workloads across high performance computing (HPC) resources. A novel dynamic shot allocation strategy balances simulation tasks across MPI processes, preventing idle CPUs even when the total number of circuit "shots" (independent runs) is not evenly divisible. This load balancing approach, combined with support for hybrid CPU/GPU execution on each node, achieves near linear speedups (e.g. 7.5× on 8 processes and 14× on 16 processes) in simulating Shor’s algorithm circuits. We validate the correctness of our parallel simulator by showing that distributed execution produces identical quantum output distributions as a serial run, thus maintaining fidelity. All experiments are performed with fixed random seeds and provided in open source form for reproducibility. We also discuss compatibility with the emerging Quantum Message Passing Interface (QMPI), which extends MPI to quantum computing contexts. By enabling fast, scalable simulation of cryptographically relevant algorithms like Shor’s on classical clusters, our framework allows researchers to prototype quantum attacks and assess quantum algorithm performance ahead of large scale quantum hardware. We report extensive experiments, including factoring small composite numbers, that demonstrate significant wall clock speedups without loss of accuracy. These results position our approach as a practical tool for scalable quantum algorithm prototyping and cryptanalysis research in the pre-quantum era.
Shor’s algorithm stands as a breakthrough in quantum computing due to its potential to factor large integers exponentially quicker than classical algorithms. However, implementing and evaluating this algorithm on real quantum computer hardware remains exciting due to qubit limitations, gate noise, and hardware constraints. This research presents a comprehensive performance evaluation of Shor’s algorithm using simulated quantum backends provided by Qiskit. A flexible and generic implementation is proposed, allowing dynamic input of integers to be factored, with randomized co-prime selection and automated circuit generation. The algorithm is tested on various semiprime numbers, such as 15, 21, and 35, using IBM’s Aer simulator. A major contribution of this work is the circuit-level analysis conducted both before and after transpilation. Metrics such as gate counts, circuit depth, and simulator runtime are extracted to assess scalability and resource requirements. High-resolution plots of the pre-transpiled circuits are saved to visualize algorithmic complexity, while post-transpilation metrics inform future quantum hardware feasibility. The output measurement distributions are analyzed to estimate periodicity and derive correct factors. The proposed implementation is compared with existing fixed-instance Shor demonstrations to highlight its flexibility and extensibility. Experimental results show consistent success in factor retrieval and provide valuable insight into circuit growth and complexity under realistic constraints. This analysis lays the groundwork for future adaptation to NISQ hardware and contributes to understanding Shor’s algorithm from both computational and architectural perspectives.
Quantum computers today are noisy and limited in the number of qubits that can be set with reasonable fidelities and gate times for each system. Since the current limit on the number of qubits is difficult to surpass, it is expected that the future of quantum computing will lie in connecting different quantum computers together to form a quantum network, each with its own limitations. Herein lies the field of distributed quantum computing optimized for large-scale communication. One such system that has been designed is the Quantum Message Passing Interface (QMPI). This interface, unlike the classical MPI, takes advantage of quantum teleportation to communicate between different quantum nodes but leverages the framework built for classical MPI. This general interface is essential as we try to connect various quantum computers, as it can be used to develop distributed quantum algorithms across various nodes. In this work, we develop a reference implementation for a QMPI interface in Qiskit and characterize its performance. In our interface, we have implemented point-to-point and optimized collective operations for larger distributed quantum networks. To test our framework, we demonstrate our implementation with applications that can leverage the QMPI framework including Trotterization of the transverse field Ising model and distributive quantum phase estimation. Lastly, we have developed a new technique for decomposing quantum gates across many nodes which leverages multi-controlled Toffolli gates. This technique beats the state of the art for an adder circuit in terms of fidelity and the number of EPR pairs used.
Quantum computing has emerged as a transformative technological advancement with the potential to challenge the foundations of classical cryptography. Traditional cryptographic algorithms, such as RSA, rely heavily on the computational hardness of problems like integer factorization—a problem quantum algorithm like Shor's can theoretically solve efficiently. This research investigates the practical capabilities and performance limitations of three prominent quantum simulation frameworks: Qiskit, Cirq, and QuTiP. The study aims to analyze and compare their efficiency in simulating the decryption process for encrypted data of varying bit lengths—specifically 8 -bit, 16 -bit, 32 -bit, 64 -bit, 128 -bit, and 512 -bit keys. By simulating classical decryption schemes through quantum circuits, we assess the computational resources, execution time, and overall performance of each platform. This benchmarking helps to highlight how effectively these simulators can model cryptographic tasks and where they currently fall short in terms of scalability and execution time. The results offer valuable insights into the practicality of deploying quantum computing for real-world cryptographic operations and outline the current limitations imposed by simulation-based approaches, especially as key sizes grow in complexity. Ultimately, this research contributes to a deeper understanding of how existing quantum tools perform under cryptographic workloads and what improvements are necessary to make quantum-assisted cryptanalysis viable at scale.
Large-scale quantum circuit simulation on high-performance computing (HPC) systems is crucial for developing and verifying quantum algorithms to overcome the limitations of current noisy quantum computers. However, existing simulators face scalability bottlenecks due to memory limits and communication overhead. Many state-of-the-art approaches rely on static circuit partitioning, which makes it difficult to address the exponential growth in problem size as the number of qubits increases. To overcome these challenges, we present ScaleQsim, a highly scalable quantum circuit simulation framework for large-scale HPC systems. ScaleQsim focuses on providing a unified representation of the full qubit state, yet provides scalability through efficient synchronization and communication. ScaleQsim adopts a novel full state vector partitioning strategy that evenly distributes the full state vector across multiple nodes and GPUs. This distributed structure enables efficient parallel gate execution without costly synchronization, and ScaleQsim applies adaptive kernel configuration, which adjusts execution parameters based on GPU resources and task granularity to enhance simulation efficiency. Our evaluation on the Perlmutter supercomputer with up to 512 GPUs demonstrates that ScaleQsim simulates quantum circuits with up to 42 qubits and outperforms state-of-the-art simulators by up to 77.40× across various quantum circuits.
Shor’s factoring algorithm is one of the most anticipated applications of quantum computing. However, the limited capabilities of today’s quantum computers only permit a study of Shor’s algorithm for very small numbers. Here, we show how large GPU-based supercomputers can be used to assess the performance of Shor’s algorithm for numbers that are out of reach for current and near-term quantum hardware. First, we study Shor’s original factoring algorithm. While theoretical bounds suggest success probabilities of only 3–4%, we find average success probabilities above 50%, due to a high frequency of “lucky” cases, defined as successful factorizations despite unmet sufficient conditions. Second, we investigate a powerful post-processing procedure, by which the success probability can be brought arbitrarily close to one, with only a single run of Shor’s quantum algorithm. Finally, we study the effectiveness of this post-processing procedure in the presence of typical errors in quantum processing hardware. We find that the quantum factoring algorithm exhibits a particular form of universality and resilience against the different types of errors. The largest semiprime that we have factored by executing Shor’s algorithm on a GPU-based supercomputer, without exploiting prior knowledge of the solution, is 549,755,813,701 = 712,321 × 771,781. We put forward the challenge of factoring, without oversimplification, a non-trivial semiprime larger than this number on any quantum computing device.
This article presents a detailed implementation of Shor’s quantum factoring algorithm, which served as the cornerstone for a pilot project at Jamk University of Applied Sciences. The primary goal was to leverage this significant algorithm to establish and validate a reusable quantum simulation environment on a high-performance computing (HPC) platform. We report the successful factorization of the integer 15, executed on the Finnish CSC’s MAHTI supercomputer using a 9-qubit quantum circuit developed in the Qiskit framework. This work provides a comprehensive overview of the principles behind Shor’s algorithm and a methodical breakdown of its simulation. Furthermore, it documents the practical software challenges faced during the environment’s configuration, focusing on library versioning and dependencies. The purpose of this work is to provide a systematic introduction to implement Shor’s algorithm at computer science or applied mathematics classes in institutions of higher education such as universities of applied sciences. The successful factorization provides an initial validation of the simulation workflow for this benchmark case, while the detailed account of implementing Shor’s algorithm offers a practical guide and valuable insights for future quantum computing initiatives at educational institutions with a focus on computer science or scientific computing.