fbpx
Wikipedia

Shor's algorithm

Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor.[1][2] It is one of the few known quantum algorithms with compelling potential applications and strong evidence of superpolynomial speedup compared to best known classical (that is, non-quantum) algorithms.[3] On the other hand, factoring numbers of practical significance requires far more qubits than available in the near future.[4] Another concern is that noise in quantum circuits may undermine results,[5] requiring additional qubits for quantum error correction.

Shor proposed multiple similar algorithms for solving the factoring problem, the discrete logarithm problem, and the period-finding problem. "Shor's algorithm" usually refers to the factoring algorithm, but may refer to any of the three algorithms. The discrete logarithm algorithm and the factoring algorithm are instances of the period-finding algorithm, and all three are instances of the hidden subgroup problem.

On a quantum computer, to factor an integer , Shor's algorithm runs in polynomial time, meaning the time taken is polynomial in , the size of the integer given as input.[6] Specifically, it takes quantum gates of order using fast multiplication,[7] or even utilizing the asymptotically fastest multiplication algorithm currently known due to Harvey and Van Der Hoven,[8] thus demonstrating that the integer factorization problem can be efficiently solved on a quantum computer and is consequently in the complexity class BQP. This is significantly faster than the most efficient known classical factoring algorithm, the general number field sieve, which works in sub-exponential time: .[9]

Feasibility and impact edit

If a quantum computer with a sufficient number of qubits could operate without succumbing to quantum noise and other quantum-decoherence phenomena, then Shor's algorithm could be used to break public-key cryptography schemes, such as

  • The RSA scheme
  • The Finite Field Diffie-Hellman key exchange
  • The Elliptic Curve Diffie-Hellman key exchange[10]

RSA is based on the assumption that factoring large integers is computationally intractable. As far as is known, this assumption is valid for classical (non-quantum) computers; no classical algorithm is known that can factor integers in polynomial time. However, Shor's algorithm shows that factoring integers is efficient on an ideal quantum computer, so it may be feasible to defeat RSA by constructing a large quantum computer. It was also a powerful motivator for the design and construction of quantum computers, and for the study of new quantum-computer algorithms. It has also facilitated research on new cryptosystems that are secure from quantum computers, collectively called post-quantum cryptography.

Physical implementation edit

Given the high error rates of contemporary quantum computers and too few qubits to use quantum error correction, laboratory demonstrations obtain correct results only in a fraction of attempts.

In 2001, Shor's algorithm was demonstrated by a group at IBM, who factored   into  , using an NMR implementation of a quantum computer with seven qubits.[11] After IBM's implementation, two independent groups implemented Shor's algorithm using photonic qubits, emphasizing that multi-qubit entanglement was observed when running the Shor's algorithm circuits.[12][13] In 2012, the factorization of   was performed with solid-state qubits.[14] Later, in 2012, the factorization of   was achieved.[15] In 2019, an attempt was made to factor the number   using Shor's algorithm on an IBM Q System One, but the algorithm failed because of accumulating errors.[16] However, due to the lack of number of qubits, all these demonstrations were compiled version, which is based on the prior knowledge of the answer.[17] Though larger numbers have been factored by quantum computers using other algorithms,[18] these algorithms are similar to classical brute-force checking of factors, so unlike Shor's algorithm, they are not expected to ever perform better than classical factoring algorithms.[19]

Theoretical analyses of Shor's algorithm assume a quantum computer free of noise and errors. However, near-term practical implementations will have to deal with such undesired phenomena (when more qubits are available, Quantum error correction can help). In 2023, Jin-Yi Cai showed that in the presence of noise, Shor's algorithm fails asymptotically almost surely for large semiprimes that are products of two primes in OEIS sequence A073024.[5] These primes   have the property that   has a prime factor larger than  , and have a positive density in the set of all primes. Hence error-correction will be needed to be able to factor all numbers with Shor's algorithm.

Algorithm edit

The problem that we are trying to solve is: given an odd composite number  , find its integer factors.

To achieve this, Shor's algorithm consists of two parts:

  1. A classical reduction of the factoring problem to the problem of order-finding. This reduction is similar to that used for other factoring algorithms, such as the quadratic sieve.
  2. A quantum algorithm to solve the order-finding problem.

Classical reduction edit

A complete factoring algorithm is possible if we're able to efficiently factor arbitrary   into just two integers   and   greater than 1, since if either   or   are not prime then the factoring algorithm can in turn be run on those until only primes remain.

A basic observation is that, using Euclid's algorithm, we can always compute the GCD between two integers efficiently. In particular, this means we can check efficiently whether   is even, in which case 2 is trivially a factor. Let us thus assume that   is odd for the remainder of this discussion. Afterwards, we can use efficient classical algorithms to check if   is a prime power.[20] For prime powers, efficient classical factorization algorithms exist,[21] hence the rest of the quantum algorithm may assume that   is not a prime power.

If those easy cases do not produce a nontrivial factor of  , the algorithm proceeds to handle the remaining case. We pick a random integer  . A possible nontrivial divisor of   can be found by computing  , which can be done classically and efficiently using the Euclidean algorithm. If this produces a nontrivial factor (meaning  ), the algorithm is finished, and the other nontrivial factor is  . If a nontrivial factor was not identified, then that means that   and the choice of   are coprime, so   is contained in the multiplicative group of integers modulo  , having a multiplicative inverse modulo  . Thus,   has a multiplicative order   modulo  , meaning

 

and   is the smallest positive integer satisfying this congruence.

The quantum subroutine finds  . It can be seen from the congruence that   divides  , written  . This can be factored using difference of squares:

 
Since we have factored the expression in this way, the algorithm doesn't work for odd   (because   must be an integer), meaning the algorithm would have to restart with a new  . Hereafter we can therefore assume   is even. It cannot be the case that  , since this would imply  , which would contradictorily imply that   would be the order of  , which was already  . At this point, it may or may not be the case that  . If it is not true that  , then that means we are able to find a nontrivial factor of  . We compute
 
If  , then that means   was true, and a nontrivial factor of   cannot be achieved from  , and the algorithm must restart with a new  . Otherwise, we have found a nontrivial factor of  , with the other being  , and the algorithm is finished. For this step, it is also equivalent to compute  ; it will produce a nontrivial factor if   is nontrivial, and will not if it's trivial (where  ).

The algorithm restated shortly follows: let   be odd, and not a prime power. We want to output two nontrivial factors of  .

  1. Pick a random number  .
  2. Compute  , the greatest common divisor of   and  .
  3. If  , then   is a nontrivial factor of  , with the other factor being   and we are done.
  4. Otherwise, use the quantum subroutine to find the order   of  .
  5. If   is odd, then go back to step 1.
  6. Compute  . If   is nontrivial, the other factor is  , and we're done. Otherwise, go back to step 1.

It has been shown that this will be likely to succeed after a few runs.[2] In practice, a single call to the quantum order-finding subroutine is enough to completely factor   with very high probability of success if one uses a more advanced reduction.[22]

Quantum order-finding subroutine edit

The goal of the quantum subroutine of Shor's algorithm is, given coprime integers   and  , to find the order   of   modulo  , which is the smallest positive integer such that  . To achieve this, Shor's algorithm uses a quantum circuit involving two registers. The second register uses   qubits, where   is the smallest integer such that  , i.e.,  . The size of the first register determines how accurate of an approximation the circuit produces. It can be shown that using   qubits gives sufficient accuracy to find  . The exact quantum circuit depends on the parameters   and  , which define the problem. The following description of the algorithm uses bra–ket notation to denote quantum states, and   to denote the tensor product, rather than logical AND.

The algorithm consists of two main steps:

  1. Use quantum phase estimation with unitary   representing the operation of multiplying by   (modulo  ), and input state   (where the second register is   made from   qubits). The eigenvalues of this   encode information about the period, and   can be seen to be writable as a sum of its eigenvectors. Thanks to these properties, the quantum phase estimation stage gives as output a random integer of the form   for random  .
  2. Use the continued fractions algorithm to extract the period   from the measurement outcomes obtained in the previous stage. This is a procedure to post-process (with a classical computer) the measurement data obtained from measuring the output quantum states, and retrieve the period.

The connection with quantum phase estimation was not discussed in the original formulation of Shor's algorithm,[2] but was later proposed by Kitaev.[23]

Quantum phase estimation edit

 
Quantum subroutine in Shor's algorithm

In general the quantum phase estimation algorithm, for any unitary   and eigenstate   such that  , sends inputs states   into output states close to  , where   is an integer close to  . In other words, it sends each eigenstate   of   into a state close to the associated eigenvalue. For the purposes of quantum order-finding, we employ this strategy using the unitary defined by the action

 
The action of   on states   with   is not crucial to the functioning of the algorithm, but needs to be included to ensure the overall transformation is a well-defined quantum gate. Implementing the circuit for quantum phase estimation with   requires being able to efficiently implement the gates  . This can be accomplished via modular exponentiation, which is the slowest part of the algorithm. The gate thus defined satisfies  , which immediately implies that its eigenvalues are the  -th roots of unity  . Furthermore, each eigenvalue   has an eigenvector of the form  , and these eigenvectors are such that
 


where the last identity follows from the geometric series formula, which implies  .

Using quantum phase estimation on an input state   would then return the integer   with high probability. More precisely, the quantum phase estimation circuit sends   to   such that the resulting probability distribution   is peaked around  , with  . This probability can be made arbitrarily close to 1 using extra qubits.

Applying the above reasoning to the input  , quantum phase estimation thus results in the evolution

 
Measuring the first register, we now have a balanced probability   to find each  , each one giving an integer approximation to  , which can be divided by   to get a decimal approximation for  .

Continued fraction algorithm to retrieve the period edit

Then, we apply the continued fractions algorithm to find integers   and  , where   gives the best fraction approximation for the approximation measured from the circuit, for   and coprime   and  . The number of qubits in the first register,  , which determines the accuracy of the approximation, guarantees that

 
given the best approximation from the superposition of   was measured[citation needed] (which can be made arbitrarily likely by using extra bits and truncating the output). However, while   and   are coprime, it may be the case that   and   are not coprime. Because of that,   and   may have lost some factors that were in   and  . This can be remedied by rerunning the quantum subroutine an arbitrary number of times, to produce a list of fraction approximations
 
where   is the number of times the algorithm was run. Each   will have different factors taken out of it because the circuit will (likely) have measured multiple different possible values of  . To recover the actual   value, we can take the least common multiple of each  :
 
The least common multiple will be the order   of the original integer   with high probability.

Choosing the size of the first register edit

Phase estimation requires choosing the size of the first register to determine the accuracy of the algorithm, and for the quantum subroutine of Shor's algorithm,   qubits is sufficient to guarantee that the optimal bitstring measured from phase estimation (meaning the   where   is the most accurate approximation of the phase from phase estimation) will allow the actual value of   to be recovered.

Each   before measurement in Shor's algorithm represents a superposition of integers approximating  . Let   represent the most optimal integer in  . The following theorem guarantees that the continued fractions algorithm will recover   from  :

Theorem — If   and   are   bit integers, and

 
then the continued fractions algorithm run on   will recover both   and  .

[3] As   is the optimal bitstring from phase estimation,   is accurate to   by   bits. Thus,

 
which implies that the continued fractions algorithm will recover   and   (or with their greatest common divisor taken out).

The bottleneck edit

The runtime bottleneck of Shor's algorithm is quantum modular exponentiation, which is by far slower than the quantum Fourier transform and classical pre-/post-processing. There are several approaches to constructing and optimizing circuits for modular exponentiation. The simplest and (currently) most practical approach is to mimic conventional arithmetic circuits with reversible gates, starting with ripple-carry adders. Knowing the base and the modulus of exponentiation facilitates further optimizations.[24][25] Reversible circuits typically use on the order of   gates for   qubits. Alternative techniques asymptotically improve gate counts by using quantum Fourier transforms, but are not competitive with fewer than 600 qubits owing to high constants.

Period finding and discrete logarithms edit

Shor's algorithms for the discrete log and the order finding problems are instances of an algorithm solving the period finding problem.[citation needed]. All three are instances of the hidden subgroup problem.

Shor's algorithm for discrete logarithms edit

Given a group   with order   and generator  , suppose we know that  , for some  , and we wish to compute  , which is the discrete logarithm:  . Consider the abelian group  , where each factor corresponds to modular addition of values. Now, consider the function

 

This gives us an abelian hidden subgroup problem, where   corresponds to a group homomorphism. The kernel corresponds to the multiples of  . So, if we can find the kernel, we can find  . A quantum algorithm for solving this problem exists. This algorithm is, like the factor-finding algorithm, due to Peter Shor and both are implemented by creating a superposition through using Hadamard gates, followed by implementing   as a quantum transform, followed finally by a quantum Fourier transform.[3] Due to this, the quantum algorithm for computing the discrete logarithm is also occasionally referred to as "Shor's Algorithm."

The order-finding problem can also be viewed as a hidden subgroup problem.[3] To see this, consider the group of integers under addition, and for a given   such that:  , the function

 

For any finite abelian group  , a quantum algorithm exists for solving the hidden subgroup for   in polynomial time.[3]

See also edit

References edit

  1. ^ Shor, P.W. (1994). "Algorithms for quantum computation: Discrete logarithms and factoring". Proceedings 35th Annual Symposium on Foundations of Computer Science. pp. 124–134. doi:10.1109/sfcs.1994.365700. ISBN 978-0-8186-6580-6.
  2. ^ a b c Shor, Peter W. (October 1997). "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer". SIAM Journal on Computing. 26 (5): 1484–1509. arXiv:quant-ph/9508027. doi:10.1137/S0097539795293172. S2CID 2337707.
  3. ^ a b c d e Nielsen, Michael A.; Chuang, Isaac L. (9 December 2010). Quantum Computation and Quantum Information (PDF) (7th ed.). Cambridge University Press. ISBN 978-1-107-00217-3. (PDF) from the original on 2019-07-11. Retrieved 24 April 2022.
  4. ^ Gidney, Craig; Ekerå, Martin (2021). "How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits". Quantum. 5: 433. arXiv:1905.09749. Bibcode:2021Quant...5..433G. doi:10.22331/q-2021-04-15-433. S2CID 162183806.
  5. ^ a b Cai, Jin-Yi (2023). "Shor's Algorithm Does Not Factor Large Integers in the Presence of Noise". arXiv:2306.10072 [quant-ph].
  6. ^ See also pseudo-polynomial time.
  7. ^ Beckman, David; Chari, Amalavoyal N.; Devabhaktuni, Srikrishna; Preskill, John (August 1996). "Efficient networks for quantum factoring". Physical Review A. 54 (2): 1034–1063. arXiv:quant-ph/9602016. Bibcode:1996PhRvA..54.1034B. doi:10.1103/physreva.54.1034. PMID 9913575.
  8. ^ Harvey, David; van der Hoeven, Joris (March 2021). "Integer multiplication in time O (n log n)" (PDF). Annals of Mathematics. 193 (2). doi:10.4007/annals.2021.193.2.4.
  9. ^ "Number Field Sieve". wolfram.com. Retrieved 23 October 2015.
  10. ^ Roetteler, Martin; Naehrig, Michael; Svore, Krysta M.; Lauter, Kristin E. (2017). "Quantum resource estimates for computing elliptic curve discrete logarithms". In Takagi, Tsuyoshi; Peyrin, Thomas (eds.). Advances in Cryptology – ASIACRYPT 2017 – 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3–7, 2017, Proceedings, Part II. Lecture Notes in Computer Science. Vol. 10625. Springer. pp. 241–270. arXiv:1706.06752. doi:10.1007/978-3-319-70697-9_9. ISBN 978-3-319-70696-2.
  11. ^ Vandersypen, Lieven M. K.; Steffen, Matthias; Breyta, Gregory; Yannoni, Costantino S.; Sherwood, Mark H.; Chuang, Isaac L. (December 2001). "Experimental realization of Shor's quantum factoring algorithm using nuclear magnetic resonance". Nature. 414 (6866): 883–887. arXiv:quant-ph/0112176. Bibcode:2001Natur.414..883V. doi:10.1038/414883a. PMID 11780055.
  12. ^ Lu, Chao-Yang; Browne, Daniel E.; Yang, Tao; Pan, Jian-Wei (19 December 2007). "Demonstration of a Compiled Version of Shor's Quantum Factoring Algorithm Using Photonic Qubits". Physical Review Letters. 99 (25): 250504. arXiv:0705.1684. Bibcode:2007PhRvL..99y0504L. doi:10.1103/PhysRevLett.99.250504. PMID 18233508.
  13. ^ Lanyon, B. P.; Weinhold, T. J.; Langford, N. K.; Barbieri, M.; James, D. F. V.; Gilchrist, A.; White, A. G. (19 December 2007). "Experimental Demonstration of a Compiled Version of Shor's Algorithm with Quantum Entanglement". Physical Review Letters. 99 (25): 250505. arXiv:0705.1398. Bibcode:2007PhRvL..99y0505L. doi:10.1103/PhysRevLett.99.250505. PMID 18233509.
  14. ^ Lucero, Erik; Barends, Rami; Chen, Yu; Kelly, Julian; Mariantoni, Matteo; Megrant, Anthony; O'Malley, Peter; Sank, Daniel; Vainsencher, Amit; Wenner, James; White, Ted; Yin, Yi; Cleland, Andrew N.; Martinis, John M. (2012). "Computing prime factors with a Josephson phase qubit quantum processor". Nature Physics. 8 (10): 719. arXiv:1202.5707. Bibcode:2012NatPh...8..719L. doi:10.1038/nphys2385. S2CID 44055700.
  15. ^ Martín-López, Enrique; Martín-López, Enrique; Laing, Anthony; Lawson, Thomas; Alvarez, Roberto; Zhou, Xiao-Qi; O'Brien, Jeremy L. (12 October 2012). "Experimental realization of Shor's quantum factoring algorithm using qubit recycling". Nature Photonics. 6 (11): 773–776. arXiv:1111.4147. Bibcode:2012NaPho...6..773M. doi:10.1038/nphoton.2012.259. S2CID 46546101.
  16. ^ Amico, Mirko; Saleem, Zain H.; Kumph, Muir (8 July 2019). "Experimental study of Shor's factoring algorithm using the IBM Q Experience". Physical Review A. 100 (1): 012305. arXiv:1903.00768. Bibcode:2019PhRvA.100a2305A. doi:10.1103/PhysRevA.100.012305. S2CID 92987546.
  17. ^ Smolin, John A.; Smith, Graeme; Vargo, Alexander (July 2013). "Oversimplifying quantum factoring". Nature. 499 (7457): 163–165. arXiv:1301.7007. Bibcode:2013Natur.499..163S. doi:10.1038/nature12290. PMID 23846653.
  18. ^ Karamlou, Amir H.; Simon, William A.; Katabarwa, Amara; Scholten, Travis L.; Peropadre, Borja; Cao, Yudong (28 October 2021). "Analyzing the performance of variational quantum factoring on a superconducting quantum processor". npj Quantum Information. 7 (1): 156. arXiv:2012.07825. Bibcode:2021npjQI...7..156K. doi:10.1038/s41534-021-00478-z.
  19. ^ "Quantum computing motte-and-baileys". Shtetl-Optimized. 2019-12-28. Retrieved 2021-11-15.
  20. ^ Bernstein, Daniel (1998). "Detecting perfect powers in essentially linear time". Mathematics of Computation. 67 (223): 1253–1283. doi:10.1090/S0025-5718-98-00952-1.
  21. ^ e.g., computing the first   roots of  , e.g., with the Newton method and checking each integer result for primality (AKS primality test).
  22. ^ Ekerå, Martin (June 2021). "On completely factoring any integer efficiently in a single run of an order-finding algorithm". Quantum Information Processing. 20 (6): 205. arXiv:2007.10044. Bibcode:2021QuIP...20..205E. doi:10.1007/s11128-021-03069-1.
  23. ^ Kitaev, A. Yu (1995). "Quantum measurements and the Abelian Stabilizer Problem". arXiv:quant-ph/9511026.
  24. ^ Markov, Igor L.; Saeedi, Mehdi (2012). "Constant-Optimized Quantum Circuits for Modular Multiplication and Exponentiation". Quantum Information and Computation. 12 (5–6): 361–394. arXiv:1202.6614. Bibcode:2012arXiv1202.6614M. doi:10.26421/QIC12.5-6-1. S2CID 16595181.
  25. ^ Markov, Igor L.; Saeedi, Mehdi (2013). "Faster Quantum Number Factoring via Circuit Synthesis". Phys. Rev. A. 87 (1): 012310. arXiv:1301.3210. Bibcode:2013PhRvA..87a2310M. doi:10.1103/PhysRevA.87.012310. S2CID 2246117.
  26. ^ Bernstein, Daniel J.; Heninger, Nadia; Lou, Paul; Valenta, Luke (2017). "Post-quantum RSA". Post-Quantum Cryptography. Lecture Notes in Computer Science. Vol. 10346. pp. 311–329. doi:10.1007/978-3-319-59879-6_18. ISBN 978-3-319-59878-9.

Further reading edit

  • Nielsen, Michael A.; Chuang, Isaac L. (2010). Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press. ISBN 978-1-107-00217-3.
  • Kaye, Phillip; Laflamme, Raymond; Mosca, Michele (2006). An Introduction to Quantum Computing. doi:10.1093/oso/9780198570004.001.0001. ISBN 978-0-19-857000-4.
  • "Explanation for the man in the street" by Scott Aaronson, "approved" by Peter Shor. (Shor wrote "Great article, Scott! That’s the best job of explaining quantum computing to the man on the street that I’ve seen."). An alternate metaphor for the QFT was presented in one of the comments. Scott Aaronson suggests the following 12 references as further reading (out of "the 10105000 quantum algorithm tutorials that are already on the web."):
  • Shor, Peter W. (1997), "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer", SIAM J. Comput., 26 (5): 1484–1509, arXiv:quant-ph/9508027v2, Bibcode:1999SIAMR..41..303S, doi:10.1137/S0036144598347011. Revised version of the original paper by Peter Shor ("28 pages, LaTeX. This is an expanded version of a paper that appeared in the Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, Nov. 20--22, 1994. Minor revisions made January, 1996").
  • Quantum Computing and Shor's Algorithm, Matthew Hayward's Quantum Algorithms Page, 2005-02-17, imsa.edu, LaTeX2HTML version of the original LaTeX document, also available as PDF or postscript document.
  • Quantum Computation and Shor's Factoring Algorithm, Ronald de Wolf, CWI and University of Amsterdam, January 12, 1999, 9 page postscript document.
  • Shor's Factoring Algorithm, Notes from Lecture 9 of Berkeley CS 294–2, dated 4 Oct 2004, 7 page postscript document.
  • Chapter 6 Quantum Computation 2020-04-30 at the Wayback Machine, 91 page postscript document, Caltech, Preskill, PH229.
  • Quantum computation: a tutorial by Samuel L. Braunstein.
  • The Quantum States of Shor's Algorithm, by Neal Young, Last modified: Tue May 21 11:47:38 1996.
  • , Lecture notes on Quantum computation, Cornell University, Physics 481–681, CS 483; Spring, 2006 by N. David Mermin. Last revised 2006-03-28, 30 page PDF document.
  • Lavor, C.; Manssur, L. R. U.; Portugal, R. (2003). "Shor's Algorithm for Factoring Large Integers". arXiv:quant-ph/0303175.
  • Lomonaco, Jr (2000). "Shor's Quantum Factoring Algorithm". arXiv:quant-ph/0010034. This paper is a written version of a one-hour lecture given on Peter Shor's quantum factoring algorithm. 22 pages.
  • Chapter 20 Quantum Computation, from Computational Complexity: A Modern Approach, Draft of a book: Dated January 2007, Sanjeev Arora and Boaz Barak, Princeton University. Published as Chapter 10 Quantum Computation of Sanjeev Arora, Boaz Barak, "Computational Complexity: A Modern Approach", Cambridge University Press, 2009, ISBN 978-0-521-42426-4
  • A Step Toward Quantum Computing: Entangling 10 Billion Particles 2011-01-20 at the Wayback Machine, from "Discover Magazine", Dated January 19, 2011.
  • Josef Gruska - Quantum Computing Challenges also in Mathematics unlimited: 2001 and beyond, Editors Björn Engquist, Wilfried Schmid, Springer, 2001, ISBN 978-3-540-66913-5

External links edit

  • Version 1.0.0 of libquantum: contains a C language implementation of Shor's algorithm with their simulated quantum computer library, but the width variable in shor.c should be set to 1 to improve the runtime complexity.
  • PBS Infinite Series created two videos explaining the math behind Shor's algorithm, "How to Break Cryptography" and "Hacking at Quantum Speed with Shor's Algorithm".

shor, algorithm, quantum, algorithm, finding, prime, factors, integer, developed, 1994, american, mathematician, peter, shor, known, quantum, algorithms, with, compelling, potential, applications, strong, evidence, superpolynomial, speedup, compared, best, kno. Shor s algorithm is a quantum algorithm for finding the prime factors of an integer It was developed in 1994 by the American mathematician Peter Shor 1 2 It is one of the few known quantum algorithms with compelling potential applications and strong evidence of superpolynomial speedup compared to best known classical that is non quantum algorithms 3 On the other hand factoring numbers of practical significance requires far more qubits than available in the near future 4 Another concern is that noise in quantum circuits may undermine results 5 requiring additional qubits for quantum error correction Shor proposed multiple similar algorithms for solving the factoring problem the discrete logarithm problem and the period finding problem Shor s algorithm usually refers to the factoring algorithm but may refer to any of the three algorithms The discrete logarithm algorithm and the factoring algorithm are instances of the period finding algorithm and all three are instances of the hidden subgroup problem On a quantum computer to factor an integer N displaystyle N Shor s algorithm runs in polynomial time meaning the time taken is polynomial in log N displaystyle log N the size of the integer given as input 6 Specifically it takes quantum gates of order O log N 2 log log N log log log N displaystyle O left log N 2 log log N log log log N right using fast multiplication 7 or even O log N 2 log log N displaystyle O left log N 2 log log N right utilizing the asymptotically fastest multiplication algorithm currently known due to Harvey and Van Der Hoven 8 thus demonstrating that the integer factorization problem can be efficiently solved on a quantum computer and is consequently in the complexity class BQP This is significantly faster than the most efficient known classical factoring algorithm the general number field sieve which works in sub exponential time O e 1 9 log N 1 3 log log N 2 3 displaystyle O left e 1 9 log N 1 3 log log N 2 3 right 9 Contents 1 Feasibility and impact 1 1 Physical implementation 2 Algorithm 2 1 Classical reduction 2 2 Quantum order finding subroutine 2 2 1 Quantum phase estimation 2 2 2 Continued fraction algorithm to retrieve the period 2 2 3 Choosing the size of the first register 2 3 The bottleneck 3 Period finding and discrete logarithms 3 1 Shor s algorithm for discrete logarithms 4 See also 5 References 6 Further reading 7 External linksFeasibility and impact editIf a quantum computer with a sufficient number of qubits could operate without succumbing to quantum noise and other quantum decoherence phenomena then Shor s algorithm could be used to break public key cryptography schemes such as The RSA scheme The Finite Field Diffie Hellman key exchange The Elliptic Curve Diffie Hellman key exchange 10 RSA is based on the assumption that factoring large integers is computationally intractable As far as is known this assumption is valid for classical non quantum computers no classical algorithm is known that can factor integers in polynomial time However Shor s algorithm shows that factoring integers is efficient on an ideal quantum computer so it may be feasible to defeat RSA by constructing a large quantum computer It was also a powerful motivator for the design and construction of quantum computers and for the study of new quantum computer algorithms It has also facilitated research on new cryptosystems that are secure from quantum computers collectively called post quantum cryptography Physical implementation edit Given the high error rates of contemporary quantum computers and too few qubits to use quantum error correction laboratory demonstrations obtain correct results only in a fraction of attempts In 2001 Shor s algorithm was demonstrated by a group at IBM who factored 15 displaystyle 15 nbsp into 3 5 displaystyle 3 times 5 nbsp using an NMR implementation of a quantum computer with seven qubits 11 After IBM s implementation two independent groups implemented Shor s algorithm using photonic qubits emphasizing that multi qubit entanglement was observed when running the Shor s algorithm circuits 12 13 In 2012 the factorization of 15 displaystyle 15 nbsp was performed with solid state qubits 14 Later in 2012 the factorization of 21 displaystyle 21 nbsp was achieved 15 In 2019 an attempt was made to factor the number 35 displaystyle 35 nbsp using Shor s algorithm on an IBM Q System One but the algorithm failed because of accumulating errors 16 However due to the lack of number of qubits all these demonstrations were compiled version which is based on the prior knowledge of the answer 17 Though larger numbers have been factored by quantum computers using other algorithms 18 these algorithms are similar to classical brute force checking of factors so unlike Shor s algorithm they are not expected to ever perform better than classical factoring algorithms 19 Theoretical analyses of Shor s algorithm assume a quantum computer free of noise and errors However near term practical implementations will have to deal with such undesired phenomena when more qubits are available Quantum error correction can help In 2023 Jin Yi Cai showed that in the presence of noise Shor s algorithm fails asymptotically almost surely for large semiprimes that are products of two primes in OEIS sequence A073024 5 These primes p displaystyle p nbsp have the property that p 1 displaystyle p 1 nbsp has a prime factor larger than p 2 3 displaystyle p 2 3 nbsp and have a positive density in the set of all primes Hence error correction will be needed to be able to factor all numbers with Shor s algorithm Algorithm editThe problem that we are trying to solve is given an odd composite number N displaystyle N nbsp find its integer factors To achieve this Shor s algorithm consists of two parts A classical reduction of the factoring problem to the problem of order finding This reduction is similar to that used for other factoring algorithms such as the quadratic sieve A quantum algorithm to solve the order finding problem Classical reduction edit A complete factoring algorithm is possible if we re able to efficiently factor arbitrary N displaystyle N nbsp into just two integers p displaystyle p nbsp and q displaystyle q nbsp greater than 1 since if either p displaystyle p nbsp or q displaystyle q nbsp are not prime then the factoring algorithm can in turn be run on those until only primes remain A basic observation is that using Euclid s algorithm we can always compute the GCD between two integers efficiently In particular this means we can check efficiently whether N displaystyle N nbsp is even in which case 2 is trivially a factor Let us thus assume that N displaystyle N nbsp is odd for the remainder of this discussion Afterwards we can use efficient classical algorithms to check if N displaystyle N nbsp is a prime power 20 For prime powers efficient classical factorization algorithms exist 21 hence the rest of the quantum algorithm may assume that N displaystyle N nbsp is not a prime power If those easy cases do not produce a nontrivial factor of N displaystyle N nbsp the algorithm proceeds to handle the remaining case We pick a random integer 2 a lt N displaystyle 2 leq a lt N nbsp A possible nontrivial divisor of N displaystyle N nbsp can be found by computing gcd a N displaystyle gcd a N nbsp which can be done classically and efficiently using the Euclidean algorithm If this produces a nontrivial factor meaning gcd a N 1 displaystyle gcd a N neq 1 nbsp the algorithm is finished and the other nontrivial factor is N gcd a N textstyle frac N gcd a N nbsp If a nontrivial factor was not identified then that means that N displaystyle N nbsp and the choice of a displaystyle a nbsp are coprime so a displaystyle a nbsp is contained in the multiplicative group of integers modulo N displaystyle N nbsp having a multiplicative inverse modulo N displaystyle N nbsp Thus a displaystyle a nbsp has a multiplicative order r displaystyle r nbsp modulo N displaystyle N nbsp meaning a r 1 mod N displaystyle a r equiv 1 bmod N nbsp and r displaystyle r nbsp is the smallest positive integer satisfying this congruence The quantum subroutine finds r displaystyle r nbsp It can be seen from the congruence that N displaystyle N nbsp divides a r 1 displaystyle a r 1 nbsp written N a r 1 displaystyle N mid a r 1 nbsp This can be factored using difference of squares N a r 2 1 a r 2 1 displaystyle N mid a r 2 1 a r 2 1 nbsp Since we have factored the expression in this way the algorithm doesn t work for odd r displaystyle r nbsp because a r 2 displaystyle a r 2 nbsp must be an integer meaning the algorithm would have to restart with a new a displaystyle a nbsp Hereafter we can therefore assume r displaystyle r nbsp is even It cannot be the case that N a r 2 1 displaystyle N mid a r 2 1 nbsp since this would imply a r 2 1 mod N displaystyle a r 2 equiv 1 bmod N nbsp which would contradictorily imply that r 2 textstyle frac r 2 nbsp would be the order of a displaystyle a nbsp which was already r displaystyle r nbsp At this point it may or may not be the case that N a r 2 1 displaystyle N mid a r 2 1 nbsp If it is not true that N a r 2 1 displaystyle N mid a r 2 1 nbsp then that means we are able to find a nontrivial factor of N displaystyle N nbsp We computed gcd N a r 2 1 displaystyle d gcd N a r 2 1 nbsp If d 1 displaystyle d 1 nbsp then that means N a r 2 1 displaystyle N mid a r 2 1 nbsp was true and a nontrivial factor of N displaystyle N nbsp cannot be achieved from a displaystyle a nbsp and the algorithm must restart with a new a displaystyle a nbsp Otherwise we have found a nontrivial factor of N displaystyle N nbsp with the other being N d textstyle frac N d nbsp and the algorithm is finished For this step it is also equivalent to compute gcd N a r 2 1 displaystyle gcd N a r 2 1 nbsp it will produce a nontrivial factor if gcd N a r 2 1 displaystyle gcd N a r 2 1 nbsp is nontrivial and will not if it s trivial where N a r 2 1 displaystyle N mid a r 2 1 nbsp The algorithm restated shortly follows let N displaystyle N nbsp be odd and not a prime power We want to output two nontrivial factors of N displaystyle N nbsp Pick a random number 1 lt a lt N displaystyle 1 lt a lt N nbsp Compute K gcd a N displaystyle K gcd a N nbsp the greatest common divisor of a displaystyle a nbsp and N displaystyle N nbsp If K 1 displaystyle K neq 1 nbsp then K displaystyle K nbsp is a nontrivial factor of N displaystyle N nbsp with the other factor being N K textstyle frac N K nbsp and we are done Otherwise use the quantum subroutine to find the order r displaystyle r nbsp of a displaystyle a nbsp If r displaystyle r nbsp is odd then go back to step 1 Compute g gcd N a r 2 1 displaystyle g gcd N a r 2 1 nbsp If g displaystyle g nbsp is nontrivial the other factor is N g textstyle frac N g nbsp and we re done Otherwise go back to step 1 It has been shown that this will be likely to succeed after a few runs 2 In practice a single call to the quantum order finding subroutine is enough to completely factor N displaystyle N nbsp with very high probability of success if one uses a more advanced reduction 22 Quantum order finding subroutine edit The goal of the quantum subroutine of Shor s algorithm is given coprime integers N displaystyle N nbsp and 1 lt a lt N displaystyle 1 lt a lt N nbsp to find the order r displaystyle r nbsp of a displaystyle a nbsp modulo N displaystyle N nbsp which is the smallest positive integer such that a r 1 mod N displaystyle a r equiv 1 pmod N nbsp To achieve this Shor s algorithm uses a quantum circuit involving two registers The second register uses n displaystyle n nbsp qubits where n displaystyle n nbsp is the smallest integer such that N 2 n displaystyle N leq 2 n nbsp i e n log 2 N displaystyle n left lceil log 2 N right rceil nbsp The size of the first register determines how accurate of an approximation the circuit produces It can be shown that using 2 n 1 displaystyle 2n 1 nbsp qubits gives sufficient accuracy to find r displaystyle r nbsp The exact quantum circuit depends on the parameters a displaystyle a nbsp and N displaystyle N nbsp which define the problem The following description of the algorithm uses bra ket notation to denote quantum states and displaystyle otimes nbsp to denote the tensor product rather than logical AND The algorithm consists of two main steps Use quantum phase estimation with unitary U displaystyle U nbsp representing the operation of multiplying by a displaystyle a nbsp modulo N displaystyle N nbsp and input state 0 2 n 1 1 displaystyle 0 rangle otimes 2n 1 otimes 1 rangle nbsp where the second register is 1 displaystyle 1 rangle nbsp made from n displaystyle n nbsp qubits The eigenvalues of this U displaystyle U nbsp encode information about the period and 1 displaystyle 1 rangle nbsp can be seen to be writable as a sum of its eigenvectors Thanks to these properties the quantum phase estimation stage gives as output a random integer of the form j r 2 2 n 1 displaystyle frac j r 2 2n 1 nbsp for random j 0 1 r 1 displaystyle j 0 1 r 1 nbsp Use the continued fractions algorithm to extract the period r displaystyle r nbsp from the measurement outcomes obtained in the previous stage This is a procedure to post process with a classical computer the measurement data obtained from measuring the output quantum states and retrieve the period The connection with quantum phase estimation was not discussed in the original formulation of Shor s algorithm 2 but was later proposed by Kitaev 23 Quantum phase estimation edit nbsp Quantum subroutine in Shor s algorithm In general the quantum phase estimation algorithm for any unitary U displaystyle U nbsp and eigenstate ps displaystyle psi rangle nbsp such that U ps e 2 p i 8 ps displaystyle U psi rangle e 2 pi i theta psi rangle nbsp sends inputs states 0 ps displaystyle 0 rangle psi rangle nbsp into output states close to ϕ ps displaystyle phi rangle psi rangle nbsp where ϕ displaystyle phi nbsp is an integer close to 2 2 n 1 8 displaystyle 2 2n 1 theta nbsp In other words it sends each eigenstate ps j displaystyle psi j rangle nbsp of U displaystyle U nbsp into a state close to the associated eigenvalue For the purposes of quantum order finding we employ this strategy using the unitary defined by the actionU k a k mod N 0 k lt N k N k lt 2 n displaystyle U k rangle begin cases ak pmod N rangle amp 0 leq k lt N k rangle amp N leq k lt 2 n end cases nbsp The action of U displaystyle U nbsp on states k displaystyle k rangle nbsp with N k lt 2 n displaystyle N leq k lt 2 n nbsp is not crucial to the functioning of the algorithm but needs to be included to ensure the overall transformation is a well defined quantum gate Implementing the circuit for quantum phase estimation with U displaystyle U nbsp requires being able to efficiently implement the gates U 2 j displaystyle U 2 j nbsp This can be accomplished via modular exponentiation which is the slowest part of the algorithm The gate thus defined satisfies U r I displaystyle U r I nbsp which immediately implies that its eigenvalues are the r displaystyle r nbsp th roots of unity w r k e 2 p i k r displaystyle omega r k e 2 pi ik r nbsp Furthermore each eigenvalue w r k displaystyle omega r k nbsp has an eigenvector of the form ps j r 1 2 k 0 r 1 w r k j a k textstyle psi j rangle r 1 2 sum k 0 r 1 omega r kj a k rangle nbsp and these eigenvectors are such that1 r j 0 r 1 ps j 1 r j 0 r 1 k 0 r 1 w r j k a k 1 1 r k 1 r 1 j 0 r 1 w r j k a k 1 displaystyle begin aligned frac 1 sqrt r sum j 0 r 1 psi j rangle amp frac 1 r sum j 0 r 1 sum k 0 r 1 omega r jk a k rangle amp 1 rangle frac 1 r sum k 1 r 1 left sum j 0 r 1 omega r jk right a k rangle 1 rangle end aligned nbsp where the last identity follows from the geometric series formula which implies j 0 r 1 w r j k 0 textstyle sum j 0 r 1 omega r jk 0 nbsp Using quantum phase estimation on an input state 0 2 n 1 ps j displaystyle 0 rangle otimes 2n 1 psi j rangle nbsp would then return the integer 2 2 n 1 j r displaystyle 2 2n 1 j r nbsp with high probability More precisely the quantum phase estimation circuit sends 0 2 n 1 ps j displaystyle 0 rangle otimes 2n 1 psi j rangle nbsp to ϕ j ps j displaystyle phi j rangle psi j rangle nbsp such that the resulting probability distribution p k k ϕ j 2 displaystyle p k equiv langle k phi j rangle 2 nbsp is peaked around k 2 2 n 1 j r textstyle k 2 2n 1 j r nbsp with p 2 2 n 1 j r 4 p 2 0 4053 textstyle p 2 2n 1 j r geq frac 4 pi 2 approx 0 4053 nbsp This probability can be made arbitrarily close to 1 using extra qubits Applying the above reasoning to the input 0 2 n 1 1 displaystyle 0 rangle otimes 2n 1 1 rangle nbsp quantum phase estimation thus results in the evolution 0 2 n 1 1 r j 0 r 1 0 2 n ps j 1 r j 0 r 1 ϕ j ps j displaystyle 0 rangle otimes 2n 1 rangle frac 1 sqrt r sum j 0 r 1 0 rangle otimes 2n psi j rangle to frac 1 sqrt r sum j 0 r 1 phi j rangle psi j rangle nbsp Measuring the first register we now have a balanced probability 1 r displaystyle 1 r nbsp to find each ϕ j displaystyle phi j rangle nbsp each one giving an integer approximation to 2 2 n 1 j r displaystyle 2 2n 1 j r nbsp which can be divided by 2 2 n 1 displaystyle 2 2n 1 nbsp to get a decimal approximation for j r displaystyle j r nbsp Continued fraction algorithm to retrieve the period edit Then we apply the continued fractions algorithm to find integers b textstyle b nbsp and c textstyle c nbsp where b c textstyle frac b c nbsp gives the best fraction approximation for the approximation measured from the circuit for b c lt N textstyle b c lt N nbsp and coprime b textstyle b nbsp and c textstyle c nbsp The number of qubits in the first register 2 n 1 displaystyle 2n 1 nbsp which determines the accuracy of the approximation guarantees thatb c j r displaystyle frac b c frac j r nbsp given the best approximation from the superposition of ϕ j textstyle phi j rangle nbsp was measured citation needed which can be made arbitrarily likely by using extra bits and truncating the output However while b textstyle b nbsp and c textstyle c nbsp are coprime it may be the case that j textstyle j nbsp and r textstyle r nbsp are not coprime Because of that b textstyle b nbsp and c textstyle c nbsp may have lost some factors that were in j textstyle j nbsp and r textstyle r nbsp This can be remedied by rerunning the quantum subroutine an arbitrary number of times to produce a list of fraction approximationsb 1 c 1 b 2 c 2 b 1 c 1 b s c s displaystyle frac b 1 c 1 textstyle frac b 2 c 2 textstyle ldots vphantom frac b 1 c 1 textstyle frac b s c s nbsp where s textstyle s nbsp is the number of times the algorithm was run Each c k textstyle c k nbsp will have different factors taken out of it because the circuit will likely have measured multiple different possible values of j textstyle j nbsp To recover the actual r textstyle r nbsp value we can take the least common multiple of each c k textstyle c k nbsp l c m c 1 c 2 c s displaystyle mathrm lcm c 1 c 2 ldots c s nbsp The least common multiple will be the order r textstyle r nbsp of the original integer a textstyle a nbsp with high probability Choosing the size of the first register edit Phase estimation requires choosing the size of the first register to determine the accuracy of the algorithm and for the quantum subroutine of Shor s algorithm 2 n 1 displaystyle 2n 1 nbsp qubits is sufficient to guarantee that the optimal bitstring measured from phase estimation meaning the k displaystyle k rangle nbsp where k 2 2 n 1 textstyle k 2 2n 1 nbsp is the most accurate approximation of the phase from phase estimation will allow the actual value of r displaystyle r nbsp to be recovered Each ϕ j displaystyle phi j rangle nbsp before measurement in Shor s algorithm represents a superposition of integers approximating 2 2 n 1 j r displaystyle 2 2n 1 j r nbsp Let k displaystyle k rangle nbsp represent the most optimal integer in ϕ j displaystyle phi j rangle nbsp The following theorem guarantees that the continued fractions algorithm will recover j r displaystyle j r nbsp from k 2 2 n 1 displaystyle k 2 2 n 1 nbsp Theorem If j displaystyle j nbsp and r displaystyle r nbsp are n displaystyle n nbsp bit integers and j r ϕ 1 2 r 2 displaystyle left vert frac j r phi right vert leq frac 1 2r 2 nbsp then the continued fractions algorithm run on ϕ displaystyle phi nbsp will recover both j gcd j r textstyle frac j gcd j r nbsp and r gcd j r textstyle frac r gcd j r nbsp 3 As k displaystyle k nbsp is the optimal bitstring from phase estimation k 2 2 n 1 displaystyle k 2 2 n 1 nbsp is accurate to j r displaystyle j r nbsp by 2 n 1 displaystyle 2n 1 nbsp bits Thus j r k 2 2 n 1 1 2 2 n 1 1 2 N 2 1 2 r 2 displaystyle left vert frac j r frac k 2 2n 1 right vert leq frac 1 2 2 n 1 leq frac 1 2N 2 leq frac 1 2r 2 nbsp which implies that the continued fractions algorithm will recover j displaystyle j nbsp and r displaystyle r nbsp or with their greatest common divisor taken out The bottleneck edit The runtime bottleneck of Shor s algorithm is quantum modular exponentiation which is by far slower than the quantum Fourier transform and classical pre post processing There are several approaches to constructing and optimizing circuits for modular exponentiation The simplest and currently most practical approach is to mimic conventional arithmetic circuits with reversible gates starting with ripple carry adders Knowing the base and the modulus of exponentiation facilitates further optimizations 24 25 Reversible circuits typically use on the order of n 3 displaystyle n 3 nbsp gates for n displaystyle n nbsp qubits Alternative techniques asymptotically improve gate counts by using quantum Fourier transforms but are not competitive with fewer than 600 qubits owing to high constants Period finding and discrete logarithms editShor s algorithms for the discrete log and the order finding problems are instances of an algorithm solving the period finding problem citation needed All three are instances of the hidden subgroup problem Shor s algorithm for discrete logarithms edit Given a group G displaystyle G nbsp with order p displaystyle p nbsp and generator g G displaystyle g in G nbsp suppose we know that x g r G displaystyle x g r in G nbsp for some r Z p displaystyle r in mathbb Z p nbsp and we wish to compute r displaystyle r nbsp which is the discrete logarithm r log g x displaystyle r log g x nbsp Consider the abelian group Z p Z p displaystyle mathbb Z p times mathbb Z p nbsp where each factor corresponds to modular addition of values Now consider the function f Z p Z p G f a b g a x b displaystyle f colon mathbb Z p times mathbb Z p to G f a b g a x b nbsp This gives us an abelian hidden subgroup problem where f displaystyle f nbsp corresponds to a group homomorphism The kernel corresponds to the multiples of r 1 displaystyle r 1 nbsp So if we can find the kernel we can find r displaystyle r nbsp A quantum algorithm for solving this problem exists This algorithm is like the factor finding algorithm due to Peter Shor and both are implemented by creating a superposition through using Hadamard gates followed by implementing f displaystyle f nbsp as a quantum transform followed finally by a quantum Fourier transform 3 Due to this the quantum algorithm for computing the discrete logarithm is also occasionally referred to as Shor s Algorithm The order finding problem can also be viewed as a hidden subgroup problem 3 To see this consider the group of integers under addition and for a given a Z displaystyle a in mathbb Z nbsp such that a r 1 displaystyle a r 1 nbsp the function f Z Z f x a x f x r f x displaystyle f colon mathbb Z to mathbb Z f x a x f x r f x nbsp For any finite abelian group G displaystyle G nbsp a quantum algorithm exists for solving the hidden subgroup for G displaystyle G nbsp in polynomial time 3 See also editGEECM a factorization algorithm said to be often much faster than Shor s 26 Grover s algorithmReferences edit Shor P W 1994 Algorithms for quantum computation Discrete logarithms and factoring Proceedings 35th Annual Symposium on Foundations of Computer Science pp 124 134 doi 10 1109 sfcs 1994 365700 ISBN 978 0 8186 6580 6 a b c Shor Peter W October 1997 Polynomial Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer SIAM Journal on Computing 26 5 1484 1509 arXiv quant ph 9508027 doi 10 1137 S0097539795293172 S2CID 2337707 a b c d e Nielsen Michael A Chuang Isaac L 9 December 2010 Quantum Computation and Quantum Information PDF 7th ed Cambridge University Press ISBN 978 1 107 00217 3 Archived PDF from the original on 2019 07 11 Retrieved 24 April 2022 Gidney Craig Ekera Martin 2021 How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits Quantum 5 433 arXiv 1905 09749 Bibcode 2021Quant 5 433G doi 10 22331 q 2021 04 15 433 S2CID 162183806 a b Cai Jin Yi 2023 Shor s Algorithm Does Not Factor Large Integers in the Presence of Noise arXiv 2306 10072 quant ph See also pseudo polynomial time Beckman David Chari Amalavoyal N Devabhaktuni Srikrishna Preskill John August 1996 Efficient networks for quantum factoring Physical Review A 54 2 1034 1063 arXiv quant ph 9602016 Bibcode 1996PhRvA 54 1034B doi 10 1103 physreva 54 1034 PMID 9913575 Harvey David van der Hoeven Joris March 2021 Integer multiplication in time O n log n PDF Annals of Mathematics 193 2 doi 10 4007 annals 2021 193 2 4 Number Field Sieve wolfram com Retrieved 23 October 2015 Roetteler Martin Naehrig Michael Svore Krysta M Lauter Kristin E 2017 Quantum resource estimates for computing elliptic curve discrete logarithms In Takagi Tsuyoshi Peyrin Thomas eds Advances in Cryptology ASIACRYPT 2017 23rd International Conference on the Theory and Applications of Cryptology and Information Security Hong Kong China December 3 7 2017 Proceedings Part II Lecture Notes in Computer Science Vol 10625 Springer pp 241 270 arXiv 1706 06752 doi 10 1007 978 3 319 70697 9 9 ISBN 978 3 319 70696 2 Vandersypen Lieven M K Steffen Matthias Breyta Gregory Yannoni Costantino S Sherwood Mark H Chuang Isaac L December 2001 Experimental realization of Shor s quantum factoring algorithm using nuclear magnetic resonance Nature 414 6866 883 887 arXiv quant ph 0112176 Bibcode 2001Natur 414 883V doi 10 1038 414883a PMID 11780055 Lu Chao Yang Browne Daniel E Yang Tao Pan Jian Wei 19 December 2007 Demonstration of a Compiled Version of Shor s Quantum Factoring Algorithm Using Photonic Qubits Physical Review Letters 99 25 250504 arXiv 0705 1684 Bibcode 2007PhRvL 99y0504L doi 10 1103 PhysRevLett 99 250504 PMID 18233508 Lanyon B P Weinhold T J Langford N K Barbieri M James D F V Gilchrist A White A G 19 December 2007 Experimental Demonstration of a Compiled Version of Shor s Algorithm with Quantum Entanglement Physical Review Letters 99 25 250505 arXiv 0705 1398 Bibcode 2007PhRvL 99y0505L doi 10 1103 PhysRevLett 99 250505 PMID 18233509 Lucero Erik Barends Rami Chen Yu Kelly Julian Mariantoni Matteo Megrant Anthony O Malley Peter Sank Daniel Vainsencher Amit Wenner James White Ted Yin Yi Cleland Andrew N Martinis John M 2012 Computing prime factors with a Josephson phase qubit quantum processor Nature Physics 8 10 719 arXiv 1202 5707 Bibcode 2012NatPh 8 719L doi 10 1038 nphys2385 S2CID 44055700 Martin Lopez Enrique Martin Lopez Enrique Laing Anthony Lawson Thomas Alvarez Roberto Zhou Xiao Qi O Brien Jeremy L 12 October 2012 Experimental realization of Shor s quantum factoring algorithm using qubit recycling Nature Photonics 6 11 773 776 arXiv 1111 4147 Bibcode 2012NaPho 6 773M doi 10 1038 nphoton 2012 259 S2CID 46546101 Amico Mirko Saleem Zain H Kumph Muir 8 July 2019 Experimental study of Shor s factoring algorithm using the IBM Q Experience Physical Review A 100 1 012305 arXiv 1903 00768 Bibcode 2019PhRvA 100a2305A doi 10 1103 PhysRevA 100 012305 S2CID 92987546 Smolin John A Smith Graeme Vargo Alexander July 2013 Oversimplifying quantum factoring Nature 499 7457 163 165 arXiv 1301 7007 Bibcode 2013Natur 499 163S doi 10 1038 nature12290 PMID 23846653 Karamlou Amir H Simon William A Katabarwa Amara Scholten Travis L Peropadre Borja Cao Yudong 28 October 2021 Analyzing the performance of variational quantum factoring on a superconducting quantum processor npj Quantum Information 7 1 156 arXiv 2012 07825 Bibcode 2021npjQI 7 156K doi 10 1038 s41534 021 00478 z Quantum computing motte and baileys Shtetl Optimized 2019 12 28 Retrieved 2021 11 15 Bernstein Daniel 1998 Detecting perfect powers in essentially linear time Mathematics of Computation 67 223 1253 1283 doi 10 1090 S0025 5718 98 00952 1 e g computing the first log 2 N displaystyle log 2 N nbsp roots of N displaystyle N nbsp e g with the Newton method and checking each integer result for primality AKS primality test Ekera Martin June 2021 On completely factoring any integer efficiently in a single run of an order finding algorithm Quantum Information Processing 20 6 205 arXiv 2007 10044 Bibcode 2021QuIP 20 205E doi 10 1007 s11128 021 03069 1 Kitaev A Yu 1995 Quantum measurements and the Abelian Stabilizer Problem arXiv quant ph 9511026 Markov Igor L Saeedi Mehdi 2012 Constant Optimized Quantum Circuits for Modular Multiplication and Exponentiation Quantum Information and Computation 12 5 6 361 394 arXiv 1202 6614 Bibcode 2012arXiv1202 6614M doi 10 26421 QIC12 5 6 1 S2CID 16595181 Markov Igor L Saeedi Mehdi 2013 Faster Quantum Number Factoring via Circuit Synthesis Phys Rev A 87 1 012310 arXiv 1301 3210 Bibcode 2013PhRvA 87a2310M doi 10 1103 PhysRevA 87 012310 S2CID 2246117 Bernstein Daniel J Heninger Nadia Lou Paul Valenta Luke 2017 Post quantum RSA Post Quantum Cryptography Lecture Notes in Computer Science Vol 10346 pp 311 329 doi 10 1007 978 3 319 59879 6 18 ISBN 978 3 319 59878 9 Further reading editNielsen Michael A Chuang Isaac L 2010 Quantum Computation and Quantum Information 10th Anniversary Edition Cambridge University Press ISBN 978 1 107 00217 3 Kaye Phillip Laflamme Raymond Mosca Michele 2006 An Introduction to Quantum Computing doi 10 1093 oso 9780198570004 001 0001 ISBN 978 0 19 857000 4 Explanation for the man in the street by Scott Aaronson approved by Peter Shor Shor wrote Great article Scott That s the best job of explaining quantum computing to the man on the street that I ve seen An alternate metaphor for the QFT was presented in one of the comments Scott Aaronson suggests the following 12 references as further reading out of the 10105000 quantum algorithm tutorials that are already on the web Shor Peter W 1997 Polynomial Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer SIAM J Comput 26 5 1484 1509 arXiv quant ph 9508027v2 Bibcode 1999SIAMR 41 303S doi 10 1137 S0036144598347011 Revised version of the original paper by Peter Shor 28 pages LaTeX This is an expanded version of a paper that appeared in the Proceedings of the 35th Annual Symposium on Foundations of Computer Science Santa Fe NM Nov 20 22 1994 Minor revisions made January 1996 Quantum Computing and Shor s Algorithm Matthew Hayward s Quantum Algorithms Page 2005 02 17 imsa edu LaTeX2HTML version of the original LaTeX document also available as PDF or postscript document Quantum Computation and Shor s Factoring Algorithm Ronald de Wolf CWI and University of Amsterdam January 12 1999 9 page postscript document Shor s Factoring Algorithm Notes from Lecture 9 of Berkeley CS 294 2 dated 4 Oct 2004 7 page postscript document Chapter 6 Quantum Computation Archived 2020 04 30 at the Wayback Machine 91 page postscript document Caltech Preskill PH229 Quantum computation a tutorial by Samuel L Braunstein The Quantum States of Shor s Algorithm by Neal Young Last modified Tue May 21 11 47 38 1996 III Breaking RSA Encryption with a Quantum Computer Shor s Factoring Algorithm Lecture notes on Quantum computation Cornell University Physics 481 681 CS 483 Spring 2006 by N David Mermin Last revised 2006 03 28 30 page PDF document Lavor C Manssur L R U Portugal R 2003 Shor s Algorithm for Factoring Large Integers arXiv quant ph 0303175 Lomonaco Jr 2000 Shor s Quantum Factoring Algorithm arXiv quant ph 0010034 This paper is a written version of a one hour lecture given on Peter Shor s quantum factoring algorithm 22 pages Chapter 20 Quantum Computation from Computational Complexity A Modern Approach Draft of a book Dated January 2007 Sanjeev Arora and Boaz Barak Princeton University Published as Chapter 10 Quantum Computation of Sanjeev Arora Boaz Barak Computational Complexity A Modern Approach Cambridge University Press 2009 ISBN 978 0 521 42426 4 A Step Toward Quantum Computing Entangling 10 Billion Particles Archived 2011 01 20 at the Wayback Machine from Discover Magazine Dated January 19 2011 Josef Gruska Quantum Computing Challenges also in Mathematics unlimited 2001 and beyond Editors Bjorn Engquist Wilfried Schmid Springer 2001 ISBN 978 3 540 66913 5External links editVersion 1 0 0 of libquantum contains a C language implementation of Shor s algorithm with their simulated quantum computer library but the width variable in shor c should be set to 1 to improve the runtime complexity PBS Infinite Series created two videos explaining the math behind Shor s algorithm How to Break Cryptography and Hacking at Quantum Speed with Shor s Algorithm Retrieved from https en wikipedia org w index php title Shor 27s algorithm amp oldid 1224570454, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.