Explore quantum energies using variational Monte Carlo. Tune sampling, blocks, and compare analytic ground states. Download results, verify convergence, and refine trial parameters today.
| m | ω | ℏ | α | Δ | Samples | Expected trend |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0.5 | 1.0 | 20000 | Mean energy ≈ 0.5 with good tuning |
| 1 | 1 | 1 | 0.3 | 1.2 | 30000 | Energy increases; trial width is too broad |
| 1 | 2 | 1 | 1.0 | 0.8 | 25000 | Ground state rises; exact value is ℏω/2 = 1 |
This tool demonstrates Variational Monte Carlo (VMC) for a one-dimensional harmonic oscillator. It samples x from |ψT(x)|² using a Metropolis walk and averages the local energy EL(x). With m=1, ω=1, and ℏ=1, the exact ground energy is 0.5.
The Hamiltonian mixes kinetic and potential terms, so use one consistent unit system. The reference energy scale is ℏω/2. For example, with ℏ=1 and ω=2, the ground-state benchmark is 1.0, so a tuned run should move toward that value as α improves.
The trial state is Gaussian: ψT(x)=exp(-α(x-x₀)²). Larger α narrows the distribution; smaller α broadens it and can raise potential-energy excursions. For x₀=0, the analytic VMC energy is E(α)=ℏ²α/(2m)+mω²/(8α), minimized at α=mω/(2ℏ).
Each step proposes x′=x+U(-Δ,Δ). Small Δ yields slow exploration and high correlation; large Δ yields many rejections. A practical target is 30–70% acceptance. With 20,000 samples, tune Δ until the acceptance ratio is roughly stable (often near 50%).
Burn-in discards early steps before equilibrium. A useful starting choice is 10–20% of the post-burn sample count. If the block running mean drifts, increase burn-in or retune Δ. Because samples are correlated, uncertainties should rely on block statistics, not raw variance.
To estimate a realistic standard error, the run is split into blocks and the variance of block means is used. If you request N samples and B blocks, the code uses Nused=B·floor(N/B), so all blocks match. Too few blocks can understate error; too many blocks make blocks too short. A solid baseline is B=20 with N≥20,000.
Validate runs against the exact ground energy ℏω/2 and the analytic E(α) when x₀=0. If the mean energy is high, tune Δ and move α toward mω/(2ℏ). Try α sweeps like 0.3, 0.4, 0.5, 0.6 and archive each run via CSV/PDF.
VMC quality depends on the trial function, so ⟨H⟩ typically remains above the true ground state. The “sign problem” is sidestepped here because the sampling density is positive. Use this calculator to practice tuning and convergence checks. For deeper studies, increase samples (up to 200,000), keep acceptance in-range, and monitor block running means. Repeat runs with new seeds to confirm stability.
This is Variational Monte Carlo. It samples |ψT(x)|² and averages the local energy. Diffusion Monte Carlo uses imaginary-time projection and different estimators.
VMC is variational: the computed ⟨H⟩ with a trial state cannot go below the true ground energy. Improving α and reducing correlation typically brings the estimate closer from above.
Try 30–70%. If acceptance is very high, Δ may be too small and samples correlate strongly. If acceptance is very low, Δ is too large and the chain barely moves.
A practical starting point is 20,000 samples with 20 blocks and about 3,000 burn-in steps. If the block running mean drifts, increase samples or retune Δ.
For clean blocking, it uses Nused=B·floor(N/B) so blocks have equal size. The small remainder is discarded to keep block statistics consistent.
x₀ shifts the Gaussian center used for sampling. Nonzero x₀ can bias ⟨x⟩ away from zero and is useful for testing symmetry, but the oscillator potential still depends on x.
For x₀=0, the analytic minimum occurs at α=mω/(2ℏ). Use that as a target, then verify with Monte Carlo runs and confirm convergence using block means and the standard error.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.