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\"odinger equation and to a classical system on a cylindrical lattice.


Introduction
The partition function Z is a cornerstone of statistical mechanics [1,2], in particular since thermodynamics quantities can be obtained as derivatives of Z. Nevertheless, computing Z 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 Z 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 H on a (quasi) one-dimensional lattice of size L, containing solely nearest neighbor terms: with z ∈ Ω ⊂ R n for all and some fixed n ∈ N. We assume periodic boundary conditions and thus set z L+1 = z 1 . A canonical example is a classical particle chain, with z = (p , q ) ∈ R 2d the momentum and position of the -th particle (d ∈ {1, 2, 3}), and H pc (p 1 , . . . , p L , q 1 , . . . , q L ) = L =1 1 2 p 2 + V (q , q +1 ) consisting of kinetic energy terms 1 2 p 2 and the potential energy described by V .
The partition function of the physical system is defined as Z L (β) = Ω · · · Ω e −βH(z 1 ,...,z L ) dz 1 · · · dz L , with β = 1/(k B T ) ∈ R + the "inverse temperature". Our goal is to take the thermodynamic limit L → ∞ and compute the canonical free energy density

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].

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 R n and ν be a finite positive measure on Ω with a strictly positive, continuous density ω (weight function). Now we rewrite the partition function in the form with z L+1 = z 1 as before. Here the integral kernel is assumed to be continuous and bounded; it is strictly positive by construction. We further assume that h(z, z ) = h(z , z), i.e., k β is a symmetric kernel. These assumptions imply, in particular, so that the symmetric kernel k β induces an integral operator [7, §16.1] on the Hilbert space L 2 (Ω, ν) 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 L ≥ 2 may be represented as 1

Dominant eigenvalue and free energy
Following the mathematical theory of compact operators on Hilbert spaces [7, §21.2], the nonzero elements of the spectrum of T β (which is real since the operator is selfadjoint) are at most countably many eigenvalues of finite multiplicity that accumulate only at 0 (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 T β with strictly positive kernel k β 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) Hence, evaluating Eq. (9) together with Lidskii's theorem [7, §30.3], that is, Thus the calculation of the free energy amounts to computing the dominant eigenvalue of T β .

Nyström method for computing the dominant eigenvalue
For simplicity, we restrict the discussion of the numerical method to n = 1, that is, Ω ⊂ R. For the multi-dimensional case n > 1, see the discussion of the example in Sect. 3.3. We make use of a numerical quadrature rule of the form with positive weights w i > 0 and nodes z i . The approximation is of order p ≥ 1 if the quadrature rule is exact for polynomials of degree at most p − 1. It is possible to construct such a unique quadrature rule of maximum order p = 2m, 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 f , e.g., [11, §4.8]: the error for m → ∞ is of the form O(m −k ) if f ∈ C k−1,1 and of the form O(e −cm ) with some c > 0 if f 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 for all i = 1, . . . , m. Setting u i = √ w i u(z i ), we have thus discretized the integral operator by the symmetric m × m matrix (Nyström method) By the Perron-Frobenius theory [8,Cor. 8.2.6], this (element-wise) strictly positive matrix has a simple, dominant, strictly positive eigenvalue λ 1 (T β ). The following theorem shows that λ 1 (T β ) ≈ λ 1 (T β ), and thus for the free energy density in Eq. (4) with a speed of convergence, algebraic or exponential, depending on the smoothness of k β . Theorem 1. Under the assumptions in Sect. 2.1 the error m = λ 1 (T β ) − λ 1 (T β ) of the Nyström method for computing the dominant eigenvalue behaves as follows as m → ∞: 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 n > 1 (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 E ⊂ C n has then to be chosen as an poly-ellipse or poly-(semi-)strip), cf. the example in Sect. 3.3.

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

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 withZ As specific example for the following, we choose with anharmonic on-site potential and coefficients λ, µ, η, γ ∈ R, η > 0, |λ| ≥ |µ|. The ∼ q 4 term ensures that V grows asymptotically to infinity as |q| → ∞, and the above V (q, q ) is equivalent to its symmetrized version We now assign the term 1 2 ηq 2 from the on-site potential to the weight function: This leads to a (rescaled) Gauss-Hermite quadrature rule [13, §3.5(v)], and we denote the weights by w i and nodes by z i , i = 1, . . . , m, as above. 2 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 tõ with the symmetrized kernel 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 The special case γ = 0 serves as reference, since the partition function factorizes in this case, i.e., For the following numerical examples, we set λ = µ = 1 5 and η = 1. Fig. 1 visualizes the kernel in Eq. (21). The factor e − 1 2 βγ(q−q ) 2 localizes the kernel around the line q = q , which poses a challenge for accurately "sampling" it using a limited number of points z i in Eq. (13). Fig. 2a shows the free energy as function of β, for several values of γ, and Fig. 2b the relative error depending on the number of quadrature points m. 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 F . For example, the average squared particle distance and energy per site are 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, V loc ≡ 0, 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" r = q +1 − q .

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 ψ ( = 1, . . . , L) governed by the semiclassical Hamiltonian with parameter g > 0 (so-called defocusing case). The corresponding partition function reads where we have introduced the chemical potential µ as additional parameter, which is dual to the total particle number N = L =1 |ψ | 2 . A symplectic change of variables to polar coordinates leads to the representation with ρ ∈ Ω = [0, ∞), and ϕ ∈ S 1 (unit circle). The Hamiltonian in these variables reads 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 with the kernel k β (ρ, ρ ) = 2πI 0 β ρ ρ e −β 1 2 (ρ+ρ ) . .
After constructing a Gauss quadrature rule on Ω = [0, ∞) as described in Sect. 2.3, we form the symmetric matrix in Eq. (13), here denoted T µ,β 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 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 β = 15 and µ = 1 for example, m = 16 points suffice for double precision accuracy. The reference data stems from a calculation with m = 20.
As mentioned before, one can obtain thermodynamic averages based on derivatives of F (µ, β). For example, the average density and energy per lattice site are See [16] for a detailed study of the model.

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 Γ = Z/(L x ) ⊗ Z/(L y ) for L x , L y ∈ N, i.e., starting with periodic boundary conditions both in x-and y-direction, but eventually sending L x → ∞ while keeping L y finite. Thus we arrive at a cylindrical lattice, as visualized in Fig. 6. We identify a lattice site by the index = ( x , y ) ∈ Γ, and consider for simplicity scalar spatial variables q ∈ R; these could be displacements from the reference positions in one fixed direction, for example. p denotes the momentum of the -th particle.
As demonstration, let the system be governed by the Hamiltonian 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 V loc (q) = 1 2 ηq 2 , η > 0, and an interaction potential V ∆ (q, q ) = 1 2 a ∆ (q − q ) 2 with two coefficients a (±1,0) = a x and a (0,±1) = a y .
To cast the Hamiltonian (35) into the form of Eq. (1), we subsume the particles contained in Figure 6: Cylindrical lattice topology, using periodic boundary conditions in y-direction. Each small dot is a lattice site.
one lattice "ring" into the vectors for x = 1, . . . , L x . Similar to the particle chain in subsection 3.1, the momentum integration for evaluating the partition function can be performed explicitly. This results in whereṼ Note thatṼ int is symmetric in its arguments, i.e.,Ṽ int (q, q ) =Ṽ int (q , q) for any q, q ∈ R Ly . It suggests itself to use the factor e −βṼ loc (q) in Eq. (39) as integration measure, resulting in a tensor product of normal distributions: 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.
Following the factorized quadrature rule, the symmetric matrix in Eq. (13) takes the form with multi-indices i, j ∈ {1, . . . , m 0 } Ly and the definitions q i = (q i1 , . . . , q i Ly ), ω i = ω i1 · · · ω i Ly and w i , q i , i = 1, . . . , m 0 the weights and points of the one-dimensional rescaled Gauss-Hermite quadrature rule. Thus the overall number of weights and points is m = m Ly 0 . The numerical approximation of the free energy per lattice site is then with L y kept fixed. For the following examples, we set L y = 3, such that the overall number of quadrature points m = m Ly 0 remains manageable up to m 0 = 8. Fig. 7a visualizes the free energy as function of β, for several combinations of a = (a x , a y ). One notices that the curve for a = ( 1 2 , 1 5 ) is visually indistinguishable from the case with interchanged parameters a x ↔ a y , pointing to the conclusion that the influence of a finite L y compared to the "infinite" L x on the free energy is quite small. Fig. 7b shows the corresponding relative error depending on the number of quadrature points m 0 along one dimension. In the special case a x = 0 (without coupling in x-direction), the partition function factorizes, such that, analogous to Sect. 3.1,Z (Lx,Ly) (β)| ax=0 = (Z (1,Ly) (β)| ax=0 ) Lx withZ We evaluate this integral numerically and use it as reference for computing the relative error in Fig. 7b for a x = 0. The relative error is still rather large for a = ( 1 2 , 1 5 ) and a = ( 1 5 , 1 2 ); 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 a y 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 L y in practice.

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 k β 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].