Skip to main content
Have a personal or library account? Click to login
Implementation And Analysis of Regev’s Quantum Factorization Algorithm Cover

Implementation And Analysis of Regev’s Quantum Factorization Algorithm

Open Access
|Jun 2026

Figures & Tables

Table 1.

Shor and Regev algorithms metrics comparison. The content is based on paper [9].

AlgorithmMultiplication algorithmWidthGate complexity
Shor [3]Harvey, Hoeven [18]O(n log n)O(n2 log n)
ShorSchoolbookO(n)O(n3)
ShorGidney [19], KMY [20]O(n)Oϵ(n2+ϵ)
Optimized Shor [12,14,15,21,22]Schoolbook(1.5 + o(1))nO˜(n3)
Regev [7]SchoolbookO(n3/2)O˜(n3/2)
Regev [7]Harvey, Hoeven [18]O(n3/2)O(n3/2 log n)
Optimized Regev [9]Harvey, Hoeven [18]O(n log n)O(n3/2 log n)
Optimized Regev [9]Gidney [19], KMY [20](10.32 + o(1))nO˜ϵ(n3/2+ϵ)
Optimized Regev [9]Schoolbook [23](10.32 + o(1))nO(n5/2 log n)
Our implementationSchoolbookO(n)O(n5/2 log n)
Table 2.

The biggest factorized number N depending on d and qd parameters.

dqdN
ceilceil57
ceilfloor57
floorceil119
floorfloor143
Figure 1.

General quantum circuit for N = 57, d ceil and qd ceil (ceil_ceil) parameters.

Figure 2.

Decomposed quantum circuit for N = 57, d ceil and qd ceil (ceil_ceil) parameters.

Figure 3.

Output vector measurements for N = 51 and ceil_ceil parameters.

Figure 4.

Output vector measurements for N = 51 and ceil_floor parameters.

graphic/j_qic-2026-0012_ingr_001.png
Table 3.

Comparison of exact values of T and their approximations using function exp(n2d) for selected values of N.

N1521355157
value of n45666
value of d23333
exact value of T32333
approximate value of T2.7182.3012.7182.7182.718
Figure 5.

Runtime comparison for ceil_ceil and ceil_floor parameters.

Figure 6.

Quantum part runtime comparison for floor_ceil and floor_floor parameters.

Table 4.

Average runtime up to N = 57.

AlgorithmAverage runtime
Regev (ceil_ceil)2 h 21 min 11.24 s
Regev (ceil_floor)2 h 47 min 53.43 s
Regev (floor_ceil)3 min 18.27 s
Regev (floor_floor)5 min 2.21 s
Shor14 min 3 s
Figure 7.

Classical part runtime comparison for all parameters configurations.

Figure 8.

Effectiveness comparison for ceil_ceil for all types of test.

Figure 9.

Effectiveness comparison for ceil_floor for all types of test.

Figure 10.

Effectiveness comparison for floor_ceil for all types of test.

Figure 11.

Effectiveness comparison for floor_floor for all types of test.

Table 5.

Average effectiveness of Regev’s algorithm variants for three test types and Shor’s algorithm.

AlgorithmType 1Type 2Type 3
Regev (ceil_ceil)49.0044.9448.34
Regev (ceil_floor)52.0847.8155.06
Regev (floor_ceil)47.9544.2051.46
Regev (floor_floor)48.0543.7451.29
Shor77.1077.1077.10
Figure 12.

Effectiveness comparison for t = 5.

Figure 13.

Effectiveness comparison for t = 8.

Figure 14.

Effectiveness comparison for t = 14.

Figure 15.

Effectiveness comparison for t = 2.

Table 6.

Effectiveness for different values of parameter t.

Factorized number N21333539515557
t for which obtained the highest effectiveness1481458112
Effectiveness of finding square root of unity modulo-N [%]9486741001006282
Effectiveness of finding non-trivial square root of unity modulo-N [%]745648100983270
NFactorized semiprime integer, product of primes p and q.
nNumber of bits in the binary representation of number N.
pPrime number, factor of number N.
qPrime number, factor of number N.
(a1, …, ad)The first d squared numbers that are coprime with N; for convenience, the squares of primes are used.
(b1, …, bd)The first d numbers that are coprime with N; for convenience, the prime numbers are used.
dNumber of dimensions in Regev’s algorithm, also defines the number of quantum input registers. Its value is either equal to n (ceil version) or equal to n (floor version).
qdThe boundary of the exponents in Regev’s algorithm, also defines a width of each of the quantum input registers. Its value is either equal to nd+d (ceil version) or equal to nd+d (floor version).
ceil_ceild and qd parameters combination when d and qd are both in ceil version.
ceil_floord and qd parameters combination when d is in ceil version and qd is in floor version.
floor_ceild and qd parameters combination when d is in floor version and qd is in ceil version.
floor_floord and qd parameters combination when d and qd are both in floor version.
A lattice containing vectors that allow computing the square root of unity modulo-N.
0A lattice containing vectors that allow computing the trivial square root of unity modulo-N.
ℒ′A lattice used to retrieve the period vector from the vectors obtained in the quantum part.
ℒ*Dual lattice of the lattice ℒ.
BA matrix whose columns form a basis of the lattice ℒ′.
tParameter used to transform vectors returned by quantum circuit into vectors that approximates dual lattice vectors in ℒ*.
DOI: https://doi.org/10.2478/qic-2026-0012 | Journal eISSN: 3106-0544 (formerly 1533-7146) | Journal ISSN: 1533-7146
Language: English
Page range: 230 - 252
Submitted on: Nov 20, 2025
Accepted on: Mar 10, 2026
Published on: Jun 4, 2026
Published by: Cerebration Science Publishing Co., Limited
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2026 Przemysław Pawlitko, Natalia Moćko, Marcin Niemiec, Piotr Chołda, published by Cerebration Science Publishing Co., Limited
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.