Quantum Monte Carlo Calculator
Estimate many-body quantum ground-state energy with variational Monte Carlo and an exact harmonic-interaction benchmark. Free, reproducible, in-browser.
Quantum Monte Carlo Many-Body Solver
A clear path from inputs to results.
Estimate the ground-state energy of a system of interacting quantum particles using variational Monte Carlo, the workhorse method of many-body quantum physics and quantum chemistry. The tool samples a trial wavefunction with the Metropolis algorithm and compares the Monte Carlo estimate against an exact analytic benchmark for the harmonically trapped, harmonically interacting model so you can see the method converge.
How to use
- Set the number of particles N and the spatial dimension d of the system.
- Enter the trap frequency ω and the interaction strength g for the harmonic-interaction (Moshinsky) model.
- Set the trial-wavefunction variational parameters α (single-particle width) and β (pair-correlation strength).
- Choose the Monte Carlo controls: number of samples, burn-in (equilibration) steps, and the random seed for reproducibility.
- Compare the sampled variational energy against the exact benchmark energy, and read the optimal parameters, the RMS cloud radius, and the mean pair separation.
The formula
Reference: Harmonic-interaction (Moshinsky) model exact solution; variational Monte Carlo and the Metropolis algorithm — Metropolis et al., J. Chem. Phys. 21 (1953); Needs et al., J. Phys.: Condens. Matter 22 (2010).
Worked example
Six particles in 3D, exact benchmark
- N = 6 particles; dimension d = 3; trap frequency ω = 1.0; interaction strength g = 0.35 (harmonic-interaction model with H = −½Σ∇² + ½ω²Σ|rᵢ|² + ½g Σ|rᵢ−rⱼ|²).
- 1
The model separates into one center-of-mass mode at frequency ω and N−1 relative modes at the dressed frequency ω_rel = √(ω² + gN) = √(1 + 0.35×6) = √3.1 = 1.760682. Each mode contributes a zero-point energy of (d/2)×frequency, so the exact ground-state energy is E0 = (d/2)[ω + (N−1)ω_rel] = 1.5 × [1 + 5 × 1.760682] = 1.5 × 9.803408 = 14.705113. The optimal trial parameters that reproduce this are α* = ω/2 = 0.5 and β* = (ω_rel − ω)/(2N) = (0.760682)/12 = 0.063390. The cloud size follows as an RMS radius of 0.979772 and a mean pair separation of √(d/ω_rel) = 1.305330.
Exact ground-state energy E0 = 14.70511 (in units of ħω). A converged variational Monte Carlo run with the optimal parameters α = 0.5, β = 0.06339 reproduces this to within its statistical error bar; the RMS cloud radius is 0.97977 and the mean pair separation is 1.30533.
Interpreting the result
The variational principle guarantees that any trial wavefunction gives an energy at or above the true ground state, so a lower Monte Carlo energy always means a better trial state. The benchmark is the exact answer for this solvable model, so the gap between your sampled energy and the benchmark measures how good your α and β are. The Monte Carlo result also carries a statistical error that shrinks as roughly 1/√(samples); a well-converged run should bracket the benchmark within one or two error bars. The RMS radius describes how large the particle cloud is in the trap, and the pair separation describes how far apart interactions push the particles.
Assumptions & limitations
- The physical model is the harmonic-interaction (Moshinsky) model: particles in a harmonic trap interacting through a harmonic two-body potential, which is exactly solvable and used here as the ground-truth benchmark.
- The trial wavefunction is a Gaussian single-particle factor times a Gaussian Jastrow pair-correlation factor, parameterized by α and β.
- Sampling uses the Metropolis algorithm with a fixed, seeded pseudo-random generator, so a given seed and sample count reproduce the same estimate exactly.
- The reported statistical uncertainty assumes the samples are effectively independent after burn-in; strong autocorrelation would understate the true error.
- Energies are expressed in natural oscillator units (ħ = m = 1), and the method targets the ground state only, not excited states or finite-temperature properties.
Frequently asked questions
What is variational Monte Carlo?
It is a method for estimating the ground-state energy of a quantum system by averaging the local energy of a trial wavefunction over configurations sampled from that wavefunction's probability distribution. Because of the variational principle, the result is always an upper bound on the true ground-state energy, so improving the trial wavefunction can only lower — never falsely undershoot — the estimate.
What do the parameters α and β do?
α sets the width of each particle's single-particle Gaussian — how tightly each is bound in the trap. β sets the strength of the pair-correlation (Jastrow) factor that keeps interacting particles at the right average distance. For this model the optimal values are α = ω/2 and β = (√(ω²+gN) − ω)/(2N); plugging those in makes the trial wavefunction exact, so the Monte Carlo energy converges to the benchmark.
How many samples do I need for a reliable answer?
Enough that the statistical error bar is smaller than the precision you care about. Because the error falls as roughly 1/√(samples), cutting it in half requires four times as many samples. Always discard a burn-in period first so the sampler reaches the stationary distribution before you start averaging; the default burn-in handles this for the preset configuration.
Why is there an exact benchmark to compare against?
The harmonic-interaction model used here is one of the few interacting many-body systems with a closed-form solution. It separates into independent normal modes — one center-of-mass mode and N−1 relative modes — so its ground-state energy is known exactly as E0 = (d/2)[ω + (N−1)√(ω²+gN)]. That makes it the ideal test bed for checking that the Monte Carlo sampling and the trial wavefunction are implemented correctly.
Why does the Monte Carlo result change when I change the seed?
The estimate is a statistical average over randomly sampled configurations, so different random seeds produce slightly different numbers scattered around the true value, each within its statistical error bar. The seed is fixed and exposed so results are reproducible: the same seed, sample count, and parameters always give the identical estimate. Increasing the sample count shrinks the scatter as about 1/√(samples).
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.