6. Ising updates and correlated error bars
Position in the course: Lesson 6 of 10. Complete the preceding derivation and use the explained exercises to check understanding.
Prerequisites: Metropolis–Hastings; covariance
Learning goal: explain the mathematical steps, reproduce the analytical examples, and state the conditions under which the conclusions hold.
1. Derive the local Ising move
For \(s_i=\pm1\), energy \(E=-J\sum_{\langle ij\rangle}s_is_j-b\sum_i s_i\) counts each bond once. Flipping \(s_i\) changes only its neighbor bonds and field term. The old contribution is \(-s_i(J\sum_js_j+b)\); the new one is its negative, hence \(\Delta E=2s_i(J\sum_js_j+b)\). Uniform site selection is symmetric. One sweep is \(N\) attempts, including rejected moves.
At zero field on a square lattice with four aligned neighbors, \(\Delta E=8J\). For \(\beta J=1/2\), acceptance is \(e^{-4}\approx0.0183\). This analytical probability illustrates why a local update can be slow at low temperature. Count neighbor bonds carefully under periodic boundaries; tiny lattices can have special duplicate-neighbor conventions.
2. Expand the covariance sum
For stationary \(A_s\) with variance \(\sigma_A^2\), define \(\rho_k=\operatorname{Cov}(A_s,A_{s+k})/\sigma_A^2\). The variance of the average is \(M^{-2}\sum_{ij}\operatorname{Cov}(A_i,A_j)\). There are \(M\) diagonal terms and \(2(M-k)\) ordered pairs at lag \(k\), giving
When correlations are summable and the chain is much longer than their decay, define \(g=1+2\sum_{k\ge1}\rho_k\) and \(M_{\mathrm{eff}}=M/g\). Here \(\tau_{\mathrm{int}}=g/2\); some authors use \(g\) itself as the autocorrelation time, so state the convention. Negative correlations can produce \(g<1\). Different observables have different \(g\).
3. Worked correlation calculation
For the analytic model \(\rho_k=0.8^k\), the geometric series gives \(g=1+2(0.8/0.2)=9\). A stationary 9000-step sequence has approximately 1000 independent equivalents and an error three times the independent-sample formula. No measured time series is implied. Finite records cannot reliably estimate arbitrarily long lag sums: at long lags covariance estimates are noisy. Truncate with a defensible window and compare to block estimates.
4. Blocking and nonlinear quantities
Divide the production sequence into contiguous blocks of length \(L\), form block means, and estimate their variance. As \(L\) exceeds the relevant correlation scale, the standard error should stabilize while enough blocks remain for estimation. A plateau is useful evidence but cannot reveal an unvisited phase. For susceptibility or heat capacity, jackknife whole blocks through the complete nonlinear expression so covariances remain intact. Do not bootstrap individual correlated configurations as if they were independent.
At zero field a finite equilibrated Ising system has \(\langle m\rangle=0\) by spin-inversion symmetry. \(\langle|m|\rangle\) is a different quantity. A trapped finite run may have nonzero \(\bar m\) without breaking finite-system equilibrium symmetry.
Report both block length and surviving block count. Longer blocks reduce between-block correlation but leave fewer degrees of freedom to estimate uncertainty. With very few blocks an apparent plateau may be accidental. Compare a sensible range and independent runs. Long-tailed observables may still violate finite-variance assumptions even when their block means look stable. The purpose is to check assumptions, not to obtain an attractive error bar.
5. Exercises and answers
Exercise: For \(\rho_k=0.5^k\), how many independent equivalents do 3000 steps provide?
Solution
\(g=1+2(0.5/0.5)=3\), so approximately 1000, assuming stationarity and a chain much longer than the decay time.
Exercise: Why does thinning not cure trapping?
Solution
Discarding intervening configurations cannot create barrier crossings. It may reduce storage or expensive measurement costs, but often wastes statistical information when measurements are cheap.
Original teaching schematic of the mathematics or algorithm; it is not simulation or experimental data.
6. Sources and connections
Related theory: Molecular dynamics · Quantum Monte Carlo
Software connection: CP2K · Quantum ESPRESSO
These software courses provide related background on energies, orbitals, or convergence management; they do not imply that the Monte Carlo or QMC examples on this page were executed there.
7. Related theory and practice
Molecular dynamics · Quantum Monte Carlo · RASPA3