Giter Site home page Giter Site logo

chinmaykhasnis7 / path-integral-qmc Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 26 KB

This repository contains Python implementation Path integral Quantum Monte-Carlo to find the ground state energy of the harmonic oscillator.

Python 100.00%
path-integral quantum-monte-carlo

path-integral-qmc's Introduction

Path Integral Quantum Monte Carlo (PI-QMC)

This repository contains Python implementation PI-QMC to find the ground state energy of the harmonic oscillator. The action for Wick rotated Harmonic oscillator in Euclidean time, $t \rightarrow -i\tau$. $$S[x(\tau)]=\int_{\tau_a}^{\tau_b} d \tau\left(\frac{1}{2} m \dot{x}^2+\frac{1}{2} m \omega^2 x^2\right)$$

Applying periodic boundary condition $x\left(\tau_{i+N}\right)=x\left(\tau_i\right)$, $$S_L=\frac{m \Delta}{2} \sum_{i=0}^{N-1}\left[\left(\frac{x_{i+1}-x_i}{\Delta}\right)^2+\omega^2\left(\frac{x_{i+1}+x_i}{2}\right)^2\right]$$ Converting into reduced units $\hat{m}=m \Delta, \hat{\omega}=\omega \Delta, \hat{x}\left(\tau_i\right)=\hat{x}_i=\frac{x_i}{\Delta}$,

$$S_L=\frac{\hat{m}}{2} \sum_{i=0}^{N-1}\left[\left(\hat{x}_{i+1}-\hat{x}_i\right)^2+\frac{\hat{\omega}^2}{4}\left(\hat{x}_{i+1}+\hat{x}_i\right)^2\right]$$

Choose $\xi \sim Unif[-\Delta, \Delta]$ and update the configuration $\hat{x}_i^{\prime}=\hat{x}_i+\xi$. Now compute the change in action $\Delta S_L=S_L\left(\hat{x}_i^{\prime}\right)-S_L\left(\hat{x}_i\right)$,

$$\Delta S_L=\frac{\hat{m}}{2} \sum_{i=0}^{N-1} \left[\left(\hat{x}_{i+1}-\hat{x}_i^{\prime}\right)^2 -\left(\hat{x}_{i+1}-\hat{x}_i\right)^2+\frac{\hat{\omega}^2}{4}\left(\left(\hat{x}_{i+1}+\hat{x}_i^{\prime}\right)^2- \left(\hat{x}_{i+1}+\hat{x}_i\right)^2\right)\right]$$

Transition probability $W\left(\hat{x}_i \rightarrow \hat{x}_i^{\prime}\right)$,

$$W=\left\{\begin{array}{ll} 1, & \Delta S_L<0 \\\ e^{-\Delta S_L}, & \Delta S_L \geqslant 0 \end{array}\right.$$

References

  1. Joseph, Anosh. Markov chain monte carlo methods in quantum field theories: A modern primer. Springer Nature, 2020.
  2. Rosenfelder, Roland. "Path integrals in quantum physics." arXiv preprint arXiv:1209.1315 (2012).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.