Spectral Signatures of Prime Factorization
Abstract
1. Introduction
2. Classical Primality Tests and Factorization Algorithms
3. The Factorization Algorithm by Quantum Measurements
- Take initially the logarithm of the number N to be factorized, promote it to be an eigenvalue of the Hamiltonian and prepare the initial state, hereafter denoted as , which has this energy.
- For an integer N—as the one given in Equation(2)—made of k distinct primes, the corresponding energy level of is k-fold degenerate, i.e., the degeneracy of the level depends only on the number of distinct primes present in N and not on their multiplicities. Indeed, can be written in the following k different wayswhere is the integer obtained dividing the original number N by one of its prime factor .
- Hence, the generic state of the k-th degenerate manifold with energy (as before, here simply denoted as ) admits the expansionwith . For a generic state, we can assume that all coefficients of this expansion are different from zero. Their values are actually not essential for the running of the algorithm, so one may assume to be randomly distributed, as would occur in the case of a random initial state preparation.
- After the state (7) is prepared, measure . With all coefficients different from zero, the output will be the logarithm of one of the primes present in N, say , with probability .
- Once the result of this measurement is known, divide the original number N by the prime identified by the output of the measurement. In this way, one obtains the lower integer . Then, start over, taking as the integer to be factorized. The procedure will halt after a number of iterations l equal to the total number of primes present in N, i.e.,
- 6.
- Once the result of this measurement is known, divide the original number N by the prime identified by the output of the measurement. In this way one obtains the lower integer . Use a classical computer to continue to divide for till the obtained number is not longer divisible for . In this way, one obtains the multiplicity associated to the factor . Then, start the procedure again, taking as the integer to be factorized.
- A primality test can be immediately implemented by performing a single quantum measurement of on the initial state . If the system collapses (remains) in itself, N is a prime.
- If the multiplicity of the last factor, say , to be factorized is 1, then the last operation with the measurement of actually amounts to apply the identity operator. If the multiplicity is different from 1, i.e., , then subsequent quantum measurements of will produce each time with probability 1 the same eigenstate .
- The successful implementation of the algorithm is guaranteed independently of the outputs obtained at the various stages of the algorithm. It is an all roads lead to Rome procedure. As shown in Figure 1, there are possible branches resulting from successive measurements of . Imagine, for instance, that we want to factorize the number , whose prime decomposition is given by . As a result of the first measurement, we could have one of three possible outputs: , or .
- If the first output is , the next integer to be factorized is and the next measurement of starting from the (log) of this number can give, as output, either or . Once this last measurement is made, the next number is uniquely determined, thus, arriving to the complete factorization of the number . It is easy to see that the same conclusion will be reached if there is a different initial output.
- If the first output is , the next integer to be factorized is and the next measurement of starting from the (log) of this number, can give, as output, either or . Once this last measurement is made, the next number is uniquely determined, thus arriving to the complete factorization of the number .
- If the first output is , the next integer to be factorized is and the next measurement of starting from the (log) of this number can give, as output, either or . Once this last measurement is made, the next number is uniquely determined, thus, arriving at the complete factorization of the number .
4. Quantum Potentials
- First of all, we subtract from all the eigenvalues the highest one , so that the new set of numberswill be considered as the new spectrum. The ’s are of course the (negative) gaps computed from the highest eigenvalue . Notice that, consistently, they are enumerated starting from the top to the bottom, so , is the first gap, the second gap, and so on. A potential where its only eigenvalue is is of course . This potential is used as input for the Riccati equation for the super-potentialwith boundary condition .
- Once such a function has been obtained, one can construct another potential asThis potential is then substituted into Equation (10) (i.e., , substituting also ), so that one has a differential equation for another super-potential
- Proceeding iteratively in this way, one has a recursive sequence of differential equationswith all of them being solved with the boundary condition , which ensures that the final potential is an even function. This recursive system is continued until all the gaps have been taken into account. Hence, solving (in general numerically) the differential equations of Equation (13), one arrives to the Hamiltonian which has exactly the spectrum
5. Discussion and Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shor, P.W. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science; Goldwasser, S., Ed.; IEEE Computer Society: Los Alamitos, CA, USA, 1994; pp. 124–134. [Google Scholar]
- Shor, P.W. Scheme for reducing decoherence in quantum computer memory. Phys. Rev. A 1995, 52, R2493. [Google Scholar] [CrossRef]
- Vandersypen, L.M.K.; Steffen, M.; Breyta, G.; Yannoni, C.S.; Sherwood, M.H.; Chuang, I.L. Experimental realization of Shor’s quantum factoring algorithm using nuclear magnetic resonance. Nature 2001, 414, 883–887. [Google Scholar] [CrossRef]
- Lu, C.Y.; Browne, D.E.; Yang, T.; Pan, J.W. Demonstration of a Compiled Version of Shor’s Quantum Factoring Algorithm Using Photonic Qubits. Phys. Rev. Lett. 2007, 99, 250504. [Google Scholar] [CrossRef]
- Lanyon, B.P.; Weinhold, T.J.; Langford, N.K.; Barbieri, M.; James, D.F.V.; Gilchrist, A.; White, A.G. Experimental Demonstration of a Compiled Version of Shor’s Algorithm with Quantum Entanglement. Phys. Rev. Lett. 2007, 99, 250505. [Google Scholar] [CrossRef] [PubMed]
- Lucero, E.; Barends, R.; Chen, Y.; Kelly, J.; Mariantoni, M.; Megrant, A.; O’Malley, P.; Sank, D.; Vainsencher, A.; Wenner, J.; et al. Computing prime factors with a Josephson phase qubit quantum processor. Nat. Phys. 2012, 8, 719. [Google Scholar] [CrossRef]
- Martín-López, E.; Laing, A.; Lawson, T.; Alvarez, R.; Zhou, X.Q.; O’Brien, J.L. Experimental realization of Shor’s quantum factoring algorithm using qubit recycling. Nat. Photonics 2012, 6, 773–776. [Google Scholar] [CrossRef]
- Peres, A. Quantum Theory: Concepts and Methods; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1993. [Google Scholar]
- Shankar, R. Principles of Quantum Mechanics, 2nd ed.; Plenum Press: New York, NY, USA, 1994. [Google Scholar]
- Sakurai, J.J.; Napolitano, J. Modern Quantum Mechanics, 3rd ed.; Cambridge University Press: Cambridge, UK, 2020. [Google Scholar]
- Allahverdyan1, A.E.; Balian, R.; Nieuwenhuizen, T.M. Teaching ideal quantum measurement, from dynamics to interpretation. Comptes Rendus. Phys. 2024, 25, 251–287. [Google Scholar] [CrossRef]
- Mussardo, G. The quantum mechanical potential for the prime numbers. arXiv 1997, arXiv:cond-mat/9712010. [Google Scholar] [CrossRef]
- Cassettari, D.; Mussardo, G.; Trombettoni, A. Holographic realization of the prime number quantum potential. PNAS Nexus 2022, 2, pgac279. [Google Scholar] [CrossRef]
- Mack, R.; Dahl, J.P.; Moya-Cessa, H.; Strunz, W.T.; Walser, R.; Schleich, W.P. Riemann ζ function from wave-packet dynamics. Phys. Rev. A 2010, 82, 032119. [Google Scholar] [CrossRef]
- Weiss, C.; Page, S.; Holthaus, M. Factorising numbers with a Bose-Einstein condensate. Phys. A 2004, 341, 586–596. [Google Scholar] [CrossRef][Green Version]
- Gleisberg, F.; Mack, R.; Vogel, K.; Schleich, W.P. Factorization with a logarithmic energy spectrum. New J. Phys. 2013, 15, 023037. [Google Scholar] [CrossRef]
- Gleisberg, F.; Volpp, M.; Schleich, W.P. Factorization with a logarithmic energy spectrum of a two-dimensional potential. Phys. Lett. A 2015, 379, 2556–2560. [Google Scholar] [CrossRef]
- Gleisberg, F.; Pumpo, F.D.; Wolff, G.; Schleich, W.P. Factorization with a logarithmic energy spectrum of a quantum system. J. Phys. At. Mol. Opt. Phys. 2018, 51, 035009. [Google Scholar] [CrossRef]
- Mussardo, G.; Trombettoni, A.; Zhang, Z. Prime Suspects in a Quantum Ladder. Phys. Rev. Lett. 2020, 125, 240603. [Google Scholar] [CrossRef] [PubMed]
- Ribenboim, P. The New Book of Prime Number Records; Springer: Berlin/Heidelberg, Germany; New York, NY, USA, 1996. [Google Scholar]
- Schroeder, M.R. Number Theory in Science and Communication; Springer: Berlin/Heidelberg, Germany, 1990. [Google Scholar]
- Zagier, D. The first 50 million prime numbers. Math. Intell. 1977, 1, 7–19. [Google Scholar] [CrossRef]
- Granville, A.; Martin, G. Prime Number Races. Am. Math. Mon. 2006, 113, 1–33. [Google Scholar] [CrossRef]
- Rose, H.E. A Course in Number Theory; Oxford Science Publications: Oxford, UK, 1994. [Google Scholar]
- Hardy, G.H.; Wright, E.M. An Introduction to the Theory of Numbers; Oxford University Press: Oxford, UK, 1979. [Google Scholar]
- Apostol, T.M. Introduction to Analytic Number Theory, 5th ed.; Springer: New York, NY, USA, 1998. [Google Scholar]
- Tao, T. Structure and randomness in the prime numbers. In An Invitation to Mathematics; Schleicher, D., Lackmann, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
- Ore, O. Number Theory and Its History; McGraw-Hill: New York, NY, USA, 1948. [Google Scholar]
- Riemann, B. Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse. Monatsberichte Königlichen Preuss. Akad. Wiss. Berlin 1859, 2, 671–680. [Google Scholar]
- Edwards, H.M. Riemann Zeta Function; Academic Press: New York, NY, USA, 1974. [Google Scholar]
- Borwein, P.; Choi, S.; Rooney, B.; Weirathmueller, A. The Riemann Hypothesis: A Resource for the Afficionado and Virtuoso Alike; Springer: New York, NY, USA, 2007. [Google Scholar]
- Rempe-Gillen, L.; Waldecker, R. Primality Testing for Beginners; American Mathematical Society: Providence, RI, USA, 2014. [Google Scholar]
- Agrawal, M.; Kayal, N.; Saxena, N. Primes is in P. Ann. Math. 2004, 160, 781–793. [Google Scholar] [CrossRef]
- Lenstra, A.K. Integer factoring. In Encyclopedia of Cryptography and Security; van Tilborg, H.C.A., Jajodia, S., Eds.; Springer: Boston, MA, USA, 2011; p. 611. [Google Scholar]
- Crandall, R.; Pomerance, C. Prime Numbers: A Computational Perspective, 1st ed.; Springer: New York, NY, USA, 2001. [Google Scholar]
- Wagstaff, S.S. The Joy of Factoring. In Student Mathematical Library; American Mathematical Society: Providence, RI, USA, 2013; Volume 68. [Google Scholar]
- Allahverdyan, A.E.; Petrosyan, D. Dissipative search of an unstructured database. Phys. Rev. A 2022, 105, 032447. [Google Scholar] [CrossRef]
- von Neumann, J. Mathematical Foundations of Quantum Mechanics; Princeton University Press: Princeton, NJ, USA, 1955. [Google Scholar]
- Mussardo, G.; Trombettoni, A. INFN Sezione di Trieste, Via Valerio 2, Trieste, Italy. 2026; manuscript in preparation. [Google Scholar]
- Cooper, F.; Khare, A.; Sukhatme, U. Supersymmetry and Quantum Mechanics. Phys. Rep. 1995, 251, 267–385. [Google Scholar] [CrossRef]
- Ramani, A.; Grammaticos, B.; Caurier, E. Fractal potentials from energy levels. Phys. Rev. E 1995, 51, 6323–6331. [Google Scholar] [CrossRef] [PubMed]
- van Zyl, B.P.; Hutchinson, D.A. Riemann zeros, prime numbers, and fractal potentials. Phys. Rev. E 2003, 67, 066211. [Google Scholar] [CrossRef] [PubMed]
- Lloyd, S.; Palma, G.D.; Gokler, C.; Kiani, B.; Liu, Z.; Marvian, M.; Tennie, F.; Palmer, T. Quantum algorithm for nonlinear differential equations. arXiv 2020, arXiv:2011.06571. [Google Scholar] [CrossRef]


Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Mussardo, G.; Trombettoni, A. Spectral Signatures of Prime Factorization. Entropy 2026, 28, 363. https://doi.org/10.3390/e28030363
Mussardo G, Trombettoni A. Spectral Signatures of Prime Factorization. Entropy. 2026; 28(3):363. https://doi.org/10.3390/e28030363
Chicago/Turabian StyleMussardo, Giuseppe, and Andrea Trombettoni. 2026. "Spectral Signatures of Prime Factorization" Entropy 28, no. 3: 363. https://doi.org/10.3390/e28030363
APA StyleMussardo, G., & Trombettoni, A. (2026). Spectral Signatures of Prime Factorization. Entropy, 28(3), 363. https://doi.org/10.3390/e28030363

