---
title: "Putting a Euclidean field on a lattice"
description: "Define the lattice action, derive its covariance and separate spacing, volume and sampling errors."
canonical_url: "https://sandboxphysics.com/learn/field-theory/euclidean-lattice-and-errors/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/learn/field-theory/euclidean-lattice-and-errors/"
last_modified: "2026-10-27"
---

[Fields, scales and critical phenomena](https://sandboxphysics.com/learn/field-theory/)

FR01 · L3 · Chapter 5

# Putting a Euclidean field on a lattice

Define the lattice action, derive its covariance and separate spacing, volume and sampling errors.

Before you start: Chapters 3–4. Matrix inverses, eigenvectors and sample autocorrelation are introduced as needed.

You will be able to: Design independent spacing, volume and sample-size checks and compute an autocorrelation-aware error.

Ideal analytic reference; dimensionless reference units. $G(s)=e^{-m\lvert s\rvert}/(2m),\quad m=1,2$These are infinite-line Euclidean functions. Finite-volume samples in the Lab have their own reference.

A finite lattice changes the probability distribution we calculate, and a finite sample changes how accurately we know it. Keeping those two effects apart lets us improve a calculation for the right reason. More samples reduce random uncertainty. A smaller spacing tests the short-distance approximation. A larger interval tests the influence of the boundary.

Prerequisites: the classical-field and free-field quantization chapters of this course, together with the ideas of a mean and a variance. We will use a matrix as a compact way to write coupled quadratic terms; the steps below explain what its entries mean. After this chapter, you should be able to design separate tests for spacing, volume and sampling errors.

## Replace an integral with neighboring sites

Consider one real field on a line. Measure distance in a reference length $\ell_0$, mass in $1/\ell_0$, and field amplitude in $\sqrt{\ell_0}$. We use natural units, so the Euclidean action is dimensionless. The numerical inputs below are expressed in these units.

Let $a$ be the site spacing and $m>0$ the mass parameter. On a periodic ring, $N$ sites fill a length $L=Na$. Neighboring values approximate a derivative: the change in field divided by the distance between them. Replacing the continuum integral by a sum gives

$$
S_E=\frac a2\sum_{j=0}^{N-1}\left[\left(\frac{\phi_{j+1}-\phi_j}{a}\right)^2+m^2\phi_j^2\right],\qquad \phi_N=\phi_0.
$$

A configuration with large differences between neighbors has a larger action and receives less probability, according to $P(\phi)\propto e^{-S_E}$. This is why nearby sites tend to fluctuate together.

The coordinate is Euclidean. It can represent imaginary time for a quantum harmonic oscillator. A periodic interval then gives finite-temperature paths; increasing the interval approaches the ground-state limit. Fixing both endpoint values instead gives a conditioned path distribution. The equal-real-time covariance of a quantum field in one spatial dimension has a different mode weight, $1/(2\omega_k)$. Our one-dimensional Euclidean calculation uses the inverse quadratic operator.

## Find the covariance before drawing samples

Expand the neighboring differences. Each interior square occurs in two bonds, giving a diagonal coefficient $2/a+am^2$. Each adjacent pair contributes an off-diagonal coefficient $-1/a$. These numbers form a matrix $A$, and the action becomes $S_E=\phi^TA\phi/2$.

The covariance matrix $C$, whose entry is $C_{ij}=\langle\phi_i\phi_j\rangle$, obeys $AC=I$. One way to see this is to integrate the derivative of $\phi_j e^{-S_E}$ with respect to $\phi_i$. The boundary term at infinite field amplitude vanishes because the positive quadratic action suppresses it. Differentiating the two factors gives $\delta_{ij}-\sum_k A_{ik}\langle\phi_k\phi_j\rangle=0$. Thus $C=A^{-1}$.

On the ring, a mode with phase change $2\pi q/N$ per site turns the neighboring-difference operator into the number $4\sin^2(\pi q/N)/a$. Summing the contribution of every mode gives

$$
G_n=\frac1N\sum_{q=0}^{N-1}\frac{\cos(2\pi qn/N)}{am^2+(4/a)\sin^2(\pi q/N)}.
$$

Here $n$ counts site intervals and $r=na$ is physical separation. This exact finite-lattice curve is available before sampling. The workbench draws fields by factoring $A$ and solving triangular equations, then compares them with this separately calculated spectral reference.

## A numerical example with three answers

Take $N=48$, $a=0.25$, $m=0.75$ and $r=1.5$, so $L=12$ and $n=6$. The exact lattice correlation is $0.216126$ in units of $\ell_0$. The continuum Green function on a ring of the same length is

$$
G_L(r)=\frac{e^{-mr}+e^{-m(L-r)}}{2m(1-e^{-mL})}.
$$

It gives $0.216715$. The second exponential describes the other way around the ring. Both values are deterministic predictions for their respective models.

The saved default record has model version gaussian-chain-1.0.0, seed $314159$ and $1024$ independent fields. Multiplying the values at the two probes in each field and averaging gives $\widehat G=0.238240$, with standard error $0.022873$. Its difference from the lattice prediction is about $0.97$ standard errors. This is an ordinary sampling fluctuation in that particular record.

The lattice-to-continuum difference is only $0.000589$. It stays the same when we change the seed. Resolving that small spacing effect calls for a much more precise sample estimate.

## Why correlated samples need wider error bars

To give the sampling process a controllable memory, update the whole field by

$$
\phi_{s+1}=\rho\phi_s+\sqrt{1-\rho^2}\,\eta_s,\qquad \eta_s\sim\mathcal N(0,C).
$$

Each $\eta_s$ is independent. The first field is also drawn from $\mathcal N(0,C)$, so the chain starts in its stationary distribution. The update index $s$ counts samples. At $\rho=0$, each update replaces the field completely.

Let $Y_s$ be the product at the two probes. Gaussian fourth moments give $\operatorname{Corr}(Y_s,Y_{s+k})=\rho^{2k}$. Expand the variance of the mean as a double sum over sample pairs. There are $M-k$ pairs at positive lag $k$, and equally many at negative lag. Dividing by $M^2$ gives

$$
\operatorname{Var}(\overline Y)=\frac vM F_M,\qquad F_M=1+2\sum_{k=1}^{M-1}(1-k/M)\rho^{2k},
$$

where $v$ is the variance of one product. The effective count is $M/F_M$. For $M=1024$ and $\rho=0.9$, $F_M=9.48249$ and the effective count is about $108$.

The ordinary sample variance $s^2$ itself has expectation $v(M-F_M)/(M-1)$ for this chain. Correcting that bias gives the workbench's estimate

$$
\widehat{\mathrm{SE}}^2=\frac{s^2(M-1)}{M-F_M}\frac{F_M}{M}.
$$

These error bars use the known sampler correlation. The displayed gold autocorrelation curve is estimated from the saved products and consequently fluctuates around its reference.

## Experiments that answer separate questions

Open [Euclidean Field Correlations](https://sandboxphysics.com/labs/vacuum-correlations/). Predict what will happen before making each change.

- To isolate sampling, keep the lattice fixed and change only the seed. The gold estimate moves; both reference curves stay put. Increase the retained count and compare the size of those movements over several seeds.
- To test spacing at fixed volume, compare $(N,a)=(24,0.5),(48,0.25),(96,0.125)$. Two inputs must change together to keep $L=12$. Keep $r=1.5$, which requires $n=3,6,12$. The lattice predictions are $0.214401$, $0.216126$ and $0.216567$, approaching the continuum value.
- To test volume on a periodic ring, hold $a$ and $m$ fixed and change only $N$. Keep the same probe separation. The contribution that wraps around the ring shrinks as the ring grows.

Export the record before changing settings. It contains every field vector, the seed and the model version, so another calculation can reconstruct the sample means.

## Practice

You quadruple the number of independent samples. What happens to the standard error, and to the spacing error?

Explanation

The standard error falls by a factor of two because it scales as $M^{-1/2}$. The lattice distribution has not changed, so its difference from the continuum distribution stays fixed.

A colleague measures the field at one site instead of a two-point product. With $\rho=0.9$, may they reuse the product's effective count?

Explanation

The field's lag correlation is $\rho^k$; the product has lag correlation $\rho^{2k}$. For a long record its variance inflation approaches $(1+\rho)/(1-\rho)=19$. The product's approaches $(1+\rho^2)/(1-\rho^2)\approx9.53$. The single-field average therefore has a smaller effective count. Sampling efficiency depends on the observable.

The correlation curve moves when you double the number of sites at fixed spacing. Design one further comparison that can tell whether the movement was caused by volume or resolution.

Explanation

The first change doubled the physical length. Compare a second pair with the same physical length but half the spacing and twice as many sites, keeping the probe's physical separation fixed. That comparison isolates resolution. Reseeding each setting several times helps reveal the statistical variation around each curve.

The Gaussian Green-function derivation follows [Tong, Statistical Field Theory, section 2.2](https://www.damtp.cam.ac.uk/user/tong/sft/two.pdf). The relation between autocorrelation and uncertainty is developed in [Wolff, Monte Carlo errors with less errors, version 4, equations 21–25](https://arxiv.org/abs/hep-lat/0306017v4).

## Try the physics

[Euclidean Field Correlations →Move two probes apart on a sampled scalar field. Compare the correlation estimated from many field configurations with the lattice prediction and its continuum limit.](https://sandboxphysics.com/labs/vacuum-correlations/)

## Sources and reading scope

1. [David Tong, Statistical Field Theory, Chapter 2](https://davidtong.org/teaching/statistical-field-theory/sfthtml/S2)

   Gaussian integrals, inverse-kernel covariance, correlation length and the Euclidean quantum-mechanical interpretation. Finite-chain normalizations are derived for this course.

2. [U. Wolff, Monte Carlo errors with less errors, arXiv:hep-lat/0306017v4](https://arxiv.org/abs/hep-lat/0306017v4)

   Autocorrelation and the variance of an average, equations 21–25. The finite-record correction for the specified Gaussian sampler is derived in the chapter and checked across independent records.

[← What a correlation function predicts](https://sandboxphysics.com/learn/field-theory/correlators-to-scattering/) [Changing resolution while keeping predictions →](https://sandboxphysics.com/learn/field-theory/keeping-low-energy-physics/)

Reading order

[1. How a chain of oscillators becomes a field](https://sandboxphysics.com/learn/field-theory/from-oscillators-to-fields/) [2. Symmetry tells us what flows](https://sandboxphysics.com/learn/field-theory/symmetry-and-causality/) [3. Quantizing the normal modes](https://sandboxphysics.com/learn/field-theory/quantizing-a-field/) [4. What a correlation function predicts](https://sandboxphysics.com/learn/field-theory/correlators-to-scattering/) [5. Putting a Euclidean field on a lattice](https://sandboxphysics.com/learn/field-theory/euclidean-lattice-and-errors/) [6. Changing resolution while keeping predictions](https://sandboxphysics.com/learn/field-theory/keeping-low-energy-physics/) [7. Testing a convincing data collapse](https://sandboxphysics.com/learn/field-theory/finite-size-scaling/) [8. Reading a Wilson–Fisher flow diagram](https://sandboxphysics.com/learn/field-theory/wilson-fisher-and-universality/)
