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

arXiv:2104.11616

An integer factorization algorithm which uses diffusion as a computational engine

Carlos Alberto Cadavid, Paulina Hoyos, Jay A. Jorgenson, Lejla Smajlović, Vélez, Juan D.

Published Apr 23, 2021• 0 citations
arXivHTMLPDF

Abstract

In this article we develop an algorithm which computes a divisor of an integer $N$, which is assumed to be neither prime nor the power of a prime. The algorithm uses discrete time heat diffusion on a finite graph. If $N$ has $m$ distinct prime factors, then the probability that our algorithm runs successfully is at least $p(m) = 1-(m+1)/2^{m}$. We compute the computational complexity of the algorithm in terms of classical, or digital, steps and in terms of diffusion steps, which is a concept that we define here. As we will discuss below, we assert that a diffusion step can and should be considered as being comparable to a quantum step for an algorithm which runs on a quantum computer. With this, we prove that our factorization algorithm uses at most $O((\log N)^{2})$ deterministic steps and at most $O((\log N)^{2})$ diffusion steps with an implied constant which is effective. By comparison, Shor's algorithm is known to use at most $O((\log N)^{2}\log (\log N) \log (\log \log N))$ quantum steps on a quantum computer. As an example of our algorithm, we simulate the diffusion computer algorithm on a desktop computer and obtain factorizations of $N=33$ and $N=1363$.

DOI
10.48550/arxiv.2104.11616

Related papers

Diffusion Computation versus Quantum Computation: A Comparative Model for Order Finding and Factoring

Carlos Alberto Cadavid, Paulina Hoyos, Jay A. Jorgenson +2 more

We study a hybrid computational model for integer factorization in which the only non-classical resource is access to an \emph{iterated diffusion process} on a finite graph. Concretely, a \emph{diffusion step} is defined to be one application of a symmetric stochastic matrix (the half-lazy walk operator) to an $\ell^{1}$--normalized state vector, followed by an optional readout of selected coordinates. Let $N\ge 3$ be an odd integer which is neither prime nor a prime power, and let $b\in(\mathbb{Z}/N\mathbb{Z})^\ast$ have odd multiplicative order $r={\rm ord}_N(b)$. We construct, without knowing $r$ in advance, a weighted Cayley graph whose vertex set is the cyclic subgroup $\langle b\rangle$ and whose edges correspond to the powers $b^{\pm 2^t}$ for $t\le \lfloor \log_2 N\rfloor+1$. Using an explicit spectral decomposition together with an elementary doubling lemma, we show that $r$ can be recovered from a single heat-kernel value after at most $O((\log_2 N)^2)$ diffusion steps, with an effective bound. We then combine this order-finding model with the standard reduction from factoring to order finding (in the spirit of Shor's framework) to obtain a randomized factorization procedure whose success probability depends only on the number $m$ of distinct prime factors of $N$. Our comparison with Shor's algorithm is \emph{conceptual and model-based}. We replace unitary $\ell^2$ evolution by Markovian $\ell^1$ evolution, and we report complexity in two cost measures: digital steps and diffusion steps. Finally, we include illustrative examples and discussion of practical implementations.

arXiv:2601.02518•Jan 5, 2026•0 citations

On completely factoring any integer efficiently in a single run of an order-finding algorithm

Martin Ekerå

Abstract We show that given the order of a single element selected uniformly at random from $${\mathbb {Z}}_N^*$$ Z N ∗ , we can with very high probability, and for any integer N, efficiently find the complete factorization of N in polynomial time. This implies that a single run of the quantum part of Shor’s factoring algorithm is usually sufficient. All prime factors of N can then be recovered with negligible computational cost in a classical post-processing step. The classical algorithm required for this step is essentially due to Miller.

arXiv:2007.10044•Quantum Information Processing•Jun 1, 2021•14 citations

Integer Factorization by Quantum Measurements

Giuseppe Mussardo, Andrea Trombettoni

Quantum algorithms are at the heart of the ongoing efforts to use quantum mechanics to solve computational problems unsolvable on ordinary classical computers. Their common feature is the use of genuine quantum properties such as entanglement and superposition of states. Among the known quantum algorithms, a special role is played by the Shor algorithm, i.e. a polynomial-time quantum algorithm for integer factorization, with far reaching potential applications in several fields, such as cryptography. Here we present a different algorithm for integer factorization based on another genuine quantum property: quantum measurement. In this new scheme, the factorization of the integer $N$ is achieved in a number of steps equal to the number $k$ of its prime factors, -- e.g., if $N$ is the product of two primes, two quantum measurements are enough, regardless of the number of digits $n$ of the number $N$. Since $k$ is the lower bound to the number of operations one can do to factorize a general integer, one sees that a quantum mechanical setup can saturate such a bound.

arXiv:2309.10757•Sep 19, 2023•2 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•6 citations

Proposing a Quantum simulator for integer factorization

José Luis Rosales, Vicente Martín Ayuso

Many cryptographic algorithms depend on computational complexity assumptions. Notorious cases are the RSA algorithm for public key criptography or the Diffie-Hellman key exchange protocol, to publicly agree on a common secret key. Both algorithms are known to be broken by quantum computing as well as those that can be reduced to a discrete logarithm problem. These are key algorithms in our digital society and are at the basis of everyday tasks, specially those that rely on digital signatures. The RSA algorithm, in particular, is probably the most used algorithm and is its assumed security the one that guards most of the e-commerce nowadays. In this case, it is the time complexity of finding the prime factors of a large number, that grows worse than polinomially with the size of the number, the main guardian of our cyberinfrastructure. The fact that a quantum computer can solve this problem in polynomial time using Shor's algorithm is seen as a potentially major disruption and has prompted security agencies to advice the progressive deprecation of these algorithms.

•Jan 1, 2016•0 citations

Fundamental Structure of Shor’s Quantum Algorithm for Factoring Integers

Turgut Hanoymak, Akram Chehrazi

One of the most well known mathematically hard problems in number theory is the integer factorization problem, roughly stated that decomposition of a composite number into its prime factors. In modern cryptography, RSA encryption algorithm whose security is based on integer factorization problem is highly practical, widespread and up to date no classical algorithm having polynomial running time for the factorization of large numbers is known. In 1994, Peter Shor proposed an efficient algorithm on quantum computer. In this paper, we  mention about the fundamentals of  Shor's quantum algorithm illustrating a concrete example.

Turkish Journal of Mathematics and Computer Science•Dec 31, 2019•0 citations
In this article we develop an algorithm which computes a divisor of an integer NNN, which is assumed to be neither prime nor the power of a prime. The algorithm uses discrete time heat diffusion on a finite graph. If NNN has mmm distinct prime factors, then the probability that our algorithm runs successfully is at least p(m)=1−(m+1)/2mp(m) = 1-(m+1)/2^{m}p(m)=1−(m+1)/2m. We compute the computational complexity of the algorithm in terms of classical, or digital, steps and in terms of diffusion steps, which is a concept that we define here. As we will discuss below, we assert that a diffusion step can and should be considered as being comparable to a quantum step for an algorithm which runs on a quantum computer. With this, we prove that our factorization algorithm uses at most O((log⁡N)2)O((\log N)^{2})O((logN)2) deterministic steps and at most O((log⁡N)2)O((\log N)^{2})O((logN)2) diffusion steps with an implied constant which is effective. By comparison, Shor's algorithm is known to use at most O((log⁡N)2log⁡(log⁡N)log⁡(log⁡log⁡N))O((\log N)^{2}\log (\log N) \log (\log \log N))O((logN)2log(logN)log(loglogN)) quantum steps on a quantum computer. As an example of our algorithm, we simulate the diffusion computer algorithm on a desktop computer and obtain factorizations of N=33N=33N=33 and N=1363N=1363N=1363.
We study a hybrid computational model for integer factorization in which the only non-classical resource is access to an \emph{iterated diffusion process} on a finite graph. Concretely, a \emph{diffusion step} is defined to be one application of a symmetric stochastic matrix (the half-lazy walk operator) to an ℓ1\ell^{1}ℓ1--normalized state vector, followed by an optional readout of selected coordinates. Let N≥3N\ge 3N≥3 be an odd integer which is neither prime nor a prime power, and let b∈(Z/NZ)∗b\in(\mathbb{Z}/N\mathbb{Z})^\astb∈(Z/NZ)∗ have odd multiplicative order r=ordN(b)r={\rm ord}_N(b)r=ordN​(b). We construct, without knowing rrr in advance, a weighted Cayley graph whose vertex set is the cyclic subgroup ⟨b⟩\langle b\rangle⟨b⟩ and whose edges correspond to the powers b±2tb^{\pm 2^t}b±2t for t≤⌊log⁡2N⌋+1t\le \lfloor \log_2 N\rfloor+1t≤⌊log2​N⌋+1. Using an explicit spectral decomposition together with an elementary doubling lemma, we show that rrr can be recovered from a single heat-kernel value after at most O((log⁡2N)2)O((\log_2 N)^2)O((log2​N)2) diffusion steps, with an effective bound. We then combine this order-finding model with the standard reduction from factoring to order finding (in the spirit of Shor's framework) to obtain a randomized factorization procedure whose success probability depends only on the number mmm of distinct prime factors of NNN. Our comparison with Shor's algorithm is \emph{conceptual and model-based}. We replace unitary ℓ2\ell^2ℓ2 evolution by Markovian ℓ1\ell^1ℓ1 evolution, and we report complexity in two cost measures: digital steps and diffusion steps. Finally, we include illustrative examples and discussion of practical implementations.
Abstract We show that given the order of a single element selected uniformly at random from ZN∗{\mathbb {Z}}_N^*ZN∗​ Z N ∗ , we can with very high probability, and for any integer N, efficiently find the complete factorization of N in polynomial time. This implies that a single run of the quantum part of Shor’s factoring algorithm is usually sufficient. All prime factors of N can then be recovered with negligible computational cost in a classical post-processing step. The classical algorithm required for this step is essentially due to Miller.
Quantum algorithms are at the heart of the ongoing efforts to use quantum mechanics to solve computational problems unsolvable on ordinary classical computers. Their common feature is the use of genuine quantum properties such as entanglement and superposition of states. Among the known quantum algorithms, a special role is played by the Shor algorithm, i.e. a polynomial-time quantum algorithm for integer factorization, with far reaching potential applications in several fields, such as cryptography. Here we present a different algorithm for integer factorization based on another genuine quantum property: quantum measurement. In this new scheme, the factorization of the integer NNN is achieved in a number of steps equal to the number kkk of its prime factors, -- e.g., if NNN is the product of two primes, two quantum measurements are enough, regardless of the number of digits nnn of the number NNN. Since kkk is the lower bound to the number of operations one can do to factorize a general integer, one sees that a quantum mechanical setup can saturate such a bound.
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.
Many cryptographic algorithms depend on computational complexity assumptions. Notorious cases are the RSA algorithm for public key criptography or the Diffie-Hellman key exchange protocol, to publicly agree on a common secret key. Both algorithms are known to be broken by quantum computing as well as those that can be reduced to a discrete logarithm problem. These are key algorithms in our digital society and are at the basis of everyday tasks, specially those that rely on digital signatures. The RSA algorithm, in particular, is probably the most used algorithm and is its assumed security the one that guards most of the e-commerce nowadays. In this case, it is the time complexity of finding the prime factors of a large number, that grows worse than polinomially with the size of the number, the main guardian of our cyberinfrastructure. The fact that a quantum computer can solve this problem in polynomial time using Shor's algorithm is seen as a potentially major disruption and has prompted security agencies to advice the progressive deprecation of these algorithms.
One of the most well known mathematically hard problems in number theory is the integer factorization problem, roughly stated that decomposition of a composite number into its prime factors. In modern cryptography, RSA encryption algorithm whose security is based on integer factorization problem is highly practical, widespread and up to date no classical algorithm having polynomial running time for the factorization of large numbers is known. In 1994, Peter Shor proposed an efficient algorithm on quantum computer. In this paper, we  mention about the fundamentals of  Shor's quantum algorithm illustrating a concrete example.