English

A quantum primality test with order finding

Quantum Physics 2019-08-21 v1

Abstract

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 NN, the test tries to find an element of the multiplicative group of integers modulo NN with order N1N-1. If one is found, the number is known to be prime. During the test, we can also show most of the times NN is composite with certainty (and a witness) or, after loglogN\log\log N unsuccessful attempts to find an element of order N1N-1, declare it composite with high probability. The algorithm requires O((logn)2n3)O((\log n)^2 n^3) operations for a number NN with nn bits, which can be reduced to O(loglogn(logn)3n2)O(\log\log n (\log n)^3 n^2) operations in the asymptotic limit if we use fast multiplication.

Keywords

Cite

@article{arxiv.1711.02616,
  title  = {A quantum primality test with order finding},
  author = {Alvaro Donis-Vela and Juan Carlos Garcia-Escartin},
  journal= {arXiv preprint arXiv:1711.02616},
  year   = {2019}
}

Comments

5 pages. Comments welcome

R2 v1 2026-06-22T22:39:09.226Z