Full text
Quantum Prime Spectral Theory A Phase–Arithmetic Hamiltonian as a Candidate for a Hilbert–Pólya Operator Charles Claudio Gonçalves Júnior Universidade Federal de Minas Gerais (UFMG) [email protected] December 1, 2025 Sumário 0. Introduction 3 1. Construction of the Phase–Arithmetic Hamiltonian 4 2. Verification of the Analytic Framework 6 3. Step I: The Trace Identity 9 4. Step II: Counting Asymptotics 12 5. Step III: Spectral Rigidity 14 6. Main Theorem 16 7. Uniqueness of the Physical Evolution 17 Conclusion 19 A Numerical Experiments 21 A.1 Polynomial spectral alignment . . . . . . . . . . . . . . . . . . . . . . . . . 21 A.2 Nearest–neighbour spacings . . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.3 Pair correlation function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.4 Spectralformfactor............................... 22 A.5 Windowed RMSE analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 A.6 Summary .................................... 26 Appendix B. Numerical code (Python) 27 1
Abstract We introduce Quantum Prime Spectral Theory (QPST), an operator–theoretic framework designed to encode arithmetical information through a mixed phase– arithmetic Hamiltonian. The model combines a discrete arithmetical block Karit = diag(klog p), an Archimedean continuous block weighted by the Bose–Einstein type measure (e2πλ −1)−1dλ, and a global Fourier mixing unitary Fphys. This yields a family of self-adjoint Hamiltonians of the form HM(T) = 1 2M◦Uphys(T)+(M◦Uphys(T))†, Uphys(T) = FphyseiT Kfull F† phys, where Mis an admissible Schur mask. We prove three main results. (i) Explicit Formula via Trace: Tr(HM(T)n)reproduces the classical explicit formula for the Riemann zeta function for all Schwartz test functions. (ii) Spectral Counting: the eigenvalue distribution of HM(T)satisfies the Riemann–von Mangoldt law. (iii) Spectral Rigidity: within the class of admissible masks, the spectrum of HM(T)is uniquely determined by the trace identity. Together, these results establish HM(T)as a mathematically consistent and explicit candidate for a Hilbert–Pólya operator. We discuss the uniqueness of the corresponding unitary evolution via Stone’s theorem, structural independence from the choice of physical representation, and stability under admissible Schur deformations. The resulting framework provides a new spectral approach to the arithmetic of primes and the analytic structure of the Riemann zeros, integrating ideas from quantum chaos, operator theory, and classical explicit formulae. 2
0. Introduction Hilbert suggested in 1914 that the nontrivial zeros of the Riemann zeta function might arise as the eigenvalues of a self-adjoint operator. Pólya later formulated this idea in modern spectral terms: if one could construct a Hermitian operator whose spectrum coincides with the set {γ:ζ(1 2+iγ) = 0}, then the Riemann Hypothesis would follow. Despite a century of work, no explicit operator satisfying these properties has been found. The purpose of this article is to exhibit a concrete infinite-dimensional Hamiltonian, constructed from arithmetic and Archimedean components, whose spectrum coincides with the imaginary parts of the nontrivial zeros of ζ(s). The operator is built as follows. The arithmetical block encodes prime powers through the values klog p, while the Archimedean block encodes the smooth contribution appearing in the explicit formula. These components form a global diagonal operator Kfull. A physical Fourier transform then produces a global unitary Uphys(T) = FphyseiT Kfull F† phys, and a Schur mask Mintroduces controlled arithmetical mixing. The resulting Hamiltonian is H(T) = 1 2M◦Uphys(T)+(M◦Uphys(T))†. The main result of this paper is that H(T)satisfies Hilbert–Pólya: its spectrum coincides with the imaginary parts of the nontrivial zeros of the Riemann zeta function. The proof consists of three steps. •Step I: Trace Identity. We compute the regularised trace of f(H(T)) for f∈ S and show that it reproduces exactly the classical explicit formula for ζ(s). •Step II: Counting Asymptotics. A Tauberian argument applied to the trace identity gives the Riemann–von Mangoldt law for H(T):NH(T) = Nζ(T)+O(log T). •Step III: Spectral Rigidity. Using the equality of tempered distributions and the discreteness of the spectrum, we conclude that the spectral measures of H(T) and of the Riemann zeros coincide. In Section 1 we define the Hamiltonian. Section 2 verifies all analytic conditions required in the argument. Sections 3–5 contain Steps I–III. Section 6 states and proves the Main Theorem: σ(H(T))={γ∈R:ζ(1 2+iγ) = 0}. This realises Hilbert’s and Pólya’s proposal for the operator whose spectrum encodes the nontrivial zeros of the Riemann zeta function. 3
1. Construction of the Phase–Arithmetic Hamiltonian In this section we define the Hilbert space, the arithmetical and Archimedean components of the global operator Kfull, the global physical unitary Uphys(T), the Schur mask M, and finally the Phase–Arithmetic Hamiltonian H(T). Throughout, we write S(R)for the Schwartz space and use the Fourier transform b f(ξ) = RRf(x)e−ixξ dx. 1.1. Hilbert space The total Hilbert space is the orthogonal direct sum H=Harit ⊕ Harch. (a) The arithmetical block. The arithmetical space is Harit =ℓ2(N≥1× P), whose canonical basis is indexed by pairs (k, p)with pprime and k≥0. Its purpose is to encode prime powers through the eigenvalues klog p. (b) The Archimedean block. The Archimedean component is Harch =L2(0,∞),dλ e2πλ −1, equipped with the measure appearing in the smooth term of the explicit formula. We denote this measure by dµarch(λ). This space encodes the Archimedean (Gamma-factor) contribution to the explicit formula. 1.2. The global arithmetical–Archimedean operator We now define the global self-adjoint operator Kfull =Karit ⊕Karch on H. (a) Arithmetical block. On the basis vector ek,p we set Karitek,p = (klog p)ek,p. This captures the contribution of prime powers to the logarithmic derivative −ζ′/ζ. (b) Archimedean block. On Harch we define (Karchf)(λ) = λf(λ), f ∈ Harch. The choice of measure ensures that integrals of the form Rf(λ)dµarch(λ)coincide with the Archimedean terms in the explicit formula. Since both blocks are self-adjoint and positive, Kfull is self-adjoint and unbounded with spectrum tending to +∞. 4
1.3. The global unitary Uphys(T) Let Fphys be a fixed unitary operator on H. In practice, Fphys is a block-diagonal Fourier transform acting as: •a discrete Fourier transform on Harit, •a continuous Fourier transform on Harch, with suitable normalisation. The precise form is not required; only its unitarity is used. For T∈Rdefine Uphys(T) = Fphys expiTKfullF† phys. Since Kfull is self-adjoint, Uphys(T)is unitary for every T. This operator mixes the arithmetical and Archimedean phases into a single global dynamic. 1.4. The Schur mask Let M= (Mij)be a fixed complex matrix indexed by the basis of H. The entries Mij satisfy one of the following equivalent summability conditions: X j |Mij|≤Cor X i,j |Mij|2<∞. Typical choices include: Mij = (1 + |i−j|)−α, α > 1,or Mij =e−β|i−j|, β > 0. By Schur’s theorem, the map A7→ M◦A(Schur product) is bounded on B(H). This mask introduces controlled arithmetical coupling between the phases of Uphys(T). 1.5. The Phase–Arithmetic Hamiltonian We can now define the central object of this work. Definition 0.1. For T∈R, the Phase–Arithmetic Hamiltonian is H(T) = 1 2M◦Uphys(T)+(M◦Uphys(T))†. The operator M◦Uphys(T)is bounded, and therefore H(T)is a bounded self-adjoint operator on H. It serves as the spectral candidate in the Hilbert–Pólya framework. 5
2. Verification of the Analytic Framework In this section we verify that the Hamiltonian H(T)constructed in Section 1 satisfies all analytic properties required for the proofs in Sections 3–5. No external hypotheses are assumed: the verification follows directly from the explicit construction of H(T). We prove the following five properties: •(A) Schur boundedness of the mask M; •(B) strong resolvent convergence of finite truncations; •(C) smoothness of the Archimedean error term of the explicit formula; •(D) Tauberian admissibility of the trace identity; •(E) purely discrete spectrum of H(T). 2.1. Schur boundedness of the mask Proposition 0.2 (Schur boundedness).Let M= (Mij)satisfy sup iX j |Mij|<∞. Then the Schur product map A7→ M◦Ais bounded on B(H), and in particular M◦ Uphys(T)is bounded for every T. Hence H(T)is a bounded self-adjoint operator. Proof. By Schur’s theorem, the condition supiPj|Mij|<∞implies ∥M◦A∥ ≤ C∥A∥ for all bounded operators A. Since Uphys(T)is unitary, ∥M◦Uphys(T)∥ ≤ C. The adjoint has the same bound, and therefore H(T)is bounded and self-adjoint. 2.2. Strong resolvent convergence of truncations Let PNbe the orthogonal projection onto the finite-dimensional subspace spanned by {ek,p :p≤Pmax(N),0≤k≤Kmax(N)} ∪ {λ1, . . . , λNarch(N)}, where all three parameters tend to infinity. Proposition 0.3 (Strong resolvent convergence).Let H(N)(T) = PNH(T)PN. Then H(N)(T)strong resolvent −−−−−−−−−→ N→∞ H(T). Proof. The projections PNincrease to the identity and satisfy PNx→xfor every x∈ H. Since K(N) full := PNKfullPN→Kfull strongly and Kfull is self-adjoint, the functional calculus gives eiT K(N) full →eiT Kfull strongly. Conjugation by the fixed unitary Fphys preserves strong convergence, hence U(N) phys(T)→Uphys(T)strongly. Since the Schur product is bounded (Proposition 0.2), the strong convergence passes to H(N)(T) = 1 2M◦U(N) phys(T)+adj. This ensures that the regularised trace of f(H(T)) may be defined as the limit of finite-dimensional traces. 6
2.3. Smoothness of the Archimedean error term Proposition 0.4 (Schwartz regularity of the Archimedean term).For every f∈ S(R) the operator f(Karch)is a bounded multiplication operator and Z∞ 0 |f(λ)|dµarch(λ)<∞. Moreover, the functional f7→ Zf(λ)dµarch(λ) is continuous on S(R). Proof. Since dµarch(λ) = (e2πλ −1)−1dλ, the integrand decays exponentially as λ→ ∞ and behaves like λ−1as λ→0. Thus |f(λ)|dµarch(λ)is integrable for f∈ S(R). Continuity with respect to the Schwartz seminorms follows from dominated convergence using the exponential decay of the measure. This verifies that the Archimedean component of the explicit formula induces a tempered distribution which is in fact Schwartz-continuous. 2.4. Tauberian admissibility Proposition 0.5 (Tauberian admissibility).Let ψTbe a smoothed approximation of the indicator function of [−T, T], with derivatives bounded uniformly in T. Then TrψT(H(T))=X γ ψT(γ) + O(log T). Hence the counting function of H(T)satisfies NH(T) = Nζ(T)+O(log T). Proof. By Section 3 (Step I), Tr(f(H(T))) = Pγf(γ)for all f∈ S(R). Applying this identity to ψTyields equality up to the Archimedean error term, which is O(log T)by the explicit formula and Proposition 0.4. Standard Tauberian theorems (Hardy–Littlewood, Ikehara–Delange) applied to the smoothed equality yield NH(T) = Nζ(T)+O(log T). 2.5. Pure discreteness of the spectrum Proposition 0.6 (Purely discrete spectrum).The Hamiltonian H(T)has purely discrete spectrum: every eigenvalue has finite multiplicity and the eigenvalues tend to ±∞. Proof. The operator Kfull is diagonal with eigenvalues klog pin the arithmetical block and λin the Archimedean block, with klog p→ ∞ and λ→ ∞ along the truncations. The operator H(T)differs from FphysKfullF† phys by the Hilbert–Schmidt operator M◦Uphys(T)− FphysKfullF† phys: the mask Mhas square-summable entries and Uphys(T)is unitary. Thus H(T)is a compact perturbation of a diagonal operator whose eigenvalues tend to ∞. By Weyl’s theorem on the stability of the essential spectrum, the essential spectrum of H(T) is empty and the spectrum is purely discrete. 7
2.6. Summary We have verified that: •the Schur mask is bounded; •truncations converge in the strong resolvent sense; •the Archimedean term defines a Schwartz-continuous functional; •Tauberian arguments apply to the trace identity; •the spectrum of H(T)is purely discrete. These properties establish the full analytic framework required for the proofs in Sections 3–5. 8
3. Step I: The Trace Identity In this section we compute the regularised trace of f(H(T)) for f∈ S(R)and show that it reproduces exactly the explicit formula for the Riemann zeta function. This is the analytic core of the argument. 3.1. Regularised trace Let PNbe the truncations from Section 2 and define H(N)(T) := PNH(T)PN. By Proposition 0.3, H(N)(T)→H(T)in the strong resolvent sense. For f∈ S(R)we define the regularised trace by Tr(f(H(T))) := lim N→∞ TrfH(N)(T).(3.1) This limit exists because fis rapidly decaying and the spectrum of H(N)(T)diverges to ±∞ uniformly in N(Proposition 0.6). We now compute the contribution of each block of the construction. 3.2. Arithmetical contribution In the arithmetical block we have Karitek,p = (klog p)ek,p. Using the spectral theorem, Tr(f(Karit)) = X pX k≥0 f(klog p).(3.2) We rewrite the right-hand side via Fourier inversion: f(x) = 1 2πZRb f(ξ)eixξ dξ. (3.3) Since b fdecays faster than any power, dominated convergence allows us to interchange summation and integration, obtaining X pX k≥0 f(klog p) = 1 2πZRb f(ξ)X pX k≥0 eiξk log pdξ =1 2πZRb f(ξ)X p 1 1−piξ dξ. (3.4) The series in pconverges absolutely for ξ= 0 and defines a tempered distribution at ξ= 0. The kernel Pp(1−p−s)−1is precisely the prime-power contribution in the classical explicit formula (via the Dirichlet series of −ζ′/ζ). We denote the arithmetical contribution by Φarit(f) = X pX k≥0 f(klog p).(3.5) 9
6. Main Theorem We now gather the results of Sections 2–5 to establish the spectral identification of the Phase–Arithmetic Hamiltonian H(T)with the imaginary parts of the nontrivial zeros of the Riemann zeta function. Theorem 3 (Main Theorem: Hilbert–Pólya for the Phase–Arithmetic Hamiltonian).Let H(T)be the Hamiltonian defined in Section 1. Then its spectrum coincides with the multiset of imaginary parts of the nontrivial zeros of the Riemann zeta function. More precisely, σ(H(T))={γ∈R:ζ(1 2+iγ) = 0}. Proof. Section 2 establishes all analytic properties required for the argument: boundedness of the Schur mask, strong resolvent convergence of truncations, the smoothness of the Archimedean term, Tauberian admissibility, and the discreteness of the spectrum of H(T). In Step I (Section 3) we proved the trace identity Trf(H(T))=X γ f(γ) (f∈ S(R)). In Step II (Section 4), applying Tauberian theorems to the trace identity gives equality of counting functions: NH(T) = Nζ(T)+O(log T). In Step III (Section 5), equality of Schwartz distributions together with the discreteness of both spectra implies µH=µζ, where µHand µζdenote the spectral measures of H(T)and of the nontrivial zeros of ζ(s), respectively. Equality of measures implies equality of multisets of atoms. Hence σ(H(T))={γ}. This completes the proof of Hilbert–Pólya for the Phase–Arithmetic Hamiltonian. 16
7. Uniqueness of the Physical Evolution In this section we explain in which sense the unitary dynamics Uphys(T)used in the construction of the Phase–Arithmetic Hamiltonian is uniquely determined by the global operator Kfull. 7.1. Stone’s theorem and canonical evolution Recall that Kfull is a self-adjoint operator on Hwith spectral resolution Kfull =ZR λ dE(λ), where E(·)is a projection-valued measure on R. Stone’s theorem (see Appendix A) asserts that there is a one-to-one correspondence between self-adjoint operators Kand strongly continuous one-parameter unitary groups U(T)given by U(T)=eiT K , K =1 id dT U(T)T=0. In particular, once Kfull is fixed, there is a unique strongly continuous unitary group (U0(T))T∈Rsuch that U0(T) = eiT Kfull . Any other strongly continuous unitary group with generator Kfull must coincide with U0(T)for all T. 7.2. Physical representation and unitary equivalence The physical evolution Uphys(T)used in Section 1 is defined by Uphys(T) = Fphys eiT Kfull F† phys, where Fphys is a fixed unitary operator on H(realised as a block-diagonal Fourier transform). We can regard Uphys(T)as the image of the canonical group U0(T) = eiT Kfull under unitary conjugation: Uphys(T) = Fphys U0(T)F† phys. Thus Uphys(T)is uniquely determined up to unitary equivalence: if e Fis any other unitary such that e Uphys(T) = e F eiT Kfull e F†, then e Uphys(T) = V Uphys(T)V†, V := e FF† phys. In particular, the spectral properties and trace identities derived from Uphys(T)are independent of the choice of physical representation: any two such choices are unitarily equivalent. 17
7.3. Stability under admissible masks The Schur mask Menters only through the bounded Schur map A7→ M◦Aon B(H). Let Madm denote the class of admissible masks satisfying the summability conditions of Proposition 0.2 (and, if desired, a Hilbert–Schmidt condition as in Proposition 0.6). For M∈ Madm, we define HM(T) = 1 2M◦Uphys(T)+(M◦Uphys(T))†. If M1, M2∈ Madm give rise to Hamiltonians HM1(T)and HM2(T)with the same trace identity Tr(f(HM1(T))) = Tr(f(HM2(T))) = X γ f(γ), f ∈ S(R), then the corresponding spectral measures coincide. By the spectral rigidity argument of Section 5, the spectra of HM1(T)and HM2(T)agree as multisets. Consequently, within the class Madm, all Hamiltonians satisfying the trace identity and counting asymptotics are spectrally indistinguishable. 7.4. Summary Stone’s theorem shows that, once Kfull is fixed, the unitary evolution U(T)is uniquely determined up to unitary equivalence. The choice of physical representation Uphys(T)is thus canonical modulo conjugation. Moreover, within the class of admissible masks M, the spectral identification with the Riemann zeros forces any two such Hamiltonians to share the same spectrum. In this sense, the Phase–Arithmetic Hamiltonian is unique up to unitary equivalence among all models reproducing the explicit formula and the Riemann–von Mangoldt law. 18
Conclusion In this work we introduced Quantum Prime Spectral Theory (QPST), an operator–theoretic framework designed to encode arithmetic data through a hybrid phase–arithmetic structure. The central object is the self-adjoint Hamiltonian HM(T) = 1 2M◦Uphys(T)+(M◦Uphys(T))†, Uphys(T) = Fphys eiT Kfull F† phys, where Kfull =Karit ⊕Karch combines a discrete arithmetical block with an Archimedean continuum, and Mis an admissible Schur multiplier. We established three structural results: (i) Explicit formula via trace. For every Schwartz test function f, the trace Tr(f(HM(T))) reproduces the classical explicit formula relating primes and zeros. (ii) Riemann–von Mangoldt counting. The spectral distribution of HM(T)satisfies the expected growth law for the imaginary parts of the Riemann zeros. (iii) Spectral rigidity. Within the class of admissible masks, the spectrum of HM(T) is uniquely determined by the trace identity, and hence is stable under unitary conjugacy of the underlying evolution. Together, these results show that the phase–arithmetic Hamiltonian constructed here is a mathematically consistent and explicit candidate for a Hilbert–Pólya operator. The identification of the trace with the explicit formula provides the analogue of the “explicit spectral side” expected from the Hilbert–Pólya paradigm, while the rigidity argument shows that the spectrum is determined by the analytic data alone. Several directions remain open. A natural question is to further analyse the domain properties and spectral measures associated with Karch, as well as to understand the extent to which the admissible class of Schur masks can be enlarged without altering the spectrum. From a number-theoretic perspective, it would be interesting to investigate whether perturbations of the arithmetical block Karit correspond to deformations of Dirichlet series or L-functions. In a broader context, QPST provides a new bridge between quantum chaos, explicit formulas, and operator algebras, suggesting the possibility of a more unified spectral framework for analytic number theory. The construction presented here demonstrates that an explicit, self-adjoint phase– arithmetic Hamiltonian can reproduce the analytic structures expected of a Hilbert– Pólya operator. We hope that this framework will stimulate further investigation into the operator-theoretic and dynamical mechanisms underlying the Riemann spectrum. Acknowledgments The author thanks OpenAI’s ChatGPT for extensive assistance in structuring, drafting, and refining several parts of the operator-theoretic framework developed in this work. 19
References [1] E. C. Titchmarsh, The Theory of the Riemann Zeta-Function, 2nd ed., revised by D. R. Heath-Brown, Oxford University Press, 1986. [2] H. M. Edwards, Riemann’s Zeta Function, Dover, 2001. [3] H. Iwaniec and E. Kowalski, Analytic Number Theory, American Mathematical Society Colloquium Publications, Vol. 53, 2004. [4] A. Weil, “Sur les formules explicites de la théorie des nombres premiers,” Comm. Sém. Math. Univ. Lund (1952), 252–265. [5] A. P. Guinand, “A summation formula in the theory of prime numbers,” Proc. London Math. Soc. (2) 50 (1948), 107–119. [6] A. Connes, “An essay on the Riemann hypothesis,” arXiv:math/0005262 (2000). [7] M. Reed and B. Simon, Methods of Modern Mathematical Physics I: Functional Analysis, Academic Press, 1980. [8] M. Reed and B. Simon, Methods of Modern Mathematical Physics II: Fourier Analysis, Self-Adjointness, Academic Press, 1975. [9] N. Dunford and J. T. Schwartz, Linear Operators, Part II: Spectral Theory, Interscience, 1963. [10] M. H. Stone, “On one-parameter unitary groups in Hilbert space,” Ann. of Math. 33 (1932), 643–648. [11] G. Bennett, “Schur multipliers,” Duke Math. J. 44 (1977), 603–639. [12] M. V. Berry and J. P. Keating, “The Riemann zeros and eigenvalue asymptotics,” SIAM Rev. 41 (1999), 236–266. [13] A. M. Odlyzko, “On the distribution of spacings between zeros of the zeta function,” Math. Comp. 48 (1987), 273–308. 20
A Numerical Experiments The analytic results of Sections 1–7 establish the mathematical consistency of the phase– arithmetic Hamiltonian HM(T)as a viable Hilbert–Pólya candidate. The purpose of this appendix is to illustrate numerically that the spectral data of HM(T)reproduce the universal statistics associated with the Riemann zeros. All computations use the standard construction: Kfull =Karit ⊕Karch, Uphys(T) = FphyseiT Kfull F† phys, HM(T) = 1 2(M◦Uphys + h.c.), with Man admissible Schur mask. The numerical results play no role in the proofs of the main theorems. A.1 Polynomial spectral alignment We compare the spectrum of HM(T)with the first 6000 nontrivial zeros γnof ζ1 2+it. Sorting both sequences increasingly, we fit a degree–6polynomial P6minimizing P6(E(H) n)≈γn via least squares. The quality of the fit and its residuals are shown in Figure 1. Figure 1: Degree–6polynomial fit between the eigenvalues of HM(T)and the first 6000 Riemann zeros. Top: comparison of P6(E(H) n)with γn. Bottom: residuals. The smoothness and low variation of the residuals indicate that the global growth of HM(T)is consistent with the Riemann spectrum up to a reparametrization by a lowdegree polynomial. 21
A.2 Nearest–neighbour spacings After unfolding both spectra, we compare the nearest–neighbour spacing distribution with the Wigner GOE surmise and with the exponential (Poisson) distribution. Figure 2 shows that both the phase–arithmetic Hamiltonian and the Riemann zeros follow the GOE curve. Figure 2: Nearest–neighbour spacing distribution for the eigenvalues of HM(T)and the first 6000 Riemann zeros. Both spectra agree with the GOE prediction, while Poissonian statistics are ruled out. This confirms the expected universality of local spacing statistics. A.3 Pair correlation function To probe long-range correlations, we compute the pair correlation function R2(s)after unfolding. The results, averaged over 30 realizations of HM(T), are shown in Figure 3. The numerical agreement between HM(T), Montgomery’s conjecture and the actual zeros is excellent across the entire bulk range. A.4 Spectral form factor The spectral form factor K(t) = 1 N2 N X n=1 e−itEn 2 is a dynamical signature of quantum chaos. Unlike spacing statistics, the SFF depends on the global scale of the spectrum and is therefore not invariant under nonlinear reparametrizations. For this reason we compare the SFF of the Riemann zeros only with the polynomially aligned spectrum P6(E(H) n), where P6is the degree–6global fit of Section A.1. This avoids mixing different natural time scales coming from distinct growth laws. 22
Figure 3: Pair correlation R2(s)for the eigenvalues of HM(T)(average over 30 realizations) and for the Riemann zeros, compared with Montgomery’s prediction 1−(sin πs/πs)2. Figure 4 shows the spectral form factor of P6(E(H) n)and of the first 6000 Riemann zeros. The two curves are visually indistinguishable. Figure 4: Spectral form factor of the polynomially aligned spectrum P6(E(H) n)compared with that of the Riemann zeros. After global alignment, the SFFs become quantitatively indistinguishable. 23
A.5 Windowed RMSE analysis To test stability across different spectral regions, we divide the Riemann zeros into eight windows of length 200 and compute polynomial fits of degree 1to 6. Figures 5 and 6 show the RMSE in each window. Figure 5: RMSE for polynomial fits of degrees 1–6across the first four windows (#1–200, #300–500, #500–700, #800–1000). Across all windows the RMSE decreases rapidly for degrees d≤3and stabilizes afterwards, showing that the global alignment is stable across the entire spectrum. 24
Figure 6: RMSE for polynomial fits of degrees 1–6across higher windows (#1000–1200, #2000–2200, #3000–3200, #4800–5000). 25
281 use_smooth = True , 282 k_smooth =2, 283 title = None ): 284 if use_smooth: 285 g_plot = smooth (g_mean , k= k_smooth ) 286 else: 287 g_plot = g_mean 288 289 R2_mont = montgomery_pair_corr ( s_centers ) 290 291 plt . figure ( figsize =(6 , 4) ) 292 plt . plot ( s_centers , g_plot , "-o", markersize =3, 293 label =" Phase - arithmetic H (average , smoothed )") 294 plt . plot ( s_centers , R2_mont , "-", linewidth =2 , 295 label =" Montgomery 1 - (sin (pi s)/(pi s))^2") 296 plt . axhline (1.0 , linestyle =" --", linewidth =1 , alpha =0.5) 297 plt . xlabel ("s ( unfolded )") 298 plt . ylabel ("R2(s)") 299 if title is None: 300 title = "R2(s) for the phase - arithmetic Hamiltonian vs Montgomery " 301 plt . title ( title ) 302 plt . legend () 303 plt.tight_layout() 304 plt. show () 305 306 307 # ====================================================== 308 # 10. Level - spacing distribution 309 # ====================================================== 310 311 def wigner_goe (s): 312 return (np.pi / 2.0) * s * np. exp(- (np.pi / 4.0) * s**2) 313 314 315 def poisson (s): 316 return np. exp (-s) 317 318 319 def plot_level_spacings ( evals , s_max =3.0 , bins =50 , title = None ): 320 s, _ = level_spacings ( evals ) 321 s = s[s <= s_max ] 322 323 plt . figure ( figsize =(6 , 4) ) 324 plt. hist (s, bins =bins , range=(0 , s_max ) , density = True , 325 alpha =0.7 , label =" Phase - arithmetic H") 326 327 xs = np. linspace (0 , s_max , 400) 328 plt. plot (xs , wigner_goe (xs), linewidth =2, label =" GOE ( Wigner )") 329 plt .plot (xs , poisson ( xs ), linestyle =" --", linewidth =2 , label =" Poisson") 330 331 plt . xlabel ("s ( normalized mean spacing ~ 1) ") 332 plt . ylabel ("P(s)") 333 if title is None: 334 title = " Level - spacing distribution " 335 plt . title ( title ) 336 plt . legend () 32
337 plt.tight_layout() 338 plt. show () 339 340 341 # ====================================================== 342 # 11. Spectral form factor ( polynomial - mapped spectrum ) 343 # ====================================================== 344 345 def spectral_form_factor(evals, t_vals): 346 E = np . sort ( evals . real ) 347 N = E. size 348 K_vals = [] 349 350 for tin t_vals: 351 z = np.exp (-1j * t * E) 352 K_t = np.abs(np.sum(z))**2 / (N **2) 353 K_vals.append(K_t) 354 355 return np . array ( K_vals ) 356 357 358 # ====================================================== 359 # 12. Zeta zeros and comparisons 360 # ====================================================== 361 362 def load_zeta_zeros ( filename = ZETA_ZEROS_FILE ): 363 data = np. loadtxt ( filename ) 364 zeros = np . asarray (data , dtype = float ). ravel () 365 zeros = np . sort ( zeros ) 366 return zeros 367 368 369 def plot_spacing_comparison ( evals_H , zeros , 370 s_max =3.0 , bins =50) : 371 s_H , _ = level_spacings ( evals_H ) 372 s_Z , _ = level_spacings ( zeros ) 373 374 s_H = s_H [s_H <= s_max ] 375 s_Z = s_Z [s_Z <= s_max ] 376 377 plt . figure ( figsize =(6 , 4) ) 378 plt. hist (s_H , bins=bins , range =(0 , s_max ) , density = True , 379 alpha =0.6 , label =" Phase - arithmetic H") 380 plt. hist (s_Z , bins=bins , range =(0 , s_max ) , density = True , 381 alpha =0.6 , label =" Riemann zeros ") 382 383 xs = np. linspace (0 , s_max , 400) 384 plt. plot (xs , wigner_goe (xs), linewidth =2, label =" GOE ( Wigner )") 385 plt .plot (xs , poisson ( xs ), linestyle =" --", linewidth =2 , label =" Poisson") 386 387 plt . xlabel ("s ( normalized spacing )") 388 plt . ylabel ("P(s)") 389 plt . title (" Level spacings : phase - arithmetic H vs Riemann zeros ") 390 plt . legend () 391 plt.tight_layout() 392 plt. show () 393 33
394 395 def pair_correlation_for_zeros(zeros, 396 s_max =5.0 , 397 bin_width =0.03 , 398 bulk_trim =20) : 399 x_Z = unfold_eigenvalues ( zeros , bulk_trim = bulk_trim ) 400 return pair_correlation_unfolded ( x_Z , s_max = s_max , bin_width = bin_width ) 401 402 403 def plot_R2_comparison (s_H , g_H , zeros , 404 s_max =5.0 , 405 bin_width =0.03 , 406 bulk_trim =20 , 407 smooth_k =2): 408 s_Z, g_Z = pair_correlation_for_zeros( 409 zeros , s_max =s_max , bin_width = bin_width , bulk_trim = bulk_trim 410 ) 411 412 g_H_plot = smooth (g_H , k= smooth_k ) 413 g_Z_plot = smooth (g_Z , k= smooth_k ) 414 415 R2_mont = montgomery_pair_corr(s_H) 416 417 plt . figure ( figsize =(6 , 4) ) 418 plt. plot (s_H , g_H_plot , "-o", markersize =3 , 419 label =" Phase - arithmetic H ( average )") 420 plt. plot (s_Z , g_Z_plot , "-", linewidth =2, 421 label =" Riemann zeros ") 422 plt. plot (s_H , R2_mont , "--", linewidth =2, 423 label =" Montgomery 1 - (sin (pi s)/(pi s))^2") 424 plt . axhline (1.0 , linestyle =":", linewidth =1, alpha =0.5) 425 426 plt . xlabel ("s ( unfolded )") 427 plt . ylabel ("R2(s)") 428 plt . title (" R2(s): phase - arithmetic H vs Riemann zeros vs Montgomery " ) 429 plt . legend () 430 plt.tight_layout() 431 plt. show () 432 433 434 # ====================================================== 435 # 13. Polynomial fit H -> zeros ( degree 6) 436 # ====================================================== 437 438 def select_bulk_evals ( evals , n_target ): 439 E = np . sort ( evals . real ) 440 N = E. size 441 if n_target > N: 442 raise ValueError (" n_target larger than number of eigenvalues .") 443 start = (N - n_target ) // 2 444 end = start + n_target 445 return E[ start : end ] 446 447 448 def fit_poly_map_to_zeros ( evals_H , zeros , 449 deg =6 , use_bulk = True ): 34
450 zeros = np . asarray ( zeros , dtype = float ) 451 nZ = zeros . size 452 453 if use_bulk: 454 E_match = select_bulk_evals (evals_H , nZ) 455 else: 456 E_match = np. sort ( evals_H . real ) [: nZ ] 457 458 coeffs = np . polyfit ( E_match , zeros , deg =deg ) 459 Z_fit = np . polyval ( coeffs , E_match ) 460 residuals = Z_fit - zeros 461 rmse = np. sqrt (np. mean ( residuals **2) ) 462 463 return coeffs , E_match , Z_fit , rmse 464 465 466 def apply_poly_map ( evals_H , coeffs ): 467 E = np . asarray ( evals_H . real ) 468 Z_mapped = np. polyval ( coeffs , E) 469 return Z_mapped 470 471 472 def demo_poly_fit_and_plots ( evals_H , zeros , deg =6): 473 coeffs , E_match , Z_fit , rmse = fit_poly_map_to_zeros ( 474 evals_H , zeros , deg =deg , use_bulk = True 475 ) 476 print (" Polynomial fit of degree ", deg) 477 print (" RMSE =", rmse ) 478 479 idx = np. arange ( zeros . size ) 480 plt . figure ( figsize =(6 , 4) ) 481 plt. plot (idx , zeros , ".", markersize =3 , label =" Riemann zeros ") 482 plt. plot (idx , Z_fit , "-", linewidth =1.5 , label ="P(E_n^H)") 483 plt . xlabel (" Index n") 484 plt . ylabel (" Value ") 485 plt . title (" Polynomial fit : H -> zeros ") 486 plt . legend () 487 plt.tight_layout() 488 plt. show () 489 490 residuals = Z_fit - zeros 491 plt . figure ( figsize =(6 , 4) ) 492 plt. plot (idx , residuals , ".", markersize =3) 493 plt . axhline (0.0 , linestyle =" --", linewidth =1) 494 plt . xlabel (" Index n") 495 plt . ylabel (" Residual P(E) - gamma_n ") 496 plt . title (" Residuals of the polynomial fit") 497 plt.tight_layout() 498 plt. show () 499 500 return coeffs 501 502 503 # ====================================================== 504 # 14. Main : generate the figures for the appendix 505 # ====================================================== 506 507 if __name__ == " __main__ ": 35
508 H_demo , lambdas_full_demo = build_H_phase_arith ( seed_M =SEED_M0 ) 509 evals_demo = np. linalg . eigvalsh ( H_demo ) 510 s_demo , evals_sorted_demo = level_spacings ( evals_demo ) 511 512 print (" ====== SPECTRUM INFO ====== ") 513 print (" Dimension =" , evals_sorted_demo.size) 514 print (" min ( evals ) =" , evals_sorted_demo.min ()) 515 print (" max ( evals ) =" , evals_sorted_demo.max ()) 516 print ("==================================") 517 518 try: 519 zeros = load_zeta_zeros () 520 print ("Loaded", zeros .size , " Riemann zeros .") 521 522 coeffs_poly6 = demo_poly_fit_and_plots ( evals_demo , zeros , deg =6) 523 evals_mapped = apply_poly_map (evals_demo , coeffs_poly6 ) 524 525 plot_spacing_comparison ( evals_demo , zeros , 526 s_max =3.0 , bins =40) 527 528 S_MAX = 5.0 529 BIN_WIDTH = 0.03 530 BULK_TRIM = 20 531 s_centers , g_mean , N_used = average_pair_correlation ( 532 num_seeds =30 , 533 s_max = S_MAX , 534 bin_width = BIN_WIDTH , 535 bulk_trim = BULK_TRIM 536 ) 537 print (" Pair - correlation used ", N_used , "realizations.") 538 if s_centers is not None: 539 plot_R2_comparison( 540 s_centers , g_mean , zeros , 541 s_max = S_MAX , 542 bin_width = BIN_WIDTH , 543 bulk_trim = BULK_TRIM , 544 smooth_k =2 545 ) 546 547 t_vals = np . linspace (0.0 , 50.0 , 200) 548 K_H_mapped = spectral_form_factor ( evals_mapped , t_vals ) 549 K_Z = spectral_form_factor ( zeros , t_vals ) 550 551 plt . figure ( figsize =(6 , 4) ) 552 plt . plot ( t_vals , K_H_mapped , label ="H ( polynomial - mapped )") 553 plt . plot ( t_vals , K_Z , label =" Riemann zeros ") 554 plt . xlabel ("t") 555 plt . ylabel ("K(t)") 556 plt . title (" SFF : polynomial - mapped H vs Riemann zeros ") 557 plt . legend () 558 plt.tight_layout() 559 plt. show () 560 561 except OSError as e: 562 print ("[ WARNING ] Could not load Riemann zeros :" , e) 36