research28 min studyLesson 563 in Physics

Variational Monte Carlo estimators

Sample a trial wavefunction and separate variational bias, local-energy fluctuations, and autocorrelated statistical error.

On this page

What you’ll understand

  • Derive the local-energy estimator from a normalized sampling probability.
  • Apply Metropolis–Hastings balance with the correct proposal ratio.
  • Estimate an autocorrelation-adjusted error without confusing it with variational bias.

Variational Monte Carlo evaluates the energy and other expectations of a chosen many-body trial state by sampling configurations. It avoids summing every basis amplitude, but it does not automatically improve the trial state or remove its physical bias. Three questions must remain distinct: how expressive the variational family is, whether the sampler explores its intended distribution, and how accurately a finite correlated record estimates an expectation. A small reported error bar addresses only part of the last question.

Rewrite the expectation as an average

Let ψ(s)\psi(s) be a trial amplitude in an orthonormal configuration basis. Sampling configurations with probability proportional to its squared magnitude converts the Rayleigh quotient into an average of the local energy. That local quantity includes ratios of connected amplitudes under H and need not lie between the smallest and largest eigenvalues for every individual configuration. Its average, rather than each sample, is the variational energy. For complex amplitudes, a finite local-energy sample may be complex even though the exact Hermitian expectation is real.

The energy expectation is an upper bound to the true ground energy of the specified Hamiltonian for any normalized trial state. Sampling uncertainty can move a numerical estimate below that bound without violating the variational theorem. Optimizing parameters lowers an expectation only within the chosen family and may find a local optimum. An exact eigenstate has constant local energy wherever its amplitude is nonzero. Apparent zero sample variance is not proof of exactness if the chain missed support or unexamined zero-amplitude configurations have nonzero residual.

p(s)=∣ψ(s)∣2∑s′∣ψ(s′)∣2,Eloc(s)=∑s′Hss′ψ(s′)ψ(s),E=∑sp(s)Eloc(s)p(s)=\frac{|\psi(s)|^2}{\sum_{s'}|\psi(s')|^2},\qquad E_{\mathrm{loc}}(s)=\frac{\sum_{s'}H_{ss'}\psi(s')}{\psi(s)},\qquad E=\sum_sp(s)E_{\mathrm{loc}}(s)
p is dimensionless and E_loc and E have energy units. Local energy is evaluated only where psi(s) is nonzero; sums and estimator moments must exist for statistical claims.↔ Scroll wide equations horizontally.

Balance is a constraint on the whole update

For a proposed move from s to a new configuration, Metropolis–Hastings includes both the target probability ratio and the reverse-to-forward proposal ratio. The proposal factors cancel only for a symmetric proposal. Detailed balance provides a sufficient stationary-distribution condition, while irreducibility and suitable aperiodicity are needed to reach the intended distribution from a generic start. A chain preserving a particle-number sector cannot discover another sector, which is correct only when that restriction matches the variational problem.

Warmup removes sensitivity to an initial distribution only after actual mixing. High acceptance alone does not guarantee exploration: tiny moves can be almost always accepted and still traverse configuration space slowly. Independent initializations, symmetry-related starting states, and monitored slow observables provide useful diagnostics. Saving only every several steps does not remove the need to assess remaining correlations; it usually discards information that blocking analysis could have used. Sampling a fixed trial state also differs from adapting its parameters, which changes the target distribution.

a(s→s′)=min⁡[1,∣ψ(s′)∣2q(s′→s)∣ψ(s)∣2q(s→s′)]a(s\to s')=\min\left[1,\frac{|\psi(s')|^2q(s'\to s)}{|\psi(s)|^2q(s\to s')}\right]
q is a normalized proposal probability and a is the dimensionless acceptance probability. The ratio assumes forward and reverse proposals are defined on the required support.↔ Scroll wide equations horizontally.

Use the observable’s correlation time

For a stationary record of a real energy estimator, the variance of a sample mean depends on autocorrelation of the measured observable. For complex trial states, use the real part of the local energy for the real standard error below. Define integrated autocorrelation time as one half plus the sum of normalized positive-lag correlations. Then the effective sample count is approximately the saved count divided by twice that time. This convention makes independent samples have integrated time one half. Some literature uses a convention larger by two, so stating the definition prevents an incorrect error estimate.

Blocking groups consecutive samples and studies when the estimated error stabilizes as blocks exceed the correlation scale. Long tails or rare transitions can demand far more data than energy fluctuations initially suggest. These error estimates concern the expectation under the fixed trial probability, not finite-size bias, ansatz bias, or incomplete optimization. The exact-binomial lab gives an independent-sample reference distribution; its narrow bars do not establish that configurations in a real Markov chain are independent.

τint=12+∑k≥1ρ(k),Neff≃N2τint,SE⁡(Eˉ)≃Var⁡(Eloc)Neff\tau_{\mathrm{int}}=\frac12+\sum_{k\geq1}\rho(k),\qquad N_{\mathrm{eff}}\simeq\frac N{2\tau_{\mathrm{int}}},\qquad \operatorname{SE}(\bar E)\simeq\sqrt{\frac{\operatorname{Var}(E_{\mathrm{loc}})}{N_{\mathrm{eff}}}}
Correlation lag is counted in saved-sample units; N_eff is dimensionless and SE has energy units. The approximation requires stationarity, finite variance, a convergent correlation sum, and a record long compared with the relevant mixing time.↔ Scroll wide equations horizontally.

A trial state with two configurations

Take H=E∗(0−1−10)H=E_*\begin{pmatrix}0&-1\\-1&0\end{pmatrix} and unnormalized real amplitudes (1,2)(1,2), where E∗>0E_*>0. Find the sampling probabilities, local energies, and variational mean.

  1. The squared norm is five, so the configurations have probabilities 1/51/5 and 4/54/5. Overall normalization cancels in local-energy ratios, but must be included in sampling probabilities.

  2. The Hamiltonian action is E∗(−2,−1)E_*(-2,-1). Dividing by amplitudes gives local energies −2E∗-2E_* and −E∗/2-E_*/2. A local value below the exact ground energy is permissible.

  3. Average with the probabilities: E=(1/5)(−2)+(4/5)(−1/2)=−0.8E=(1/5)(-2)+(4/5)(-1/2)=-0.8 in units of E∗E_*. The exact ground energy is −E∗-E_*, so the average satisfies the variational upper bound.

The result

The mean energy is −0.8E_* although one local-energy value is −2E_*; the variational bound applies to the mean.

Explore the model

Interactive lab

Interactive lab · sampling

An independent-sample reference

Reset and set success probability p=0.25p=0.25 and sample size n=25n=25; predict sample-mean variance 0.0075. Repeat from Reset with both controls p=0.25p=0.25, n=100n=100; predict 0.001875, one quarter as large. The bars are exact binomial masses, not resampled Monte Carlo trajectories, and have no autocorrelation.

An independent-sample referenceExact binomial masses for the mean of n independent Bernoulli trials, compared with normal mass between adjacent half-count boundaries; normal tails outside the finite support remain outside the bars. Playback highlights outcomes, not random samples. The Berry–Esseen bound applies to standardized CDFs, not individual bars or continuity-corrected errors. At p = 0 or 1, normal comparison and that bound are disabled. Normal-CDF evaluation uses a numerical approximation with absolute error below 7.5×10⁻⁸ (at most 1.5×10⁻⁷ per interval, before rounding). Current readings: Mean sample proportion: 0.5; Sample-mean variance: 0.0125; Uniform CDF error bound: ≤ 0.1062. All parameters are adjustable with the labeled controls below.Exact distribution of the mean of 20 independent Bernoulli variables with success probability 0.5; playback highlights outcome 0.00.250.50.75100.0580.1150.1730.23Sample mean · k / nProbability massNormal bin masses are an approximationk = 0 · exact probability = 9.54e-7
Exact binomial massNormal interval massHighlighted outcome / mean
Mean sample proportion
0.5
Sample-mean variance
0.0125
Uniform CDF error bound
≤ 0.1062
t = 0 s

Exact binomial masses for the mean of n independent Bernoulli trials, compared with normal mass between adjacent half-count boundaries; normal tails outside the finite support remain outside the bars. Playback highlights outcomes, not random samples. The Berry–Esseen bound applies to standardized CDFs, not individual bars or continuity-corrected errors. At p = 0 or 1, normal comparison and that bound are disabled. Normal-CDF evaluation uses a numerical approximation with absolute error below 7.5×10⁻⁸ (at most 1.5×10⁻⁷ per interval, before rounding). Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA fourfold independent sample count halves standard error; a correlated physical sampler needs an effective count first.

Check your understanding

What changes in a Metropolis–Hastings acceptance ratio when the proposal is asymmetric?

Try it yourself

A real local-energy estimator takes values −2E∗-2E_* and zero with probabilities one quarter and three quarters. A stationary record has N=100N=100 and τint=2\tau_{\mathrm{int}}=2 under this lesson’s convention. Find its mean, variance, effective count, and approximate standard error.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute the second moment before subtracting the squared mean; include the factor two multiplying integrated correlation time.

Compare with the solution

The mean is −0.5E∗-0.5E_* and the second moment is E∗2E_*^2, so the variance is 0.75E∗20.75E_*^2. The effective count is 100/(2×2)=25100/(2\times2)=25, giving approximate standard error 0.75/25E∗≃0.173E∗\sqrt{0.75/25}E_*\simeq0.173E_*. Ignoring correlations would instead give 0.0866E∗0.0866E_*. This calculation presumes the quoted correlation time is reliable for a sufficiently long stationary record.

Take it with you

  • Local-energy fluctuations concern a sampling estimator; the variational bound constrains its exact mean.
  • Detailed balance must include proposal asymmetry and does not replace mixing diagnostics.
  • Statistical uncertainty, optimization error, and ansatz bias require separate controls.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.