Numerical simulations of instantons in the quantum mechanical double well potential using Euclidean lattice Monte Carlo. The implementation follows:
T. Schäfer - Instantons and Monte Carlo Methods in Quantum Mechanics
This project studies tunneling and instanton physics using several complementary numerical approaches:
- Euclidean Monte Carlo path integral sampling
- Cooling to extract instanton content
- Instanton liquid models (RILM / IILM)
- Adiabatic switching for non-Gaussian corrections
- Correlation functions and energy gap extraction
The code aims to reproduce the figures and numerical experiments presented in Schäfer’s lecture notes.
We consider the double well Hamiltonian
After rescaling (2m = 1), the discretized Euclidean action becomes
with periodic boundary conditions. The classical instanton solution is
and the classical instanton action
The project contains four conceptual layers.
Direct diagonalization of the Hamiltonian.
Metropolis sampling of Euclidean paths.
Cooling and instanton density measurements.
Analytical multi-instanton configurations (RILM, IILM, streamline).
.
├── CMakeLists.txt
├── LICENSE
├── README.md
├── bin/ # compiled executables
├── build/ # CMake build directory
├── data/ # generated CSV data
├── figures/ # generated plots
├── plots/ # python plotting scripts
├── docs/ # documentation (Doxygen)
├── tests/ # unit tests
├── src
│ ├── analysis
│ │ ├── analysis_driver.*
│ │ ├── cooling_evolution.*
│ │ ├── ensemble.*
│ │ ├── fig10_rilm.*
│ │ ├── fig11_gauss.*
│ │ ├── fig12_13_heating.*
│ │ ├── fig14_16.*
│ │ ├── fig15.*
│ │ ├── fig17_iilm.*
│ │ ├── fig7.*
│ │ ├── fig8.*
│ │ ├── fig9.*
│ │ ├── qmidens.*
│ │ └── qmidens.*
│ ├── core
│ │ ├── instanton.*
│ │ ├── lattice.*
│ │ ├── metropolis.*
│ │ ├── observables.*
│ │ ├── potential.*
│ │ └── potential.*
│ ├── main.*
│ ├── models
│ │ ├── fig14_ia_interaction.*
│ │ ├── heating.*
│ │ ├── iilm.*
│ │ ├── rilm.*
│ │ └── rilm.*
│ └── utils
│ ├── io.*
│ ├── parameters.*
│ ├── periodic.*
│ ├── statistics.*
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debugcmake --build build -jGenerated executables:
bin/montecarlo
bin/test_*
The main executable runs different numerical experiments.
./bin/montecarlo <command> [options]Optional arguments
--seed <int>
--etas a,b,c
Example
./bin/montecarlo eta-scan --etas 1.0,1.2,1.4,1.6| Command | Description |
|---|---|
basic |
typical Euclidean path + cooled path |
ensemble |
correlators and probability distributions |
cooling-evolution |
instanton density vs cooling |
fig7 |
averaged cooling analysis |
fig8 |
instanton density vs η |
fig9 |
switching paths |
fig11 |
Gaussian effective potential |
rilm |
random instanton liquid model |
heated-rilm |
heated RILM |
iilm |
interacting instanton liquid |
fig14 |
IA interaction and streamline |
fig15 |
streamline paths |
fig16 |
IA separation histogram |
fig17 |
instanton positions |
qmidens |
non-Gaussian corrections |
eta-scan |
scan in η |
Typical workflow
./bin/montecarlo <command>
python3 plots/plot_figX.pyExample
./bin/montecarlo fig7
python3 plots/plot_fig7.py| Schäfer figure | Method |
|---|---|
| Fig.1 | Schrödinger spectral calculation |
| Fig.2 | Monte Carlo path |
| Fig.3 | probability distribution |
| Fig.4 | correlators |
| Fig.5 | adiabatic switching |
| Fig.6 | cooled correlators |
| Fig.7 | cooling evolution |
| Fig.8 | instanton density vs η |
| Fig.9 | switching paths |
| Fig.10 | RILM correlators |
| Fig.11 | Gaussian effective potential |
| Fig.12 | RILM vs heated RILM |
| Fig.13 | heated RILM correlators |
| Fig.14–16 | IA interaction and streamline |
| Fig.17 | instanton liquid positions |
Run all unit tests
ctest --test-dir build --output-on-failureTests verify:
- action consistency
- Metropolis acceptance rule
- cooling monotonicity
- boundary conditions
- potential symmetry
Generate API documentation with
cmake --build build --target docsThen open
docs/api/html/index.html
Incremental rebuild
cmake --build build -jClean rebuild
rm -rf build
cmake -S . -B build
cmake --build build -jMarco Benazzi, Theoretical Physics MSc Project
Started: 2025