In the present repository, we describe the study of the quantum harmonic oscillator in one dimension through numerical simulation. By adopting the Path Integral approach and implementing the Monte Carlo method, the internal energy of the system is studied as a function of temperature. The wave function of the ground state is determined, and the values of the energy gaps between the ground state and the first two excited levels are obtained.
The structure of the repository is as follows:
class_lattice.h
:This header, located in the
include
directory, contains the lattice class from which the trajectory lattice is instantiated. The class includes a Metropolis update method and an incorporated Pseudo Random Number Generator.harmonic_main.cpp
:This program calls the simulation subroutine for several values of the temperature and sides, collecting internal energy, positions and correlators measures in the
Data_simulation
folder.harmonic_plot.py
:This program utilizes the data in the
Data_simulation
folder to plot the physical quantities of interest.Plots_and_fit
:All produced plots are stored in this folder. Here we can find the fit of the continuum limit of the internal energy and the energy gaps at fixed beta.
Tests
:This directory contains easy-to-use examples for testing the class methods and verifying that the Monte Carlo algorithm has thermalized.
Here are some of the plots generated from the analysis:
Monte Carlo trajectories and energies:
Internal energy as a function of the temperature:
Ground state wavefunction:
Two times correlator with t = nk :
Feel free to explore the repository and use the provided programs for further analysis and investigation.
This repository is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for more information.