# Efficient numerical evaluation of thermodynamic quantities on infinite (semi-)classical chains

This work presents an efficient numerical method to evaluate the free energy density and associated thermodynamic quantities of (quasi) one-dimensional classical systems, by combining the transfer operator approach with a numerical discretization of integral kernels using quadrature rules. For analytic kernels, the technique exhibits exponential convergence in the number of quadrature points. As demonstration, we apply the method to a classical particle chain, to the semiclassical nonlinear Schrödinger equation and to a classical system on a cylindrical lattice.

• 3 publications
• 3 publications
02/15/2022

### Two Numerical Approaches for Nonlinear Weakly Singular Integral Equations

Singularity subtraction for linear weakly singular Fredholm integral equ...
05/12/2020

### A fast sparse spectral method for nonlinear integro-differential Volterra equations with general kernels

We present a sparse spectral method for nonlinear integro-differential V...
10/16/2020

### An Accurate Low-Order Discretization Scheme for the Identity Operator in the Magnetic Field and Combined Field Integral Equations

A new low-order discretization scheme for the identity operator in the m...
03/15/2021

### Iterated integrals over letters induced by quadratic forms

An automated treatment of iterated integrals based on letters induced by...
02/26/2021

### Approximation of Stochastic Volterra Equations with kernels of completely monotone type

In this work, we develop a multi-factor approximation for Stochastic Vol...
07/20/2022

### Efficient numerical valuation of European options under the two-asset Kou jump-diffusion model

This paper concerns the numerical solution of the two-dimensional time-d...
04/03/2012

### Kernel Methods for the Approximation of Some Key Quantities of Nonlinear Systems

We introduce a data-based approach to estimating key quantities which ar...

## 1 Introduction

The partition function is a cornerstone of statistical mechanics [1, 2], in particular since thermodynamics quantities can be obtained as derivatives of . Nevertheless, computing for larger systems is a challenging task if a closed-form solution cannot be found. In this work we are concerned with an efficient numerical method for evaluating and the associated free energy density for (semi-)classical chains, in the thermodynamic limit of infinite system size. In more detail, we consider a Hamiltonian on a (quasi) one-dimensional lattice of size , containing solely nearest neighbor terms:

 H(z1,…,zL)=L∑ℓ=1h(zℓ,zℓ+1), (1)

with for all and some fixed . We assume periodic boundary conditions and thus set . A canonical example is a classical particle chain, with the momentum and position of the -th particle (), and

 Hpc(p1,…,pL,q1,…,qL)=L∑ℓ=1(12p2ℓ+V(qℓ,qℓ+1)) (2)

consisting of kinetic energy terms and the potential energy described by .

The partition function of the physical system is defined as

 ZL(β)=∫Ω⋯∫Ωe−βH(z1,…,zL)dz1⋯dzL, (3)

with the “inverse temperature”. Our goal is to take the thermodynamic limit and compute the canonical free energy density

 F(β)=−β−1limL→∞1LlogZL(β). (4)

## 2 Method

To evaluate the partition function numerically, we combine the well-known transfer-matrix method [3, 4] with a numerical discretization of integral kernels based on numerical quadrature methods. The latter idea traces back to Nyström [5] and was recently applied by the second author to the computation of Fredholm determinants [6].

### 2.1 Assumptions

To keep technical preliminaries as simple as possible, we make the following assumptions, which cover the applications in the next section: Let be a (not necessarily finite) interval of and be a finite positive measure on with a strictly positive, continuous density (weight function). Now we rewrite the partition function in the form

 ZL(β)=∫Ω⋯∫ΩL∏ℓ=1kβ(zℓ,zℓ+1)dν(z1)⋯dν(zL) (5)

with as before. Here the integral kernel

 kβ:Ω×Ω→R,kβ(z,z′)=e−βh(z,z′)√ω(z)ω(z′) (6)

is assumed to be continuous and bounded; it is strictly positive by construction. We further assume that , i.e., is a symmetric kernel. These assumptions imply, in particular,

 ∫Ω∫Ω|kβ(z,z′)|2dν(z)dν(z′)<∞, (7)

so that the symmetric kernel induces an integral operator [7, §16.1]

 (Tβu)(z)=∫Ωkβ(z,z′)u(z′)dν(z′),u∈L2(Ω,ν). (8)

on the Hilbert space that is self-adjoint and Hilbert–Schmidt (and hence, compact). Since the product of two Hilbert-Schmidt operators is of trace class and the trace class operators form an ideal within the bounded ones, Eq. (5) for may be represented as333This holds for only if would be trace class itself, cf. the discussion in [6, pp. 878–879].

 ZL(β)=Tr(TLβ). (9)

### 2.2 Dominant eigenvalue and free energy

Following the mathematical theory of compact operators on Hilbert spaces [7, §21.2], the non-zero elements of the spectrum of

(which is real since the operator is selfadjoint) are at most countably many eigenvalues of finite multiplicity that accumulate only at

(which belongs to the spectrum).

Generalizing the Perron–Frobenius theory in matrix analysis [8, §8.2], Jentzsch’s Theorem [9, §8.7, Satz 3] states that the Hilbert-Schmidt operator with strictly positive kernel has a simple, dominant, strictly positive eigenvalue. That is, all the non-zero eigenvalues can be ordered as (with each eigenvalue listed as often as given by its multiplicity)

 λ1(Tβ)>|λ2(Tβ)|≥|λ3(Tβ)|≥⋯>0.

Hence, evaluating Eq. (9) together with Lidskii’s theorem [7, §30.3], that is,

 Tr(TLβ)=∑jλj(Tβ)L(L≥2),

 limL→∞1LlogZL(β)=limL→∞1Llog∑jλj(Tβ)L=logλ1(Tβ),F(β)=−β−1logλ1(Tβ). (10)

Thus the calculation of the free energy amounts to computing the dominant eigenvalue of .

### 2.3 Nyström method for computing the dominant eigenvalue

For simplicity, we restrict the discussion of the numerical method to , that is, . For the multi-dimensional case , see the discussion of the example in Sect. 3.3.

We make use of a numerical quadrature rule of the form

 ∫Ωf(z)dν(z)≈m∑i=1wif(zi) (11)

with positive weights and nodes . The approximation is of order if the quadrature rule is exact for polynomials of degree at most . It is possible to construct such a unique quadrature rule of maximum order , called Gauss quadrature rule; see [10] for the classical construction of Gaussian weights and nodes from the tridiagonal Jacobi matrix of the orthogonal polynomials associated with the measure

. Error estimates depend on the regularity of the integrand

, e.g., [11, §4.8]: the error for is of the form if and of the form with some if extends analytically to an ellipse or (semi)-strip in the complex plane containing . The former estimate is called algebraic convergence, the latter exponential convergence.

Inserting the quadrature rule into Eq. (8) results in

 (Tβu)(zi)≈m∑j=1kβ(zi,zj)wju(zj) (12)

for all . Setting , we have thus discretized the integral operator by the symmetric matrix (Nyström method)

 Tβ=(kβ(zi,zj)√wiwj)mi,j=1. (13)

By the Perron–Frobenius theory [8, Cor. 8.2.6], this (element-wise) strictly positive matrix has a simple, dominant, strictly positive eigenvalue . The following theorem shows that , and thus for the free energy density in Eq. (4)

 F(β)≈−β−1logλ1(Tβ), (14)

with a speed of convergence, algebraic or exponential, depending on the smoothness of .

###### Theorem 1.

Under the assumptions in Sect. 2.1 the error of the Nyström method for computing the dominant eigenvalue behaves as follows as :

• if then there is algebraic convergence ;

• if extends analytically to , where is an ellipse or (semi-)strip, there is exponential convergence with some constant .

The classical, though long and quite involved proof goes by the theory of collectively compact operators and can be found in many books on the numerical treatment of integral equations, e.g., [12, Thm. 4.8.20]. Note, that though only the case of algebraic convergence is covered in this reference, the proof extends literally to the case of exponential convergence by adjusting the consistence assumptions accordingly.

An alternative, conceptually much simpler novel proof based on the theory of the Fredholm determinant can be found in the Appendix of this paper.

###### Remark.

While the Nyström method for the dominant eigenvalue essentially inherits the convergence properties of an underlying cubature formula also in the multidimensional case (see the proof in the Appendix for guidance), we refrained from formulating a general theorem since the characterization of convergence properties of general cubature formulae is much more involved in the first place. If, however, a Gaussian quadrature is applied coordinate-wise, Theorem 1 extends in a straightforward fashion (in the case of exponential convergence has then to be chosen as an poly-ellipse or poly-(semi-)strip), cf. the example in Sect. 3.3.

## 3 Applications

We demonstrate the range of applicability of the method via a diverse selection of model systems.

### 3.1 Classical particle chain

Consider a classical particle chain governed by a Hamiltonian of the form (2) above. For evaluating the partition function, the integration over the momentum variables can be performed in closed form, such that

 ZL(β)=(2πβ)L/2~ZL(β) (15)

with

 ~ZL(β)=∫∞−∞⋯∫∞−∞L∏ℓ=1e−βV(qℓ,qℓ+1)dq1⋯dqL. (16)

As specific example for the following, we choose

 V(q,q′)=Vloc(q)+12γ(q−q′)2 (17)

with anharmonic on-site potential

 Vloc(q)=12ηq2+16μq3+124λq4 (18)

and coefficients , , . The term ensures that grows asymptotically to infinity as , and the above is equivalent to its symmetrized version .

We now assign the term from the on-site potential to the weight function:

 ω:R→R+,ω(q)=e−12βηq2√2π/(βη). (19)

This leads to a (rescaled) Gauss-Hermite quadrature rule [13, §3.5(v)], and we denote the weights by and nodes by , , as above.444A modern, fast numerical method of optimal complexity for calculating these weights and nodes can be found in [14]. The particular choice of the weight function is somewhat arbitrary — we could have also included the cubic and quartic terms from the on-site potential into the weight function; at the expense, though, of a less straightforward computation of the weights and nodes of the quadrature rule. The general reasoning is to capture most of the local weight while retaining a well-behaved kernel for the genuine inter-particle potential (see Eq. (21) below).

Combining the weight function (19) with Eq. (16) leads to

 ~ZL(β)=(2πβη)L/2∫∞−∞⋯∫∞−∞L∏ℓ=1kβ(qℓ,qℓ+1)dν(q1)⋯dν(qL) (20)

with the symmetrized kernel

 kβ(q,q′)=e−112βμ(q3+q′3)−148βλ(q4+q′4)−12βγ(q−q′)2. (21)

We then assemble the symmetric matrix in Eq. (13). Finally, after taking all prefactors in to account, the numerical approximation of the free energy density reads

 −βF(β)=limL→∞1LlogZL(β)≈log2πβ−12logη+logλ1(Tβ). (22)

The special case serves as reference, since the partition function factorizes in this case, i.e., with

 logZ1(β)|γ=0=12log2πβ+log∫∞−∞e−βVloc(q)dq. (23)

For the following numerical examples, we set and . Fig. 1 visualizes the kernel in Eq. (21). The factor localizes the kernel around the line , which poses a challenge for accurately “sampling” it using a limited number of points in Eq. (13).

Fig. (a)a shows the free energy as function of , for several values of , and Fig. (b)b the relative error depending on the number of quadrature points . One observes exponential convergence. The less favorable shape of the kernel with increasing , as mentioned above (see also Fig. 1), translates to a slower convergence rate.

Based on the free energy one can obtain averages and higher-order cumulants following the well-known procedure based on derivatives of . For example, the average squared particle distance and energy per site are

 ⟨12(qℓ−qℓ+1)2⟩=∂γF,⟨eℓ⟩=∂β(βF), (24)

independent of by translation invariance. In practice, a higher-order finite difference scheme on a fine grid is well suited to calculate the derivatives. Fig. 3 shows these averages, for the same parameters as before. One notices that the average energy hardly depends on .

As a remark, for the case of vanishing on-site potential, , the model conserves momentum, and the statistical mechanics description changes accordingly [15]. Numerically computing the free energy is less challenging in this case since the partition function factorizes after introducing the “stretch” .

### 3.2 Discrete nonlinear Schrödinger equation

The method described in Sect. 2 has been employed in the work [16] on the discrete nonlinear Schrödinger equation. Here we present and elaborate on the numerical aspects in more detail.

To be self-contained, we first restate the physical setup: the central object is a complex-valued wave field () governed by the semiclassical Hamiltonian

 H(ψ1,…,ψL)=L∑ℓ=1(12|ψℓ+1−ψℓ|2+12g|ψℓ|4), (25)

with parameter (so-called defocusing case). The corresponding partition function reads

 ZL(μ,β)=∫e−β(H−μN)dψ1⋯dψL, (26)

where we have introduced the chemical potential as additional parameter, which is dual to the total particle number .

A symplectic change of variables to polar coordinates leads to the representation

 ψℓ=√ρℓeiφℓ (27)

with , and (unit circle). The Hamiltonian in these variables reads

 H=L∑ℓ=1(−√ρℓ+1ρℓcos(φℓ+1−φℓ)+ρℓ+12gρ2ℓ). (28)

It depends only on phase differences, which implies the invariance under the global shift . For evaluating the partition function, the integrals can be calculated in closed form [17]. This leads to

 ZL(μ,β)=eβ12μ2L/g∫Ω⋯∫ΩL∏ℓ=1kβ(ρℓ,ρℓ+1)e−β12g(ρℓ−μg)2dρ1⋯dρL (29)

with the kernel

 kβ(ρ,ρ′)=2πI0(β√ρρ′)e−β12(ρ+ρ′). (30)

is the modified Bessel function of the first kind. For this example, we use the second factor of the integrand in Eq. (29) as weight function:

 ω:Ω→R+,ω(z)=ce−a(z−b)2/2 (31)

with , and the normalization constant

 c=2√a2π1+erf(b√a2). (32)

After constructing a Gauss quadrature rule on as described in Sect. 2.3, we form the symmetric matrix in Eq. (13), here denoted since it implicitly also depends on via the quadrature points and weights. Then, taking the prefactor in Eq. (29) and the normalization constant (32) into account, one arrives at

 −βF(μ,β)=limL→∞1LlogZL(μ,β)≈β12μ2g+logλ1(Tμ,β)−logc(μ,β). (33)

Fig. 4 shows the free energy as function of , for various values of .

Numerically, we again observe exponential convergence with respect to the number of quadrature points, see Fig. 5. At and for example, points suffice for double precision accuracy. The reference data stems from a calculation with .

As mentioned before, one can obtain thermodynamic averages based on derivatives of . For example, the average density and energy per lattice site are

 ⟨ρℓ⟩=−∂μF(μ,β),⟨eℓ⟩=∂β(βF(μ,β))+μ⟨ρℓ⟩. (34)

See [16] for a detailed study of the model.

### 3.3 Classical oscillators on a cylindrical lattice

The numerical method is in principle also applicable to two-dimensional lattices, by using periodic boundary conditions in one direction and reducing the setting to a quasi-one dimensional problem. Specifically, we consider the lattice for , i.e., starting with periodic boundary conditions both in - and -direction, but eventually sending while keeping finite. Thus we arrive at a cylindrical lattice, as visualized in Fig. 6.

We identify a lattice site by the index , and consider for simplicity scalar spatial variables ; these could be displacements from the reference positions in one fixed direction, for example. denotes the momentum of the -th particle.

As demonstration, let the system be governed by the Hamiltonian

 H=∑ℓ∈Γ(12p2ℓ+Vloc(qℓ))+∑⟨ℓ,ℓ′⟩Vℓ′−ℓ(qℓ,qℓ′), (35)

consisting of site-local kinetic and potential energy terms (first sum) as well as nearest neighbor interactions (second sum). Specifically, we consider a local quadratic potential , , and an interaction potential with two coefficients and .

To cast the Hamiltonian (35) into the form of Eq. (1

), we subsume the particles contained in one lattice “ring” into the vectors

 pℓx =(p(ℓx,1),…,p(ℓx,Ly))∈RLy, (36) qℓx =(q(ℓx,1),…,q(ℓx,Ly))∈RLy (37)

for .

Similar to the particle chain in subsection 3.1, the momentum integration for evaluating the partition function can be performed explicitly. This results in

 Z(Lx,Ly)(β)=(2πβ)LxLy/2~Z(Lx,Ly)(β) (38)

with

 ~Z(Lx,Ly)(β)=∫RLy⋯∫RLyLx∏ℓx=1e−β(~Vloc(qℓx)+~Vint(qℓx,qℓx+1))dLyq1⋯dLyqLx, (39)

where

 ~Vloc(q)=Ly∑ℓy=1Vloc(qℓy) (40)

and

 ~Vint(q,q′)=Ly∑ℓy=1(12ax(qℓy−q′ℓy)2+14ay(qℓy−qℓy+1)2+14ay(q′ℓy−q′ℓy+1)2). (41)

Note that is symmetric in its arguments, i.e., for any .

It suggests itself to use the factor in Eq. (39

) as integration measure, resulting in a tensor product of normal distributions:

 ω:RLy→R+,ω(q)=e−12βη∥q∥2(2πβη)Ly/2=Ly∏ℓy=1e−12βηq2ℓy√2π/(βη). (42)

We use a rescaled Gauss-Hermite quadrature rule along each coordinate direction, as in Sect. 3.1. Theorem 1

extends straightforwardly to this choice. An alternative, which is less affected by the inherent curse of dimensionality, is a cubature rule dedicated to multidimensional integration

[18, 19, 20, 21], or sparse grid methods. The convergence properties of such cubature rules are more involved, but they would essentially be inherited by the Nyström method for the dominated eigenvalue. We leave an exploration of these ideas for future work.

Using as measure, Eq. (39) becomes

 ~Z(Lx,Ly)(β)=(2πβη)LxLy/2∫RLy⋯∫RLyLx∏ℓx=1kβ(qℓx,qℓx+1)dν(q1)⋯dν(qLx) (43)

with the kernel

 kβ(q,q′)=e−β~Vint(q,q′). (44)

Following the factorized quadrature rule, the symmetric matrix in Eq. (13) takes the form

 Tβ=(kβ(qi,qj)√wiwj)i,j (45)

with multi-indices and the definitions , and , , the weights and points of the one-dimensional rescaled Gauss-Hermite quadrature rule. Thus the overall number of weights and points is .

The numerical approximation of the free energy per lattice site is then

 −βF(β)=limLx→∞1LxLylogZ(Lx,Ly)(β)≈log2πβ−12logη+1Lylogλ1(Tβ), (46)

with kept fixed. For the following examples, we set , such that the overall number of quadrature points remains manageable up to . Fig. (a)a visualizes the free energy as function of , for several combinations of . One notices that the curve for is visually indistinguishable from the case with interchanged parameters , pointing to the conclusion that the influence of a finite compared to the “infinite” on the free energy is quite small.

Fig. (b)b shows the corresponding relative error depending on the number of quadrature points along one dimension. In the special case (without coupling in -direction), the partition function factorizes, such that, analogous to Sect. 3.1, with

 ~Z(1,Ly)(β)|ax=0=∫RLye−β(12η∥q∥2+∑Lyℓy=112ay(qℓy−qℓy+1)2)dLyq. (47)

We evaluate this integral numerically and use it as reference for computing the relative error in Fig. (b)b for . The relative error is still rather large for and ; as before, this observation can be explained by the difficulty of accurately sampling the kernel (44) via (45) using a small number of quadrature points along each coordinate. To mitigate this issue for the present example, one could associate the terms in the Hamiltonian to the integration measure instead of the kernel, at the expense of a more complicated quadrature rule.

In summary, this application example demonstrates that our method can in principle handle two-dimensional lattice topologies as well, although the large number of required quadrature points (when interpreting the problem as quasi one-dimensional) limits the size of the periodic dimension in practice.

## 4 Conclusion and outlook

The convergence plots of the example applications illustrate the validity of Theorem 1, which states that approximating the dominant eigenvalue of the discretized kernel inherits the favorable exponential convergence properties of the underlying quadrature rule in the case of kernels extending analytically into the complex domain.

To optimize the numerical performance of the method for the cylindrical topologies, one could further exploit the factorized structure of in (44) along coordinate directions, or use sparse grid methods for the quadrature as mentioned above.

Concerning transfer operator techniques in general, it could be fruitful to adopt ideas from quantum mechanics (see e.g. [22]), or set oriented numerical methods [23].

#### Acknowledgments

C.M. likes to thank Herbert Spohn and Abhishek Dhar for helpful discussions, and the Munich Center for Quantum Science and Technology for support.

## Appendix

We give here an alternative, conceptually much simpler proof555To the best of our knowledge, this proof has not yet been given in the literature. of Theorem 1 based on the theory of the Fredholm determinant of the kernel , namely

 D(μ)=1+∞∑n=1(−μ)nn!∫Ω⋯∫Ωndeti,j=1kβ(zi,zj)dν(z1)⋯dν(zn).

Given the assumptions in Sect. 2.1, is an entire function whose roots are exactly the reciprocal non-zero eigenvalues of , see [9, §6.2, Satz 3]. The Weierstrass product [9, §6.4, Satz 1]

 D(μ)=eαμ+βμ2∏n(1−μλn(Tβ))eμλn(Tβ)

shows that the multiplicities of the roots of and the multiplicities of the non-zero eigenvalues of agree. In particular, is a simple root and therefore . Also, [6, Thm. 6.2] (whose proof can literally be extended to the current assumptions) gives

 det(I−μTβ)=D(μ)+ϵm(μ) (#)

where, uniformly for bounded , the error is given by or according to whether or extends analytically into the complex plane. By Perron–Frobenius is the simple, dominant, strictly positive eigenvalue of the entry-wise positive matrix , which by the argument principle of complex analysis must satisfy

 1/λ1(Tβ)→1/λ1(Tβ)(m→∞).

Hence, by inserting into (#Appendix), followed by a Taylor expansion, we get

 λ1(Tβ)=λ1(Tβ)+λ1(Tβ)2D′(λ1(Tβ)−1)ϵm(λ1(Tβ)−1))+O(ϵm(λ1(Tβ)−1))2),

which completes the proof.

## References

• [1] L. D. Landau and E. M. Lifshitz. Statistical Physics: Part 1. Pergamon, 1980.
• [2] K. Huang. Introduction to Statistical Physics. Taylor and Francis, 2010.
• [3] H. A. Kramers and G. H. Wannier. Phys. Rev., 60:252–262, 1941.
• [4] G. Mussardo. Statistical Field Theory: An Introduction to Exactly Solved Models in Statistical Physics. Oxford University Press, 2009.
• [5] E. J. Nyström. Acta Math., 54:185–204, 1930.
• [6] F. Bornemann. Math. Comp., 79:871–915, 2010.
• [7] P. D. Lax. Functional Analysis. Wiley-Interscience, 2002.
• [8] R. A. Horn and C. R. Johnson. Matrix analysis. Cambridge University Press, Cambridge, 1985.
• [9] S. Fenyö and H.-W. Stolle. VEB Deutscher Verlag der Wissenschaften, Berlin, 1983.
• [10] G. H. Golub and J. H. Welsch. Math. Comp., 23:221–230, 1969.
• [11] P. J. Davis and P. Rabinowitz. Methods of numerical integration. Dover Publications, Inc., Mineola, NY, 2007. Corrected reprint of the second (1984) edition.
• [12] W. Hackbusch. Birkhäuser Verlag, Basel, 1995.
• [13] F. W. J. Olver, D. W. Lozier, R. F. Boisvert, and C. W. Clark, editors. NIST Handbook of Mathematical Functions. Cambridge University Press, 2010.
• [14] A. Townsend, T. Trogdon, and S. Olver. IMA J. Numer. Anal., 36:337–358, 2016.
• [15] H. Spohn. J. Stat. Phys., 154:1191–1227, 2014.
• [16] C. B. Mendl and H. Spohn. J. Stat. Mech., 2015:P08028, 2015.
• [17] K. O. Rasmussen, T. Cretegny, P. G. Kevrekidis, and N. Grønbech-Jensen. Phys. Rev. Lett., 84:3740–3743, 2000.
• [18] A. H. Stroud. Approximate Calculation of Multiple Integrals. Prentice-Hall, 1971.
• [19] R. Cools and P. Rabinowitz. J. Comput. Appl. Math., 48:309–326, 1993.
• [20] R. Cools. Acta Numerica, 6:1–54, 1997.
• [21] V. Keshavarzzadeh, R. M. Kirby, and A. Narayan. SIAM J. Sci. Comput., 40:A2033–A2061, 2018.
• [22] J. Haegeman and F. Verstraete. Annu. Rev. Condens. Matter Phys., 8:355–406, 2017.
• [23] M. Dellnitz and O. Junge. SIAM J. Numer. Anal., 36:491–515, 1999.