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

Quantum Information and Computation

Probability estimates for Shor's algorithm

Paul Bourdon, H. T. Williams

Published Jul 1, 2007• 6 citations
Publisher

Abstract

Let N be a (large) positive integer, let b be an integer satisfying 1< b < N that is relatively prime to N, and let r be the order of b modulo N. Finally, let QC be a quantum computer whose input register has the size specified in Shor's original description of his order-finding algorithm. In this paper, we analyze the probability that a single run of the quantum component of the algorithm yields useful information---a nontrivial divisor of the order sought. We prove that when Shor's algorithm is implemented on QC, then the probability P of obtaining a (nontrivial) divisor of $r$ exceeds $.7$ whenever N \ge 2^{11} and r\ge 40, and we establish that $.7736$ is an asymptotic lower bound for $P$. When $N$ is not a power of an odd prime, Gerjuoy has shown that $P$ exceeds 90 percent for $N$ and $r$ sufficiently large. We give easily checked conditions on N and r for this 90 percent threshold to hold, and we establish an asymptotic lower bound for $P$ of 2\Si(4\pi)/\pi ~0.9499 in this situation. More generally, for any nonnegative integer $q$, we show that when QC(q) is a quantum computer whose input register has $q$ more qubits than does QC, and Shor's algorithm is run on QC(q), then an asymptotic lower bound on P is 2\Si(2^{q+2}\pi)/\pi (if N is not a power of an odd prime). Our arguments are elementary and our lower bounds on P are carefully justified.

DOI
10.26421/qic7.5-6-7

Related papers

Sharp probability estimates for Shor's order-finding algorithm

Paul Bourdon, H. T. Williams

Let N be a (large positive integer, let b > 1 be an integer relatively prime to N, and let r be the order of b modulo N. Finally, let QC be a quantum computer whose input register has the size specified in Shor's original description of his order-finding algorithm. We prove that when Shor's algorithm is implemented on QC, then the probability P of obtaining a (nontrivial) divisor of r exceeds 0.7 whenever N exceeds 2^{11}-1 and r exceeds 39, and we establish that 0.7736 is an asymptotic lower bound for P. When N is not a power of an odd prime, Gerjuoy has shown that P exceeds 90 percent for N and r sufficiently large. We give easily checked conditions on N and r for this 90 percent threshold to hold, and we establish an asymptotic lower bound for P of (2/Pi) Si(4Pi), about .9499, in this situation. More generally, for any nonnegative integer q, we show that when QC(q) is a quantum computer whose input register has q more qubits than does QC, and Shor's algorithm is run on QC(q), then an asymptotic lower bound on P is (2/Pi) Si(2^(q+2) Pi) (if N is not a power of an odd prime). Our arguments are elementary and our lower bounds on P are carefully justified.

arXiv:quant-ph/0607148•Quantum Information and Computation•Jul 21, 2006•14 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

On the Success Probability of Quantum Order Finding

Martin Ekerå

We prove a lower bound on the probability of Shor’s order-finding algorithm successfully recovering the order r in a single run. The bound implies that by performing two limited searches in the classical post-processing part of the algorithm, a high success probability can be guaranteed, for any r , without re-running the quantum part or increasing the exponent length compared to Shor. Asymptotically, in the limit as r tends to infinity, the probability of successfully recovering r in a single run tends to one. Already for moderate r , a high success probability exceeding e.g. 1 - 10 -4 can be guaranteed. As corollaries, we prove analogous results for the probability of completely factoring any integer N in a single run of the order-finding algorithm.

arXiv:2201.07791•ACM Transactions on Quantum Computing•May 20, 2024•16 citations

Revisiting Shor's quantum algorithm for computing general discrete logarithms

Martin Ekerå

We heuristically show that Shor's quantum algorithm for the DLP achieves an expected success probability of approximately 60-82% in a single run when modified to enable efficient implementation with the semi-classical QFT. By slightly increasing the number of group operations that are evaluated quantumly and performing a single limited search in the post-processing, or by performing two limited searches in the post-processing, we rigorously prove that the modified algorithm can be made to achieve a success probability that, e.g., exceeds $1 - 10^{-4}$ in a single run. Specifically, we give an exact analysis of the probability distribution induced by the algorithm and use it to prove a lower bound on the success probability, as a function of the group order $r$, the size of the search space in the post-processing, and the number of additional group operations evaluated quantumly. In the limit as $r \rightarrow \infty$, we show that the lower bound can be made to tend to one. In analogy with our earlier work, we explain how the limited searches in the post-processing can be performed efficiently using meet-in-the-middle or random-walk techniques, and we show how slightly better tradeoffs can be achieved, compared to our earlier work, when $r$ is known. We generalize our exact analysis to cover several quantum algorithms analyzed in our earlier works, including for parameter regimes not covered by our earlier analyses, yielding a unified lens on all of these algorithms. Furthermore, we generalize our exact analysis to the setting where information on multiple discrete logarithms is computed in each run of the algorithm so as to amortize costs. Last but not least, we give a novel exact simulator, which is based on our generalized exact analysis, and which hence works for all quantum algorithms covered by said analysis.

cs.CRCross-listedarXiv:1905.09084•May 23, 2019•33 citations

A Refinement of Shor's Algorithm

D. S. McAnally

A refinement of Shor's Algorithm for determining order is introduced, which determines a divisor of the order after any one run of a quantum computer with almost absolute certainty. The information garnered from each run is accumulated to determine the order, and for any k greater than 1, there is a guaranteed minimum positive probability that the order will be determined after at most k runs. The probability of determination of the order after at most k runs exponentially approaches a value negligibly less than one, so that the accumulated information determines the order with almost absolute certainty. The probability of determining the order after at most two runs is more than 60%, and the probability of determining the order after at most four runs is more than 90%.

arXiv:quant-ph/0112055•Dec 9, 2001•14 citations

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

Martin Ekerå

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•24 citations
Let N be a (large) positive integer, let b be an integer satisfying 1< b < N that is relatively prime to N, and let r be the order of b modulo N. Finally, let QC be a quantum computer whose input register has the size specified in Shor's original description of his order-finding algorithm. In this paper, we analyze the probability that a single run of the quantum component of the algorithm yields useful information---a nontrivial divisor of the order sought. We prove that when Shor's algorithm is implemented on QC, then the probability P of obtaining a (nontrivial) divisor of rrr exceeds .7.7.7 whenever N \ge 2^{11} and r\ge 40, and we establish that .7736.7736.7736 is an asymptotic lower bound for PPP. When NNN is not a power of an odd prime, Gerjuoy has shown that PPP exceeds 90 percent for NNN and rrr sufficiently large. We give easily checked conditions on N and r for this 90 percent threshold to hold, and we establish an asymptotic lower bound for PPP of 2\Si(4\pi)/\pi ~0.9499 in this situation. More generally, for any nonnegative integer qqq, we show that when QC(q) is a quantum computer whose input register has qqq more qubits than does QC, and Shor's algorithm is run on QC(q), then an asymptotic lower bound on P is 2\Si(2^{q+2}\pi)/\pi (if N is not a power of an odd prime). Our arguments are elementary and our lower bounds on P are carefully justified.
Let N be a (large positive integer, let b > 1 be an integer relatively prime to N, and let r be the order of b modulo N. Finally, let QC be a quantum computer whose input register has the size specified in Shor's original description of his order-finding algorithm. We prove that when Shor's algorithm is implemented on QC, then the probability P of obtaining a (nontrivial) divisor of r exceeds 0.7 whenever N exceeds 2^{11}-1 and r exceeds 39, and we establish that 0.7736 is an asymptotic lower bound for P. When N is not a power of an odd prime, Gerjuoy has shown that P exceeds 90 percent for N and r sufficiently large. We give easily checked conditions on N and r for this 90 percent threshold to hold, and we establish an asymptotic lower bound for P of (2/Pi) Si(4Pi), about .9499, in this situation. More generally, for any nonnegative integer q, we show that when QC(q) is a quantum computer whose input register has q more qubits than does QC, and Shor's algorithm is run on QC(q), then an asymptotic lower bound on P is (2/Pi) Si(2^(q+2) Pi) (if N is not a power of an odd prime). Our arguments are elementary and our lower bounds on P are carefully justified.
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.
We prove a lower bound on the probability of Shor’s order-finding algorithm successfully recovering the order r in a single run. The bound implies that by performing two limited searches in the classical post-processing part of the algorithm, a high success probability can be guaranteed, for any r , without re-running the quantum part or increasing the exponent length compared to Shor. Asymptotically, in the limit as r tends to infinity, the probability of successfully recovering r in a single run tends to one. Already for moderate r , a high success probability exceeding e.g. 1 - 10 -4 can be guaranteed. As corollaries, we prove analogous results for the probability of completely factoring any integer N in a single run of the order-finding algorithm.
We heuristically show that Shor's quantum algorithm for the DLP achieves an expected success probability of approximately 60-82% in a single run when modified to enable efficient implementation with the semi-classical QFT. By slightly increasing the number of group operations that are evaluated quantumly and performing a single limited search in the post-processing, or by performing two limited searches in the post-processing, we rigorously prove that the modified algorithm can be made to achieve a success probability that, e.g., exceeds 1−10−41 - 10^{-4}1−10−4 in a single run. Specifically, we give an exact analysis of the probability distribution induced by the algorithm and use it to prove a lower bound on the success probability, as a function of the group order rrr, the size of the search space in the post-processing, and the number of additional group operations evaluated quantumly. In the limit as r→∞r \rightarrow \inftyr→∞, we show that the lower bound can be made to tend to one. In analogy with our earlier work, we explain how the limited searches in the post-processing can be performed efficiently using meet-in-the-middle or random-walk techniques, and we show how slightly better tradeoffs can be achieved, compared to our earlier work, when rrr is known. We generalize our exact analysis to cover several quantum algorithms analyzed in our earlier works, including for parameter regimes not covered by our earlier analyses, yielding a unified lens on all of these algorithms. Furthermore, we generalize our exact analysis to the setting where information on multiple discrete logarithms is computed in each run of the algorithm so as to amortize costs. Last but not least, we give a novel exact simulator, which is based on our generalized exact analysis, and which hence works for all quantum algorithms covered by said analysis.
A refinement of Shor's Algorithm for determining order is introduced, which determines a divisor of the order after any one run of a quantum computer with almost absolute certainty. The information garnered from each run is accumulated to determine the order, and for any k greater than 1, there is a guaranteed minimum positive probability that the order will be determined after at most k runs. The probability of determination of the order after at most k runs exponentially approaches a value negligibly less than one, so that the accumulated information determines the order with almost absolute certainty. The probability of determining the order after at most two runs is more than 60%, and the probability of determining the order after at most four runs is more than 90%.
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.