| # | x | K(x) | V(x) | EL(x) |
|---|---|---|---|---|
| 1 | 0.217000 | 0.476455 | 0.023545 | 0.500000 |
| 2 | -0.841000 | 0.146159 | 0.353841 | 0.500000 |
| 3 | 0.524000 | 0.362712 | 0.137288 | 0.500000 |
| 4 | 1.176000 | -0.191888 | 0.691888 | 0.500000 |
| 5 | -0.099000 | 0.495100 | 0.004900 | 0.500000 |
This calculator estimates the variational energy
where the local energy is
Sampling uses a Metropolis random walk with acceptance probability
- Pick a trial wavefunction. Start with the Gaussian option for stable behavior.
- Select a potential and set its parameters. Use harmonic (ω=1) as a baseline check.
- Choose samples and burn-in. Use at least 10,000 samples for reliable errors.
- Tune the step size so acceptance stays around 0.3–0.7.
- Increase the block size until the reported stderr stabilizes.
- Run the solver, inspect the sample trace, then export CSV or PDF for reporting.
1) Variational Monte Carlo for bound states
Variational Monte Carlo estimates the expectation value of the Hamiltonian by sampling configurations from |Ψ(x)|². In one dimension, this gives a fast way to approximate ground-state energies for wells that resist closed-form solutions, while keeping the physics transparent and tunable.
2) Trial state design and parameter meaning
The trial family controls both accuracy and statistical noise. The width parameter α sets the typical scale of x, μ shifts the probability mass for displaced minima, and β adds flexibility through a polynomial prefactor. Better flexibility can lower variance but may require careful tuning.
3) Metropolis sampling and equilibrium checks
Sampling uses symmetric proposals x′ = x + Δ·u with u in (−1,1), accepted with A = min(1, |Ψ(x′)|²/|Ψ(x)|²). Discard burn-in to remove dependence on the starting point. A quick equilibrium check is a stable running mean of EL(x).
4) Local energy as the core observable
The estimator is the local energy EL(x) = −½·Ψ″/Ψ + V(x). When Ψ matches an eigenstate, EL(x) becomes nearly constant and the variance collapses. For the harmonic oscillator with α=ω, the calculator reproduces E≈0.5 with minimal scatter.
5) Blocking: practical uncertainty for correlated walks
Metropolis samples are correlated, so naive standard deviations understate uncertainty. Block averaging groups consecutive samples into blocks and uses the variance of block means to estimate the standard error. If stderr changes strongly when you increase block size, autocorrelation is still significant.
6) Step size targets and acceptance data
The proposal step Δ controls acceptance and exploration. Very small Δ yields high acceptance but slow diffusion; very large Δ yields many rejections. A practical target is acceptance between 0.3 and 0.7. Use the reported acceptance ratio as a tuning signal before optimizing α, β, or μ.
7) Interpreting potential parameters
The harmonic and anharmonic forms are useful baselines: ω sets the curvature near the minimum, while λ>0 stiffens the tails through x⁴. The double-well parameters a and b control barrier height and minima positions. The custom polynomial option supports exploratory modeling without rewriting code.
8) Reproducibility, exports, and reporting
Fix the random seed to reproduce traces and compare parameter sweeps. Use 10,000–50,000 samples for stable energy estimates in typical wells, and increase burn-in for multi-well landscapes. CSV exports enable plotting and diagnostics, while the PDF report captures the run configuration for lab notes.
1) What does the energy estimate represent?
It is the variational expectation value ⟨H⟩ for the chosen trial state. By the variational principle, it is an upper bound on the true ground-state energy for the same Hamiltonian.
2) Why is burn-in necessary?
Early samples reflect the starting position rather than the equilibrium distribution |Ψ|². Discarding burn-in reduces bias and improves the reliability of block-based uncertainty estimates.
3) What acceptance ratio should I aim for?
A common practical range is 0.3–0.7. Outside that range, the walk either moves too slowly or rejects too often, increasing autocorrelation and reducing effective sample size.
4) Why can variance stay large even with many samples?
Large variance often indicates the trial state is far from an eigenstate. Improve the trial flexibility, adjust α and μ, consider β for anharmonic wells, and retune step size to sample efficiently.
5) How do I choose block size?
Increase block size until the reported stderr stabilizes. If stderr keeps rising with larger blocks, the chain remains strongly correlated and you should tune step size or increase total samples.
6) Why does the harmonic example show constant local energy?
For ω=1 and α=1, the Gaussian trial matches the exact ground state. In that special case, EL(x) equals 1/2 for all x, producing nearly zero variance apart from numerical rounding.
7) What should I export to include in a report?
Use the PDF for a compact summary of parameters and results. Use the CSV when you need plots, acceptance diagnostics, or to compare multiple runs across different α, β, or potential settings.