Variational Monte Carlo estimators
Sample a trial wavefunction and separate variational bias, local-energy fluctuations, and autocorrelated statistical error.
On this page
The question for today
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 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.
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.
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.
Work it through
A trial state with two configurations
Take and unnormalized real amplitudes , where . Find the sampling probabilities, local energies, and variational mean.
The squared norm is five, so the configurations have probabilities and . Overall normalization cancels in local-energy ratios, but must be included in sampling probabilities.
The Hamiltonian action is . Dividing by amplitudes gives local energies and . A local value below the exact ground energy is permissible.
Average with the probabilities: in units of . The exact ground energy is , so the average satisfies the variational upper bound.
The mean energy is −0.8E_* although one local-energy value is −2E_*; the variational bound applies to the mean.
The living notebook
Explore the model
Interactive lab · sampling
An independent-sample reference
Reset and set success probability and sample size ; predict sample-mean variance 0.0075. Repeat from Reset with both controls , ; predict 0.001875, one quarter as large. The bars are exact binomial masses, not resampled Monte Carlo trajectories, and have no autocorrelation.
- Mean sample proportion
- 0.5
- Sample-mean variance
- 0.0125
- Uniform CDF error bound
- ≤ 0.1062
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.
Pause & reason
Check your understanding
Your turn
Try it yourself
A real local-energy estimator takes values and zero with probabilities one quarter and three quarters. A stationary record has and 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 and the second moment is , so the variance is . The effective count is , giving approximate standard error . Ignoring correlations would instead give . This calculation presumes the quoted correlation time is reliable for a sufficiently long stationary record.
Keep the idea
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.