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
$$\begin{aligned} Z_L(\beta ) = \left( \frac{2\pi }{\beta }\right) ^{L/2} {\tilde{Z}}_L(\beta ) \end{aligned}$$
(15)
with
$$\begin{aligned} {\tilde{Z}}_L(\beta ) = \int _{-\infty }^{\infty } \cdots \int _{-\infty }^{\infty } \prod _{\ell =1}^L {{\,\mathrm{e}\,}}^{-\beta V(q_\ell , q_{\ell +1})} \mathrm {d}q_1 \cdots \mathrm {d}q_L. \end{aligned}$$
(16)
As specific example for the following, we choose
$$\begin{aligned} V(q, q') = V_{\text {loc}}(q) + \tfrac{1}{2} \gamma (q - q')^2 \end{aligned}$$
(17)
with anharmonic on-site potential
$$\begin{aligned} V_{\text {loc}}(q) = \tfrac{1}{2} \eta q^2 + \tfrac{1}{6} \mu q^3 + \tfrac{1}{24} \lambda q^4 \end{aligned}$$
(18)
and coefficients \(\lambda , \mu , \eta , \gamma \in {\mathbb {R}}\), \(\eta > 0\), \(|{\lambda }| \ge |{\mu }|\). The \(\sim q^4\) term ensures that V grows asymptotically to infinity as \(|{q}| \rightarrow \infty \), and the above \(V(q, q')\) is equivalent to its symmetrized version \(\frac{1}{2} (V_{\text {loc}}(q) + V_{\text {loc}}(q')) + \frac{1}{2} \gamma (q - q')^2\).
We now assign the term \(\frac{1}{2} \eta q^2 \) from the on-site potential to the weight function:
$$\begin{aligned} \omega : {\mathbb {R}}\rightarrow {\mathbb {R}}^+, \quad \omega (q) = \frac{{{\,\mathrm{e}\,}}^{-\frac{1}{2} \beta \eta q^2}}{\sqrt{2\pi /(\beta \eta )}}. \end{aligned}$$
(19)
This leads to a (rescaled) Gauss-Hermite quadrature rule [14, §3.5(v)], and we denote the weights by \(w_i\) and nodes by \(z_i\), \(i = 1, \dots , m\), as above.Footnote 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 to
$$\begin{aligned} {\tilde{Z}}_L(\beta ) = \left( \frac{2\pi }{\beta \eta }\right) ^{L/2} \int _{-\infty }^{\infty } \cdots \int _{-\infty }^{\infty } \prod _{\ell =1}^L k_{\beta }(q_\ell , q_{\ell +1}) \, \mathrm {d}\nu (q_1) \cdots \mathrm {d}\nu (q_L) \end{aligned}$$
(20)
with the symmetrized kernel
$$\begin{aligned} k_{\beta }(q, q') = {{\,\mathrm{e}\,}}^{-\frac{1}{12} \beta \mu (q^3 + {q'}^3) - \frac{1}{48} \beta \lambda (q^4 + {q'}^4) - \frac{1}{2} \beta \gamma (q - q')^2}. \end{aligned}$$
(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
$$\begin{aligned} - \beta F(\beta ) = \lim _{L \rightarrow \infty } \frac{1}{L} \log Z_L(\beta ) \approx \log \frac{2\pi }{\beta } - \frac{1}{2} \log \eta + \log \lambda _1(T_{\beta }). \end{aligned}$$
(22)
The special case \(\gamma = 0\) serves as reference, since the partition function factorizes in this case, i.e., \(Z_L(\beta )\vert _{\gamma = 0} = (Z_1(\beta )\vert _{\gamma = 0})^L\) with
$$\begin{aligned} \log Z_1(\beta )\vert _{\gamma = 0} = \frac{1}{2} \log \frac{2\pi }{\beta } + \log \int _{-\infty }^{\infty } {{\,\mathrm{e}\,}}^{-\beta V_{\text {loc}}(q)} \mathrm {d}q. \end{aligned}$$
(23)
For the following numerical examples, we set \(\lambda = \mu = \frac{1}{5}\) and \(\eta = 1\). Figure 1 visualizes the kernel in Eq. (21). The factor \({{\,\mathrm{e}\,}}^{-\frac{1}{2} \beta \gamma (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).
Figure 2a shows the free energy as function of \(\beta \), for several values of \(\gamma \), 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 \(\gamma \), 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
$$\begin{aligned} \left\langle \tfrac{1}{2} (q_\ell - q_{\ell +1})^2 \right\rangle = \partial _{\gamma } F, \qquad \langle e_\ell \rangle = \partial _{\beta } (\beta F), \end{aligned}$$
(24)
independent of \(\ell \) by translation invariance. In practice, a higher-order finite difference scheme on a fine grid is well suited to calculate the derivatives. Figure 3 shows these averages, for the same parameters as before. One notices that the average energy hardly depends on \(\gamma \).
As a remark, for the case of vanishing on-site potential, \(V_{\text {loc}} \equiv 0\), the model conserves momentum, and the statistical mechanics description changes accordingly [16]. Numerically computing the free energy is less challenging in this case since the partition function factorizes after introducing the “stretch” \(r_{\ell } = q_{\ell +1} - q_\ell \).
Discrete Nonlinear Schrödinger Equation
The method described in Sect. 2 has been employed in the work [17] on the discrete nonlinear Schrödinger equation. Here we present and elaborate on the numerical aspects in more detail, and compare thermodynamic expectation values with results of molecular dynamics (MD) simulations.
To be self-contained, we first restate the physical setup: the central object is a complex-valued wave field \(\psi _\ell \) (\(\ell = 1, \dots , L\)) governed by the semiclassical Hamiltonian
$$\begin{aligned} H(\psi _1, \dots , \psi _L) = \sum _{\ell =1}^L \big ( \tfrac{1}{2} |{\psi _{\ell +1} - \psi _\ell }|^2 + \tfrac{1}{2}\,g\,|{\psi _\ell }|^4\big ), \end{aligned}$$
(25)
with parameter \(g > 0\) (so-called defocusing case). The corresponding partition function reads
$$\begin{aligned} Z_L(\mu , \beta ) = \int {{\,\mathrm{e}\,}}^{-\beta (H - \mu N)} \, \mathrm {d}\psi _1 \cdots \mathrm {d}\psi _L, \end{aligned}$$
(26)
where we have introduced the chemical potential \(\mu \) as additional parameter, which is dual to the total particle number \(N = \sum _{\ell =1}^L |{\psi _\ell }|^2\).
A symplectic change of variables to polar coordinates leads to the representation
$$\begin{aligned} \psi _\ell = \sqrt{\rho _\ell }\, {{\,\mathrm{e}\,}}^{\mathrm {i} \varphi _\ell } \end{aligned}$$
(27)
with \(\rho _\ell \in \Omega = [0, \infty )\), and \(\varphi _\ell \in S^1\) (unit circle). The Hamiltonian in these variables reads
$$\begin{aligned} H = \sum _{\ell =1}^L \big ( {-} \sqrt{\rho _{\ell +1}\,\rho _\ell }\, \cos (\varphi _{\ell +1} - \varphi _\ell ) + \rho _\ell + \tfrac{1}{2}\,g\,\rho _\ell ^2 \big ). \end{aligned}$$
(28)
It depends only on phase differences, which implies the invariance under the global shift \(\varphi _\ell \mapsto \varphi _\ell + \phi \). For evaluating the partition function, the \(\varphi _\ell \) integrals can be calculated in closed form [18]. This leads to
$$\begin{aligned} Z_L(\mu , \beta ) = {{\,\mathrm{e}\,}}^{\beta \frac{1}{2} \mu ^2 L/g} \int _{\Omega } \cdots \int _{\Omega } \prod _{\ell =1}^L k_{\beta }(\rho _\ell , \rho _{\ell +1}) \, {{\,\mathrm{e}\,}}^{-\beta \frac{1}{2} g \left( \rho _\ell - \frac{\mu }{g}\right) ^2} \, \mathrm {d}\rho _1 \cdots \mathrm {d}\rho _L \end{aligned}$$
(29)
with the kernel
$$\begin{aligned} k_{\beta }(\rho , \rho ') = 2\pi I_0\big (\beta \sqrt{\rho \,\rho '}\big )\, {{\,\mathrm{e}\,}}^{-\beta \frac{1}{2} (\rho + \rho ')}. \end{aligned}$$
(30)
\(I_0\) 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:
$$\begin{aligned} \omega : \Omega \rightarrow {\mathbb {R}}^+, \quad \omega (z) = c {{\,\mathrm{e}\,}}^{-a (z - b)^2/2} \end{aligned}$$
(31)
with \(a = \beta g\), \(b = \mu /g\) and the normalization constant
$$\begin{aligned} c = \frac{2 \sqrt{\frac{a}{2 \pi }}}{1 + {{\,\mathrm{erf}\,}}(b \sqrt{\frac{a}{2}})}. \end{aligned}$$
(32)
After constructing a Gauss quadrature rule on \(\Omega = [0, \infty )\) as described in Sect. 2.3, we form the symmetric matrix in Eq. (13), here denoted \(T_{\mu , \beta }\) since it implicitly also depends on \(\mu \) via the quadrature points and weights. Then, taking the prefactor in Eq. (29) and the normalization constant (32) into account, one arrives at
$$\begin{aligned} - \beta F(\mu , \beta ) = \lim _{L \rightarrow \infty } \frac{1}{L} \log Z_L(\mu , \beta ) \approx \beta \,\tfrac{1}{2} \tfrac{\mu ^2}{g} + \log \lambda _1(T_{\mu , \beta }) - \log c(\mu , \beta ). \end{aligned}$$
(33)
Fig. 4 shows the free energy as function of \(\beta \), for various values of \(\mu \).
Numerically, we again observe exponential convergence with respect to the number of quadrature points, see Fig. 5. At \(\beta = 15\) and \(\mu = 1\) for example, \(m = 16\) points suffice for double precision accuracy. The reference data stems from a calculation with \(m = 20\).
One can obtain thermodynamic averages based on derivatives of \(F(\mu , \beta )\). For example, the average density and energy per lattice site are
$$\begin{aligned} \langle \rho _\ell \rangle = - \partial _{\mu } F(\mu , \beta ), \qquad \langle e_\ell \rangle = \partial _{\beta } (\beta \,F(\mu , \beta )) + \mu \,\langle \rho _\ell \rangle . \end{aligned}$$
(34)
Fig. 6 shows these quantities as function of \(\beta \), and compares them with molecular dynamics simulations of the microscopic model (system size \(L = 4096\)). As described in [17], we equilibrate the system based on overdamped Langevin dynamics [19], using 1024 Langevin steps. One observes very good agreement, as expected.
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 \(\Gamma = {\mathbb {Z}}/(L_x) \otimes {\mathbb {Z}}/(L_y)\) for \(L_x, L_y \in {\mathbb {N}}\), i.e., starting with periodic boundary conditions both in x- and y-direction, but eventually sending \(L_x \rightarrow \infty \) while keeping \(L_y\) finite. Thus we arrive at a cylindrical lattice, as visualized in Fig. 7.
We identify a lattice site by the index \(\ell = (\ell _x, \ell _y) \in \Gamma \), and consider for simplicity scalar spatial variables \(q_\ell \in {\mathbb {R}}\); these could be displacements from the reference positions in one fixed direction, for example. \(p_\ell \) denotes the momentum of the \(\ell \)-th particle.
As demonstration, let the system be governed by the Hamiltonian
$$\begin{aligned} H = \sum _{\ell \in \Gamma } \left( \tfrac{1}{2} p_\ell ^2 + V_{\text {loc}}(q_\ell )\right) + \sum _{\langle \ell , \ell ' \rangle } V_{\ell ' - \ell }(q_\ell , q_{\ell '}), \end{aligned}$$
(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 \(V_{\text {loc}}(q) = \frac{1}{2} \eta q^2\), \(\eta > 0\), and an interaction potential \(V_{\Delta \ell }(q, q') = \frac{1}{2} a_{\Delta \ell } (q - q')^2\) with two coefficients \(a_{(\pm 1, 0)} = a_x\) and \(a_{(0, \pm 1)} = a_y\).
To cast the Hamiltonian (35) into the form of Eq. (1), we subsume the particles contained in one lattice “ring” into the vectors
$$\begin{aligned} \mathbf {p}_{\ell _x}&= \left( p_{(\ell _x, 1)}, \dots , p_{(\ell _x, L_y)}\right) \in {\mathbb {R}}^{L_y}, \end{aligned}$$
(36)
$$\begin{aligned} \mathbf {q}_{\ell _x}&= \left( q_{(\ell _x, 1)}, \dots , q_{(\ell _x, L_y)}\right) \in {\mathbb {R}}^{L_y} \end{aligned}$$
(37)
for \(\ell _x = 1, \dots , L_x\).
Similar to the particle chain in Sect. 3.1, the momentum integration for evaluating the partition function can be performed explicitly. This results in
$$\begin{aligned} Z_{(L_x,L_y)}(\beta ) = \left( \frac{2\pi }{\beta }\right) ^{L_x L_y /2} {\tilde{Z}}_{(L_x,L_y)}(\beta ) \end{aligned}$$
(38)
with
$$\begin{aligned} {\tilde{Z}}_{(L_x,L_y)}(\beta ) = \int _{{\mathbb {R}}^{L_y}} \cdots \int _{{\mathbb {R}}^{L_y}} \prod _{\ell _x=1}^{L_x} {{\,\mathrm{e}\,}}^{-\beta \left( {\tilde{V}}_{\text {loc}}(\mathbf {q}_{\ell _x}) + {\tilde{V}}_{\text {int}}(\mathbf {q}_{\ell _x}, \mathbf {q}_{\ell _x+1})\right) } \mathrm {d}^{L_y}q_1 \cdots \mathrm {d}^{L_y}q_{L_x}, \end{aligned}$$
(39)
where
$$\begin{aligned} {\tilde{V}}_{\text {loc}}(\mathbf {q}) = \sum _{\ell _y=1}^{L_y} V_{\text {loc}}(q_{\ell _y}) \end{aligned}$$
(40)
and
$$\begin{aligned} {\tilde{V}}_{\text {int}}(\mathbf {q}, \mathbf {q}') = \sum _{\ell _y=1}^{L_y} \left( \tfrac{1}{2} a_x (q_{\ell _y} - q_{\ell _y}')^2 + \tfrac{1}{4} a_y (q_{\ell _y} - q_{\ell _y+1})^2 + \tfrac{1}{4} a_y (q_{\ell _y}' - q_{\ell _y+1}')^2\right) . \end{aligned}$$
(41)
Note that \({\tilde{V}}_{\text {int}}\) is symmetric in its arguments, i.e., \({\tilde{V}}_{\text {int}}(\mathbf {q}, \mathbf {q}') = {\tilde{V}}_{\text {int}}(\mathbf {q}', \mathbf {q})\) for any \(\mathbf {q}, \mathbf {q}' \in {\mathbb {R}}^{L_y}\).
It suggests itself to use the factor \({{\,\mathrm{e}\,}}^{-\beta {\tilde{V}}_{\text {loc}}(\mathbf {q})}\) in Eq. (39) as integration measure, resulting in a tensor product of normal distributions:
$$\begin{aligned} \omega : {\mathbb {R}}^{L_y} \rightarrow {\mathbb {R}}^+, \quad \omega (\mathbf {q}) = \frac{{{\,\mathrm{e}\,}}^{-\frac{1}{2} \beta \eta \Vert {\mathbf {q}}\Vert ^2}}{\big (\frac{2\pi }{\beta \eta }\big )^{L_y/2}} = \prod _{\ell _y=1}^{L_y} \frac{{{\,\mathrm{e}\,}}^{-\frac{1}{2} \beta \eta q_{\ell _y}^2}}{\sqrt{2\pi /(\beta \eta )}}. \end{aligned}$$
(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 [20,21,22,23], 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 dominant eigenvalue. We leave an exploration of these ideas for future work.
Using \(\mathrm {d}\nu (q) = \omega (q)\mathrm {d}q\) as measure, Eq. (39) becomes
$$\begin{aligned} {\tilde{Z}}_{(L_x,L_y)}(\beta ) = \left( \frac{2\pi }{\beta \eta }\right) ^{L_x L_y/2} \int _{{\mathbb {R}}^{L_y}} \cdots \int _{{\mathbb {R}}^{L_y}} \prod _{\ell _x=1}^{L_x} k_{\beta }(\mathbf {q}_{\ell _x}, \mathbf {q}_{\ell _x+1}) \, \mathrm {d}\nu (q_1) \cdots \mathrm {d}\nu (q_{L_x}) \end{aligned}$$
(43)
with the kernel
$$\begin{aligned} k_{\beta }(\mathbf {q}, \mathbf {q}') = {{\,\mathrm{e}\,}}^{-\beta {\tilde{V}}_{\text {int}}(\mathbf {q}, \mathbf {q}')}. \end{aligned}$$
(44)
Following the factorized quadrature rule, the symmetric matrix in Eq. (13) takes the form
$$\begin{aligned} T_{\beta } = \big (k_{\beta }(\mathbf {q}_{\mathbf {i}}, \mathbf {q}_{\mathbf {j}})\,\sqrt{w_{\mathbf {i}}\,w_{\mathbf {j}}}\big )_{\mathbf {i},\mathbf {j}} \end{aligned}$$
(45)
with multi-indices \(\mathbf {i}, \mathbf {j} \in \{1, \dots , m_0\}^{L_y}\) and the definitions \(\mathbf {q}_{\mathbf {i}} = (q_{i_1}, \dots , q_{i_{L_y}})\), \(\omega _{\mathbf {i}} = \omega _{i_1} \cdots \omega _{i_{L_y}}\) and \(w_i\), \(q_i\), \(i = 1, \dots , 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_0^{L_y}\).
The numerical approximation of the free energy per lattice site is then
$$\begin{aligned} - \beta F(\beta ) = \lim _{L_x \rightarrow \infty } \frac{1}{L_x L_y} \log Z_{(L_x,L_y)}(\beta ) \approx \log \frac{2\pi }{\beta } - \frac{1}{2} \log \eta + \frac{1}{L_y} \log \lambda _1(T_{\beta }), \end{aligned}$$
(46)
with \(L_y\) kept fixed. For the following examples, we set \(L_y = 3\), such that the overall number of quadrature points \(m = m_0^{L_y}\) remains manageable up to \(m_0 = 8\). Figure 8a visualizes the free energy as function of \(\beta \), for several combinations of \(a = (a_x, a_y)\). One notices that the curve for \(a = (\frac{1}{2}, \frac{1}{5})\) is visually indistinguishable from the case with interchanged parameters \(a_x \leftrightarrow 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.
Figure 8b 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, \({\tilde{Z}}_{(L_x,L_y)}(\beta )\vert _{a_x = 0} = ({\tilde{Z}}_{(1,L_y)}(\beta )\vert _{a_x = 0})^{L_x}\) with
$$\begin{aligned} {\tilde{Z}}_{(1,L_y)}(\beta )\vert _{a_x = 0} = \int _{{\mathbb {R}}^{L_y}} {{\,\mathrm{e}\,}}^{-\beta \left( \frac{1}{2} \eta \Vert {\mathbf {q}}\Vert ^2 + \sum _{\ell _y=1}^{L_y} \frac{1}{2} a_y (q_{\ell _y} - q_{\ell _y+1})^2 \right) } \mathrm {d}^{L_y} q. \end{aligned}$$
(47)
We evaluate this integral numerically and use it as reference for computing the relative error in Fig. 8b for \(a_x = 0\). The relative error is still rather large for \(a = (\frac{1}{2}, \frac{1}{5})\) and \(a = (\frac{1}{5}, \frac{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 \(\omega \) 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.