A quantum primality test with order finding

Determining whether a given integer is prime or composite is a basic task in number theory. We present a primality test based on quantum order finding and the converse of Fermat's theorem. For an integer $N$, the test tries to find an element of the multiplicative group of integers modulo $N$ with order $N-1$. If one is found, the number is known to be prime. During the test, we can also show most of the times $N$ is composite with certainty (and a witness) or, after $\log\log N$ unsuccessful attempts to find an element of order $N-1$, declare it composite with high probability. The algorithm requires $O((\log n)^2 n^3)$ operations for a number $N$ with $n$ bits, which can be reduced to $O(\log\log n (\log n)^3 n^2)$ operations in the asymptotic limit if we use fast multiplication.

[1]  J. Ward,et al.  Book Review: Proceedings of the Third International Conference on Spectral and High Order Methods@@@Book Review: An introduction to computational geometry for curves and surfaces@@@Book Review: The mathematics of surfaces@@@Book Review: Algorithmic number theory, Volume I: Efficient algorithms , 1998 .

[2]  R. V. Meter,et al.  Fast quantum modular exponentiation , 2004, quant-ph/0408006.

[3]  Volker Strassen,et al.  A Fast Monte-Carlo Test for Primality , 1977, SIAM J. Comput..

[4]  Peter W. Shor,et al.  Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer , 1995, SIAM Rev..

[5]  J. S. Gage The great Internet Mersenne prime search. , 1998, M.D. computing : computers in medical practice.

[6]  J. Nicolas Petites valeurs de la fonction d'Euler , 1983 .

[7]  C. Pomerance,et al.  There are infinitely many Carmichael numbers , 1994 .

[8]  Gary L. Miller Riemann's Hypothesis and Tests for Primality , 1976, J. Comput. Syst. Sci..

[9]  Christof Zalka Fast versions of Shor's quantum factoring algorithm , 1998 .

[10]  C. Pomerance Very short primality proofs , 1987 .

[11]  Daniel J. Bernstein,et al.  Detecting perfect powers in essentially linear time , 1998, Math. Comput..

[12]  A. Carlini,et al.  Quantum Probabilistic Subroutines and Problems in Number Theory , 1999 .

[13]  Preskill,et al.  Efficient networks for quantum factoring. , 1996, Physical review. A, Atomic, molecular, and optical physics.

[14]  R. Carmichael On Composite Numbers P Which Satisfy the Fermat Congruence a P-1 ≡1 mod P , 1912 .

[15]  D. H. Lehmer,et al.  New primality criteria and factorizations of 2^{}±1 , 1975 .

[16]  Vaughan R. Pratt,et al.  Every Prime has a Succinct Certificate , 1975, SIAM J. Comput..

[17]  É. Lucas Theorie des Fonctions Numeriques Simplement Periodiques , 1878 .

[18]  Manindra Agrawal,et al.  PRIMES is in P , 2004 .

[19]  J. Rosser,et al.  Approximate formulas for some functions of prime numbers , 1962 .

[20]  J. Dixon Factorization and Primality Tests , 1984 .

[21]  H. Chau,et al.  Primality Test Via Quantum Factorization , 1995, quant-ph/9508005.

[22]  D. H. Lehmer Tests for primality by the converse of Fermat’s theorem , 1927 .

[23]  Barenco,et al.  Quantum networks for elementary arithmetic operations. , 1995, Physical review. A, Atomic, molecular, and optical physics.

[24]  C. Pomerance,et al.  Prime Numbers: A Computational Perspective , 2002 .

[25]  Arnold Schönhage,et al.  Schnelle Multiplikation großer Zahlen , 1971, Computing.

[26]  M. Rabin Probabilistic algorithm for testing primality , 1980 .