TL;DR
Variational Monte Carlo, or VMC, estimates the lowest energy of a molecule by combining two ideas. The first is the Variational Principle: any guessed quantum state has an energy at or above the true ground-state energy, so a better guess gives a lower estimate. The second is Monte Carlo averaging: the energy of a guess is computed as an average over random electron configurations rather than as an exact integral.
The method is practical because the integral over all electron positions is far too large to compute directly, while averaging a few thousand random samples is cheap. The cost is that the answer is only as good as the guessed wave function.
Builds on: Variational Principle, Monte Carlo Method, Molecular Hamiltonian · Leads to: diffusion Monte Carlo and other sampling methods for larger systems
Where it's used
Small molecules and atoms. VMC was applied early to atoms and small molecules, where the number of electrons is too large for an exact solution but small enough that a carefully built trial function gives a usable energy estimate. Quantum chemists use it as a benchmark for cheaper methods.
Liquid and solid helium. In 1965 William McMillan used VMC to estimate the ground state of liquid helium-4. He wrote a trial wave function that described how helium atoms avoid each other and sampled it with random moves. The density it predicted was close to the measured value, which showed that a simple trial function plus sampling captures real many-body physics.
Electronic structure of solids. VMC is used to compute energies of crystals and two-dimensional materials, where the same sampling scheme handles many electrons per unit cell. It is often combined with a second stage called diffusion Monte Carlo, which refines the energy beyond what the trial function allows.
Benchmarks for machine-learned wave functions. Neural-network wave functions for electrons are trained by minimising the VMC energy, and VMC energies are the reference against which those networks are judged.
How it works
Take the simplest real case: one electron around one proton, the hydrogen atom. Use the trial wave function , where is the distance from the proton and is a number we can tune. Trace how the method finds the energy.
flowchart LR A[Choose alpha] --> B[Sample positions from the square of psi] B --> C[Compute the local energy at each sample] C --> D[Average the local energies] D --> E[Lowest energy so far?] E -->|no, try another alpha| A E -->|yes, keep it| F[Best estimate]
- Pick a guess. Start with . The Wave Function is , which is large near the proton and falls off with distance. Check: at , , and at , .
- Turn the wave function into probabilities. The probability of finding the electron at a point is proportional to . So the electron is most likely close to the proton, and the chance falls off quickly. Check: at the weight is , compared with 1 at the proton.
- Sample positions. Draw many random electron positions from that probability. A simple way is a random walk that accepts or rejects each move, which is the Metropolis rule and produces a Markov chain of samples. Check: after many moves, the fraction of samples inside radius 1 should be close to the exact value for this guess.
- Compute a local energy at each sample. At each position, apply the Hamiltonian to the wave function and divide by the wave function. This gives a number, the local energy, whose average over the samples is the energy of the guess. Check: the average of the local energies is the same as the full energy integral, but it needs only a sum over samples.
- Average over the samples. Add the local energies and divide by the number of samples. The result is the estimated energy for , with a statistical error that shrinks as the number of samples grows. Check: 100 times more samples cuts the error by a factor of 10.
- Tune and stop. Change , repeat steps 3 to 5, and keep the value that gives the lowest energy. For the hydrogen guess the lowest energy occurs at , with energy hartree, the exact ground-state energy. Check: the energy never falls below , as the variational principle requires.
For a molecule the trial function is larger. It is usually a sum of Slater determinants multiplied by a Jastrow factor, a function of the distances between electrons that lets the wave function take the right form when two electrons come close. Steps 2 to 6 stay the same.
The math
Step 2 in symbols
Let be the trial wave function, where is the list of all electron positions and is the set of tunable parameters. The sampling density is
The denominator makes add up to 1. Only ratios of values appear in the Metropolis step, so the denominator never has to be computed.
Step 4 in symbols
Define the local energy as
The variational energy is the average of under :
This is the same energy as the usual expectation , rewritten as an average over the sampling density. The operator is the Molecular Hamiltonian for the fixed nuclei, the nuclei being held still as in the Born–Oppenheimer Approximation.
Step 5 in symbols
With samples drawn from , the estimate and its standard error are
The standard error goes down as , the rule from Monte Carlo Method.
Step 6 in symbols
The best guess minimises the estimate over the parameters:
A useful fact: if is exactly an eigenstate, is the same number at every sample, so its variance is zero. Measuring the variance of is therefore a second check on the guess.
- E(α) = α²/2 − α
The hydrogen energy in closed form
For the Laplacian is . Since , the local energy is
Averaging over the density gives , so , which is the curve in the plot.
Worked examples
- Use the formula .
- Try : .
- Try : .
- Try : .
- Compare the three values: , , . The middle one is lowest.
- Check: the lowest value is the exact ground-state energy, so no can go lower.
Interpretation: the energy is a parabola in , and the minimum is where the guess matches the true shape of the wave function.
Suppose five random samples of the local energy give the values , , , and hartree.
- Add them: .
- Divide by 5: hartree.
- Find the deviations from : , , , , .
- Square them: , , , , . Their sum is .
- Divide by : , so .
- Standard error: .
- Check: the answer is hartree.
Interpretation: five samples give a rough estimate. Reducing the error by a factor of 10 would need about 100 times as many samples.
For the helium atom, with two electrons and nuclear charge , use the trial function , where is an effective charge to be tuned. Its variational energy is hartree. The exact ground-state energy is about hartree.
- Find the minimum by setting the derivative to zero: .
- Solve: .
- Substitute: .
- Compute and .
- Subtract: , so hartree.
- Check: is above the exact , as the variational principle requires.
Try it: evaluate the same energy at . Answer: hartree, which is higher than , so is a worse guess.
Common mistakes and tradeoffs
It is tempting to think that Monte Carlo makes the answer random, so the result cannot be trusted. In fact the sampling only estimates the energy of a fixed guess. The error bar tells you how precise that estimate is, and the variational principle guarantees that the true ground-state energy is never above the lowest estimate you can find.
It is tempting to think a bigger sample always gives a better energy. In fact more samples only reduce the statistical error. A poor trial function gives a high energy no matter how many samples are drawn. Improving the energy requires a better form for the wave function.
It is tempting to think the Jastrow factor is an optional refinement. In fact it is needed for accurate results. Without the dependence on electron-electron distance, the trial function cannot describe how electrons avoid each other at close range, and the energy is too high.
Use VMC when you want a variational energy with a clear error bar, when the trial function is designed for the problem, or when you need a benchmark. Do not use it when you need the exact energy with no dependence on the guess; more accurate methods refine VMC's output. Alternatives include Hartree–Fock, which is cheaper but misses electron correlation, and density functional theory, which is widely used for solids, and coupled-cluster and configuration-interaction methods, which are more accurate but scale poorly with system size.
History
The variational principle for quantum energies was known from the early 20th century, and Walter Ritz's method used it with simple trial functions. Monte Carlo sampling was developed in the 1940s for problems that were too hard to integrate directly. The Metropolis algorithm, published in 1953 by Metropolis and co-workers, made sampling of a probability density practical for physical systems, and it is the basis of most sampling used in VMC.
The first serious quantum application came in 1965, when William McMillan applied a Monte Carlo average over a trial wave function to liquid helium-4. The method was then extended to atoms, molecules and solids. Its appeal was that the same code could handle many electrons, while the accuracy depended on the trial function, which could be improved step by step.
Recap
- The variational principle says any guessed state gives an energy at or above the ground state, so tuning a guess lowers the estimate.
- Monte Carlo sampling from the square of the trial wave function computes the energy as an average of local energies.
- The standard error shrinks as one over the square root of the number of samples.
- The quality of the answer is limited by the trial function, which is why Jastrow and determinant forms matter.
- Read next: Markov Chain Monte Carlo for how the samples are drawn, and Slater Determinant for the building blocks of molecular trial functions. The Schrödinger Equation is the equation whose ground state VMC approximates.