Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

ELECTRICAL AND COMPUTER SYSTEMS

CAPACITIVE COMPLEXITY OF DETERMINING GCD IN THE SHOR S ALGORITHM

Valerii Hlukhov

Published Nov 30, 2020• 0 citations
Publisher

Abstract

The article analyzes the results of finding the period r of the function y = axmodM (a is a random number) which is used in the Shor's factorization algorithm for quantum computers. The module M is the product of two primes p and q. The article analyzes the solutions r obtained for various a, for which the capacitive complexity H of finding the greatest common divisor GCD(ar/2 + 1, M) is the least. A digital quantum computer is a classic processor and its digital quantum coprocessor. A digital quantum coprocessor with hundreds and thousands of digital qubits can be implemented in one programmable logic integrated circuit FPGA. In the Shor’s algorithm, the factorization problem of the number M reduces to the problem of determining the period r of the function y. It is known that GCD(ar/2 + 1, M) can be a divisor of the number M The task of the quantum coprocessor in implementing the Shor’s algorithm is to find the period r. After that it is necessary to find the GCD. Since for random a the problem of finding the period r has many solutions, these solutions can be compared by the value of one of the arguments when finding the GCD - the number ar / 2 . In this case, H = (rlog2a)/2 is taken for analysis. It approximately represents the bit depth of binary codes that a classic computer will have to process when determining the GCD. H can vary over a wide range from tens to thousands of bits even for small values of M. In this research the period r, which ensures the least complexity of the subsequent task of finding the GCD, is most often a solution for a = 3 and a = 2, but it can also occur often with other values of a. To clarify the revealed patterns, especially for large M, it is necessary to conduct additional research.

DOI
10.15276/eltecs.32.108.2020.3

Related papers

Implementation of 5-Qubit approach-based Shor's Algorithm in IBM Qiskit

G. R. Mounica, G. Manimaran, Lauret Jerome +1 more

RSA cryptography is a principle part in today's cyber-security frameworks, which intensely depends on the diffi-culty of factorizing large integers. Finding a factor of large prime number is not a small feature compared to the time complexity for computation on a classical computer is far beyond comprehension. Back in 1994, Peter Shor proposed a quantum algorithm to factorize integers much more efficiently than a classical computer. This can effectively break asymmetric cryptosystems such as RSA or Diffie-Hellman, depicted as the most famous quantum algorithm. It leverages the efficacy proclaimed by quantum bits and clearly shows how quantum computers can outperform classical ones in specific tasks. In this paper, we show how Shor's algorithm factorizes an integer into its two prime factors. Shor uses both classical and quantum computation to perform this task in polynomial time, using Euclidean algorithm and find the greatest common divisor (gcd) of two numbers in the classical part. Thereafter, the power of Quantum Fourier Transform (QFT) and Quantum Phase Estimation (QPE) is utilised for period-finding using quantum bits. We have implemented this algorithm on IBM's Quantum Lab and successfully factorized the number 15 into its prime factors as 5 and 3, by using 5 qubits. This paper provides an overview of the implementation of Shor's algorithm involving QPE, QFT, Modular Exponentiation and the corresponding individual implementations, the only prerequisite being, to know how a qubit works.

IEEE Pune Section International Conference (PuneCon)•Dec 16, 2021•19 citations

Speed improvement of the quantum factorization algorithm of P. Shor by upgrade its classical part

Larissa V. Cherckesova, Olga Alexandrovna Safaryan, Разумов Павел Владимирович +3 more

This report discusses Shor’s quantum factorization algorithm and ρ–Pollard’s factorization algorithm. Shor’s quantum factorization algorithm consists of classical and quantum parts. In the classical part, it is proposed to use Euclidean algorithm, to find the greatest common divisor (GCD), but now exist large number of modern algorithms for finding GCD. Results of calculations of 8 algorithms were considered, among which algorithm with lowest execution rate of task was identified, which allowed the quantum algorithm as whole to work faster, which in turn provides greater potential for practical application of Shor’s quantum algorithm. Standard quantum Shor’s algorithm was upgraded by replacing the binary algorithm with iterative shift algorithm, canceling random number generation operation, using additive chain algorithm for raising to power. Both Shor’s algorithms (standard and upgraded) are distinguished by their high performance, which proves much faster and insignificant increase in time in implementation of data processing. In addition, it was possible to modernize Shor’s quantum algorithm in such way that its efficiency turned out to be higher than standard algorithm because classical part received an improvement, which allows an increase in speed by 12%.

E3S Web of Conferences•Dec 23, 2020•4 citations

A quantum algorithm for greatest common divisor problem

Wen Wang, Xu Jiang, Liangzhu Mu +1 more

We present a quantum algorithm solving the greatest common divisor (GCD) problem. This quantum algorithm possesses similar computational complexity with classical algorithms, such as the well-known Euclidean algorithm for GCD. This algorithm is an application of the quantum algorithms for the hidden subgroup problems, the same as Shor factoring algorithm. Explicit quantum circuits realized by quantum gates for this quantum algorithm are provided. We also give a computer simulation of this quantum algorithm and present the expected outcomes for the corresponding quantum circuit.

arXiv:1707.06430•Jul 20, 2017•3 citations

How to detect whether Shor’s algorithm succeeds against large integers without a quantum computer

Daniel Chicayban Bastos, Luis Antônio Brasil Kowada

Shor’s algorithm is a well-known probabilistic method for factoring large composite integers in polynomial-time on a quantum computer. The method computes the order r of a random element x in the group Z∗N and uses that information for splitting N with an application of the greatest common divisor algorithm. However, being probabilistic, the success of Shor’s algorithm relies on some special properties of N. If r is even and xr/2 £ -1 mod N, then gcd(xr/2 - 1, N) reveals a nontrivial factor of N and the method succeeds. But even assuming that r is even and being given the complete prime factorization of N it is not obvious whether xr/2 £ -1 mod N and, therefore, it is not easy to assert whether Shor’s algorithm would split N without running it and looking at its answer. We present a strategy for detecting whether the splitting occurs without any need for running the quantum order-finding algorithm, but we must be given the prime factorization of N. This has allowed us to produce the first direct evidence of the probability of success of Shor’s method. The composites chosen were the product of two randomly-generated probable primes of similar sizes that pass the Miller-Rabin test.

Procedia Computer Science•Jan 1, 2021•13 citations

Evaluating the Quantum Capabilities in Factorization RSA Modulus

Yaser Alkurdi, Qasem S. Abu Al-Haija

Quantum computing has emerged as a groundbreaking technology, revolutionizing the speed and capabilities of computation. Traditional computing, based on bits represented by 0s and 1s, has limitations in storage and computational efficiency, even with parallel processing. In contrast, quantum computing operates on qubits, enabling exponential reductions in storage requirements and faster computation via quantum parallelism. One prominent quantum algorithm, Shor's Algorithm, presents a significant threat to RSA encryption. This Algorithm efficiently factors large integers, a task considered intractable for classical computers. By leveraging classical and quantum computation techniques, Shor's Algorithm employs the Euclidean algorithm and the Quantum Fourier Transform (QFT) to find the greatest common divisor and perform period-finding, respectively. This research paper explores the implementation and implications of Shor's Algorithm in breaking RSA encryption. Through experiments conducted in IBM's Quantum Lab, the Algorithm successfully factorizes integers, showcasing its efficacy in practice. By examining the potential impact of quantum computing on RSA and exploring the capabilities of Shor's Algorithm, this research contributes to advancing the field of quantum computing and understanding its implications for modern cryptographic systems. The findings underscore the need for post-quantum cryptography to ensure secure communication and data protection in the era of quantum computing.

International Conference on Frontiers of Engineering and Emerging Technologies (FET)•Apr 22, 2026•0 citations

Modular Multiplier for Digital Quantum Coprocessor

Valerii Hlukhov

The article continues research on the creation of digital quantum coprocessors. A quantum computer has a heterogeneous structure. The quantum (probabilistic) part of a quantum computer is considered as a coprocessor in relation to a classical computer (as its accelerator). The digital quantum coprocessor itself has a heterogeneous structure. It consists of a probabilistic part, which implements the actual quantum computations, and a digital part, which performs complex mathematical calculations necessary for the implementation of quantum algorithms. Organization of modular multiplication and exponentiation, which is used in Shor's algorithm, is discussed in this article. It is proposed to perform modular multiplication and exponentiation using well-known logic circuits, namely, sequential multi-bit multipliers. The structure of a serial modular multiplier and its components is considered. The technical characteristics of the components of the modular multiplier are presented. Further work is outlined in the direction of creating a modular multiplier for implementing Shor's algorithm in a digital quantum coprocessor.

IEEE Ukraine Conference on Electrical and Computer Engineering (UKRCON)•Aug 26, 2021•0 citations
The article analyzes the results of finding the period r of the function y = axmodM (a is a random number) which is used in the Shor's factorization algorithm for quantum computers. The module M is the product of two primes p and q. The article analyzes the solutions r obtained for various a, for which the capacitive complexity H of finding the greatest common divisor GCD(ar/2 + 1, M) is the least. A digital quantum computer is a classic processor and its digital quantum coprocessor. A digital quantum coprocessor with hundreds and thousands of digital qubits can be implemented in one programmable logic integrated circuit FPGA. In the Shor’s algorithm, the factorization problem of the number M reduces to the problem of determining the period r of the function y. It is known that GCD(ar/2 + 1, M) can be a divisor of the number M The task of the quantum coprocessor in implementing the Shor’s algorithm is to find the period r. After that it is necessary to find the GCD. Since for random a the problem of finding the period r has many solutions, these solutions can be compared by the value of one of the arguments when finding the GCD - the number ar / 2 . In this case, H = (rlog2a)/2 is taken for analysis. It approximately represents the bit depth of binary codes that a classic computer will have to process when determining the GCD. H can vary over a wide range from tens to thousands of bits even for small values of M. In this research the period r, which ensures the least complexity of the subsequent task of finding the GCD, is most often a solution for a = 3 and a = 2, but it can also occur often with other values of a. To clarify the revealed patterns, especially for large M, it is necessary to conduct additional research.
RSA cryptography is a principle part in today's cyber-security frameworks, which intensely depends on the diffi-culty of factorizing large integers. Finding a factor of large prime number is not a small feature compared to the time complexity for computation on a classical computer is far beyond comprehension. Back in 1994, Peter Shor proposed a quantum algorithm to factorize integers much more efficiently than a classical computer. This can effectively break asymmetric cryptosystems such as RSA or Diffie-Hellman, depicted as the most famous quantum algorithm. It leverages the efficacy proclaimed by quantum bits and clearly shows how quantum computers can outperform classical ones in specific tasks. In this paper, we show how Shor's algorithm factorizes an integer into its two prime factors. Shor uses both classical and quantum computation to perform this task in polynomial time, using Euclidean algorithm and find the greatest common divisor (gcd) of two numbers in the classical part. Thereafter, the power of Quantum Fourier Transform (QFT) and Quantum Phase Estimation (QPE) is utilised for period-finding using quantum bits. We have implemented this algorithm on IBM's Quantum Lab and successfully factorized the number 15 into its prime factors as 5 and 3, by using 5 qubits. This paper provides an overview of the implementation of Shor's algorithm involving QPE, QFT, Modular Exponentiation and the corresponding individual implementations, the only prerequisite being, to know how a qubit works.
This report discusses Shor’s quantum factorization algorithm and ρ–Pollard’s factorization algorithm. Shor’s quantum factorization algorithm consists of classical and quantum parts. In the classical part, it is proposed to use Euclidean algorithm, to find the greatest common divisor (GCD), but now exist large number of modern algorithms for finding GCD. Results of calculations of 8 algorithms were considered, among which algorithm with lowest execution rate of task was identified, which allowed the quantum algorithm as whole to work faster, which in turn provides greater potential for practical application of Shor’s quantum algorithm. Standard quantum Shor’s algorithm was upgraded by replacing the binary algorithm with iterative shift algorithm, canceling random number generation operation, using additive chain algorithm for raising to power. Both Shor’s algorithms (standard and upgraded) are distinguished by their high performance, which proves much faster and insignificant increase in time in implementation of data processing. In addition, it was possible to modernize Shor’s quantum algorithm in such way that its efficiency turned out to be higher than standard algorithm because classical part received an improvement, which allows an increase in speed by 12%.
We present a quantum algorithm solving the greatest common divisor (GCD) problem. This quantum algorithm possesses similar computational complexity with classical algorithms, such as the well-known Euclidean algorithm for GCD. This algorithm is an application of the quantum algorithms for the hidden subgroup problems, the same as Shor factoring algorithm. Explicit quantum circuits realized by quantum gates for this quantum algorithm are provided. We also give a computer simulation of this quantum algorithm and present the expected outcomes for the corresponding quantum circuit.
Shor’s algorithm is a well-known probabilistic method for factoring large composite integers in polynomial-time on a quantum computer. The method computes the order r of a random element x in the group Z∗N and uses that information for splitting N with an application of the greatest common divisor algorithm. However, being probabilistic, the success of Shor’s algorithm relies on some special properties of N. If r is even and xr/2 £ -1 mod N, then gcd(xr/2 - 1, N) reveals a nontrivial factor of N and the method succeeds. But even assuming that r is even and being given the complete prime factorization of N it is not obvious whether xr/2 £ -1 mod N and, therefore, it is not easy to assert whether Shor’s algorithm would split N without running it and looking at its answer. We present a strategy for detecting whether the splitting occurs without any need for running the quantum order-finding algorithm, but we must be given the prime factorization of N. This has allowed us to produce the first direct evidence of the probability of success of Shor’s method. The composites chosen were the product of two randomly-generated probable primes of similar sizes that pass the Miller-Rabin test.
Quantum computing has emerged as a groundbreaking technology, revolutionizing the speed and capabilities of computation. Traditional computing, based on bits represented by 0s and 1s, has limitations in storage and computational efficiency, even with parallel processing. In contrast, quantum computing operates on qubits, enabling exponential reductions in storage requirements and faster computation via quantum parallelism. One prominent quantum algorithm, Shor's Algorithm, presents a significant threat to RSA encryption. This Algorithm efficiently factors large integers, a task considered intractable for classical computers. By leveraging classical and quantum computation techniques, Shor's Algorithm employs the Euclidean algorithm and the Quantum Fourier Transform (QFT) to find the greatest common divisor and perform period-finding, respectively. This research paper explores the implementation and implications of Shor's Algorithm in breaking RSA encryption. Through experiments conducted in IBM's Quantum Lab, the Algorithm successfully factorizes integers, showcasing its efficacy in practice. By examining the potential impact of quantum computing on RSA and exploring the capabilities of Shor's Algorithm, this research contributes to advancing the field of quantum computing and understanding its implications for modern cryptographic systems. The findings underscore the need for post-quantum cryptography to ensure secure communication and data protection in the era of quantum computing.
The article continues research on the creation of digital quantum coprocessors. A quantum computer has a heterogeneous structure. The quantum (probabilistic) part of a quantum computer is considered as a coprocessor in relation to a classical computer (as its accelerator). The digital quantum coprocessor itself has a heterogeneous structure. It consists of a probabilistic part, which implements the actual quantum computations, and a digital part, which performs complex mathematical calculations necessary for the implementation of quantum algorithms. Organization of modular multiplication and exponentiation, which is used in Shor's algorithm, is discussed in this article. It is proposed to perform modular multiplication and exponentiation using well-known logic circuits, namely, sequential multi-bit multipliers. The structure of a serial modular multiplier and its components is considered. The technical characteristics of the components of the modular multiplier are presented. Further work is outlined in the direction of creating a modular multiplier for implementing Shor's algorithm in a digital quantum coprocessor.