Running general quantum algorithms on quantum computers is hard, especially in the early stage of development of the quantum computer that we are in today. Many resources are required to transform a general problem to be run on a quantum computer, for instance to satisfy the topology constraints of the quantum hardware. Furthermore, quantum computers need to operate at temperatures close to absolute zero, and hence resources are required to keep the quantum hardware at that level. Therefore, simulating small instances of a quantum algorithm is often preferred over running it on actual quantum hardware. This is both cheaper and gives debugging capabilities which are unavailable on actual quantum hardware, such as the evaluation of the full quantum state, at intermediate points in the algorithm as well as at the end of the algorithm. By simulating small instances of quantum algorithms, the quantum algorithm can be checked for errors and be debugged before implementing and running it on actual quantum hardware for larger instances. There are multiple initiatives to create quantum simulators and while looking alike, there are difference among them. In this work we compare seven often used quantum simulators offered by various parties by implementing the Shor-code, an error-correcting technique. The Shor-code can detect and correct all single qubit errors in a quantum circuit. For most multi-qubit errors, correct detection and correction is not possible. We compare the seven quantum simulators on different aspects, such as how easy it is to implement the Shor-code, what its capabilities are regarding translation to actual quantum hardware and what the possibilities of simulating noise are. We also discuss aspects such as topology restrictions and the programming interface.
Running general quantum algorithms on quantum computers is hard, especially in the early stage of development of the quantum computer that we are in today. Many resources are required to transform a general problem to be run on a quantum computer, for instance to satisfy the topology constraints of the quantum hardware. Furthermore, quantum computers need to operate at temperatures close to absolute zero, and hence resources are required to keep the quantum hardware at that level. Therefore, simulating small instances of a quantum algorithm is often preferred over running it on actual quantum hardware. This is both cheaper and gives debugging capabilities which are unavailable on actual quantum hardware, such as the evaluation of the full quantum state, at intermediate points in the algorithm as well as at the end of the algorithm. By simulating small instances of quantum algorithms, the quantum algorithm can be checked for errors and be debugged before implementing and running it on actual quantum hardware for larger instances. There are multiple initiatives to create quantum simulators and while looking alike, there are difference among them. In this work we compare seven often used quantum simulators offered by various parties by implementing the Shor-code, an error-correcting technique. The Shor-code can detect and correct all single qubit errors in a quantum circuit. For most multi-qubit errors, correct detection and correction is not possible. We compare the seven quantum simulators on different aspects, such as how easy it is to implement the Shor-code, what its capabilities are regarding translation to actual quantum hardware and what the possibilities of simulating noise are. We also discuss aspects such as topology restrictions and the programming interface.
Classical simulations of quantum computers give us an insight into various things such as what quantum algorithms can achieve, whether it is possible to verify that they function as postulated, the difficulties that have to be overcome before quantum computers can be realized, as well as how we can handle these difficulties. We build a Python library to simulate a quantum computer that can perform all quantum algorithms by defining an universal gate set, from which all quantum gates – and thereby all circuits – can be constructed. We implement two algorithms that both highlight two important aspects of quantum computing: Grover’s quantum search algorithm, which demonstrates the efficiency of quantum algorithms and their superiority over their classical counterparts by searching an unsorted list quadratically faster; and an error correcting code, the Shor code, which highlights the cost of correcting the possible errors in a quantum computer.We test the rigidity of Grover’s algorithm by introducing errors without correction, and find that the algorithm shows resilience to smaller 1-qubit Pauli errors, but looses its efficiency under larger errors and thus the need for Pauli error correction arise.
Quantum Error Correction (QEC) is an essential field for the development of Fault-Tolerant Quantum Computation. A foundational approach for QEC is Shor's 9-Qubit Code, which remains a solid starting point for studying quantum circuits' error behavior. In this article we evaluate Shor code's detection and correction procedures applied to encoded logical states, given that this code incorporates a decoding circuit component with self-error-correcting properties. We tested the encoded, decoding, and error-correcting procedures for the Shor's 9-Qubit Code on IBM and IONQ quantum devices. The experiments were carried out in two instances: with and without an intentionally added unitary error. We present an analysis of the resulting error syndromes and decoded states. Results show a better performance by IONQ, probably due to larger decoherence times than IBM.
Developing state-of-the-art classical simulators of quantum circuits is of utmost importance to test and evaluate early quantum technology and understand the true potential of full-blown error-corrected quantum computers. In the past few years, multiple theoretical and numerical advances have continuously pushed the boundary of what is classically simulable, hence the development of a plethora of tools which are often limited to a specific purpose or designed for a particular hardware (e.g. CPUs vs. GPUs). Moreover, such tools are typically developed using tailored languages and syntax, which makes it hard to compare results from, and create hybrid approaches using, different simulation techniques. To support unified and optimized use of these techniques across platforms, we developed HybridQ , a highly extensible platform designed to provide a common framework to integrate multiple state-of-the-art techniques to run on a variety of hardware. The philosophy behind its development has been driven by three main pillars: Easy to Use, Easy to Extend, and Use the Best Available Technology. The powerful tools of HybridQ allow users to manipulate, develop, and extend noiseless and noisy circuits for different hardware architectures. HybridQ supports large-scale high-performance computing (HPC) simulations, automatically balancing workload among different processor nodes and enabling the use of multiple backends to maximize parallel efficiency. Everything is then glued together by a simple and expressive language that allows seamless switching from one technique to another as well as from one hardware to the next, without the need to write lengthy translations, thus greatly simplifying the development of new hybrid algorithms and techniques.
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.
With the advent of small-scale prototype quantum computers, researchers can now code and run quantum algorithms that were previously proposed but not fully implemented. In support of this growing interest in quantum computing experimentation, programmers need new tools and techniques to write and debug QC code. In this work, we implement a range of QC algorithms and programs in order to discover what types of bugs occur and what defenses against those bugs are possible in QC programs. We conduct our study by running small-sized QC programs in QC simulators in order to replicate published results in QC implementations. Where possible, we cross-validate results from programs written in different QC languages for the same problems and inputs. Drawing on this experience, we provide a taxonomy for QC bugs, and we propose QC language features that would aid in writing correct code.
Quantum computing promises revolutionary advances in cryptography, particularly through Shor's algorithm, which can factor large integers in polynomial time and threaten traditional RSA encryption. Through simulation experiments, our research compares Shor's algorithm implementation in ideal versus noisy quantum environments. Under ideal conditions, we factored semiprimes up to N=299 with reasonable resources, but with noise introduction, this ceiling dropped to approximately N=95, beyond which computational costs increased exponentially. The performance gap is striking: ideal simulations factored N=91 in 4 seconds, while noisy simulations required 2,600 seconds—a 650-fold increase. Our hybrid quantum-classical approach showed that noise simulation required modified circuit architectures, reducing gate count growth from 50 to 42.5 gates for comparable test numbers. Qubit requirements followed a step-function pattern in both environments, scaling from 12 qubits for N=15 to 21 qubits for N=91-95, while circuit depth increased from 11 to 17-19 units, with slightly shallower circuits in noisy conditions. In our paper, we propose a hybrid implementation strategy that addresses hardware limitations, present empirical findings on the impact of quantum noise on factoring efficiency, and evaluate the cryptographic security implications under realistic conditions. Our findings underscore the need for fault-tolerant quantum computing and error correction, especially as optimizations suggest factoring 2048-bit RSA keys would require approximately 20 million qubits running for 8 hours. This highlights the urgency in transitioning to post-quantum cryptographic algorithms like CRYSTALS-Dilithium and CRYSTALS-Kyber being standardized by NIST.