Metropolis/Variational Monte Carlo. Microscopic Theories of Nuclear Structure, Dynamics and Electroweak Currents June 12-30, 2017, ECT*, Trento, Italy

Similar documents
Introduction. Microscopic Theories of Nuclear Structure, Dynamics and Electroweak Currents June 12-30, 2017, ECT*, Trento, Italy

I. QUANTUM MONTE CARLO METHODS: INTRODUCTION AND BASICS

Quantum Variational Monte Carlo. QVMCApp

Markov Processes. Stochastic process. Markov process

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below

3.320 Lecture 18 (4/12/05)

Lecture 7. More dimensions

Monte Carlo importance sampling and Markov chain

The XY-Model. David-Alexander Robinson Sch th January 2012

Markov Chain Monte Carlo

Variational Monte Carlo Technique

The EOS of neutron matter and the effect of Λ hyperons to neutron star structure

MARKOV CHAIN MONTE CARLO

Wang-Landau Monte Carlo simulation. Aleš Vítek IT4I, VP3

The EOS of neutron matter, and the effect of Λ hyperons to neutron star structure

Quantum Monte Carlo study of one-dimensional bosons with finite range interactions

Random Walks A&T and F&S 3.1.2

Wave Function Optimization and VMC

The EOS of neutron matter, and the effect of Λ hyperons to neutron star structure

Quantum Monte Carlo calculations of neutron and nuclear matter

Computational Physics Lectures: Variational Monte Carlo methods

The Monte Carlo Algorithm

NATIONAL UNIVERSITY OF SINGAPORE PC5215 NUMERICAL RECIPES WITH APPLICATIONS. (Semester I: AY ) Time Allowed: 2 Hours

Copyright 2001 University of Cambridge. Not to be quoted or copied without permission.

Monte Carlo (MC) Simulation Methods. Elisa Fadda

Computational Physics (6810): Session 13

The Ising model and Markov chain Monte Carlo

Markov Chain Monte Carlo Inference. Siamak Ravanbakhsh Winter 2018

Enrico Fermi and the FERMIAC. Mechanical device that plots 2D random walks of slow and fast neutrons in fissile material

Diffusion Monte Carlo

On Markov Chain Monte Carlo

MATH325 - QUANTUM MECHANICS - SOLUTION SHEET 11

Classical Monte-Carlo simulations

Monte Carlo Simulation of the Ising Model. Abstract

Monte Caro simulations

Brief introduction to Markov Chain Monte Carlo

Numerical Analysis of 2-D Ising Model. Ishita Agarwal Masters in Physics (University of Bonn) 17 th March 2011

Numerical integration and importance sampling

Multiple time step Monte Carlo

A Monte Carlo Implementation of the Ising Model in Python

Vortices in Atomic Bose-Einstein Condensates in the large gas parameter region. Abstract

Ch 125a Problem Set 1

QUACCS 2014: Quantum Monte Carlo for Electrons

Variational Monte Carlo to find Ground State Energy for Helium

The Overhauser Instability

Quantum Mechanics II

Random Estimates in QMC

Variational wave function for a two-electron quantum dot

arxiv:cond-mat/ v1 15 Feb 1999

High-order Chin actions in path integral Monte Carlo

Nuclear and Nucleon Matter Constraints on Three-Nucleon Forces

Applicability of Quasi-Monte Carlo for lattice systems

Time-dependent linear-response variational Monte Carlo.

Monte Carlo integration (naive Monte Carlo)

Neutron Matter: EOS, Spin and Density Response

Lecture 3: September 10

Problem 1: A 3-D Spherical Well(10 Points)

Quantum Mechanical Simulations

MCMC notes by Mark Holder

Guiding Monte Carlo Simulations with Machine Learning

The Monte Carlo Method An Introduction to Markov Chain MC

Physics 137A Quantum Mechanics Fall 2012 Midterm II - Solutions

Phys460.nb Back to our example. on the same quantum state. i.e., if we have initial condition (5.241) ψ(t = 0) = χ n (t = 0)

Classical Monte Carlo Simulations

Monte Carlo Methods in Statistical Mechanics

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

A Geometric Interpretation of the Metropolis Hastings Algorithm

Introduction to Machine Learning CMU-10701

AFDMC Method for Nuclear Physics and Nuclear Astrophysics

Metal-insulator transition with Gutzwiller-Jastrow wave functions

Lecture 12. The harmonic oscillator

Session 3A: Markov chain Monte Carlo (MCMC)

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006

Fixed-Node quantum Monte Carlo for Chemistry

Harmonic Oscillator with raising and lowering operators. We write the Schrödinger equation for the harmonic oscillator in one dimension as follows:

From neutrons to atoms (in 2D) and back

April 20th, Advanced Topics in Machine Learning California Institute of Technology. Markov Chain Monte Carlo for Machine Learning

Advanced Sampling Algorithms

A Brief History of the Use of the Metropolis Method at LANL in the 1950s

Nuclear structure III: Nuclear and neutron matter. National Nuclear Physics Summer School Massachusetts Institute of Technology (MIT) July 18-29, 2016

An Overview of Quantum Monte Carlo Methods. David M. Ceperley

Parallel Tempering Algorithm in Monte Carlo Simulation

Optimization of quantum Monte Carlo (QMC) wave functions by energy minimization

PROGRESS IN UNDERSTANDING THE PROPERTIED OF MANY-BODY SYSTEMS BY QUANTUM MONTE CARLO SIMULATIONS

EFFICIENT OBJECT-ORIENTATION FOR MANY-BODY PHYSICS PROBLEMS

PHYS 5020 Computation and Image Processing

5. Simulated Annealing 5.1 Basic Concepts. Fall 2010 Instructor: Dr. Masoud Yaghini

Lecture 7 and 8: Markov Chain Monte Carlo

Bickel Rosenblatt test

We can instead solve the problem algebraically by introducing up and down ladder operators b + and b

Energy Based Models. Stefano Ermon, Aditya Grover. Stanford University. Lecture 13

Computer Intensive Methods in Mathematical Statistics

Qualifying Exam. Aug Part II. Please use blank paper for your work do not write on problems sheets!

THE DETAILED BALANCE ENERGY-SCALED DISPLACEMENT MONTE CARLO ALGORITHM

Simulation of the two-dimensional square-lattice Lenz-Ising model in Python

Markov Chain Monte Carlo, Numerical Integration

Use of probability gradients in hybrid MCMC and a new convergence test

Monte Carlo simulations of harmonic and anharmonic oscillators in discrete Euclidean time

Mixing Quantum and Classical Mechanics: A Partially Miscible Solution

A quick introduction to Markov chains and Markov chain Monte Carlo (revised version)

Transcription:

Metropolis/Variational Monte Carlo Stefano Gandolfi Los Alamos National Laboratory (LANL) Microscopic Theories of Nuclear Structure, Dynamics and Electroweak Currents June 12-30, 2017, ECT*, Trento, Italy Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 1 / 14

Metropolis Monte Carlo and Markov Chain Algorithms Metropolis Monte Carlo is an algorithm designed to sample complicated many-variable distributions. It employs a Markov Chain Monte Carlo algorithm to achieve this. see: Metropolis, N., Rosenbluth, A., Rosenbluth, M., Teller, A., and Teller, E., Equations of state calculations by fast computing machines, J. Chem. Phys. 2121(6) 1087 (1953). A Markov Chain Monte Carlo Algorithm employs random walks where each step depends only upon the present position of the system (no history ). The Metropolis algorithm assumes that you want to sample from a non-negative function W (R) which may be in many dimensions: eg. R = (r i ) for many particles i. Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 2 / 14

Metropolis Monte Carlo Metropolis algorithm is used to sample a multi-variable function W (R), whose distribution is at priori unknown. But with a priori unknown equilibration time and unknown time between independent samples. Detailed balance is enforced, requiring the flux from point A B equals that from B A Rejection is used, we propose a move with a probability T (A B) and accept that move with probability P(A B). Detailed balance requires: W (A) T (A B) P(A B) = W (B) T (B A) P(B A) Note that detailed balance is more restrictive than strictly necessary. Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 3 / 14

Metropolis Monte Carlo A simple Metropolis Algorithm: 1 Initialize all particles within the physical volume and calculate W(R) 2 Propose a move of all particles R, within a box centered on the current positions: r i α = ri α + b(ξi α 0.5) where α runs over 3 dimensions and i over N particles 3 Calculate W (R ) 4 Accept this proposed move with probability P given by: P = min[w (R )/W (R), 1] 5 If the move is accepted, set the current position to R, otherwise keep the current position at R 6 Return to step 2, and propose a new move After some number of steps the samples will be independent. Averages and Errors can be calculated using these independent samples Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 4 / 14

Let s consider a many-body general Hamiltonian describing a system of N particles. N H = 2 2 i + v(r ij ) 2m i i<j and we want to calculate the energy: E 0 E = Ψ T H Ψ T Ψ T Ψ T = dr1... dr N Ψ T (r 1... r N )HΨ T (r 1... r N ) dr1... dr N Ψ T (r 1... r N )Ψ T (r 1... r N ) where Ψ T (r 1... r N ) is a variational wave function that depends on the coordinates (positions) of the particles, with variational parameters {α}. For a given form of Ψ T (r 1... r N ) we want to find the best value(s) of α giving the lower energy, i.e. we need to study E[α]. How do we solve the above integral? Some definition: r i = (x i, y i, z i,...) has coordinate(s) of particle i when used, R = r 1...r N (and dr = dr 1...dr N ) Ψ(R) = R Ψ Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 5 / 14

Remember: F (x)dx = F (x) W (x) W (x)dx = f (x)w (x)dx So we can rewrite the integral as: dr1... dr N Ψ T E = (r 1... r N )HΨ T (r 1... r N ) dr1... dr N Ψ T (r 1... r N )Ψ T (r 1... r N ) = dr W (R) Ψ T (R)HΨ T (R) Ψ T (R)Ψ T (R) where W (R) = Ψ T (r 1... r N )Ψ T (r 1... r N ) dr1... dr N Ψ T (r 1... r N )Ψ T (r 1... r N ) = Ψ T (R) 2 dr ΨT (R) 2 Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 6 / 14

VMC: first implementation Easy case: 1-dimensional Harmonic oscillator ( = m = 1). d 2 H = 1 2 d x 2 + 1 2 Ω2 x 2 Let s start from the following variational wave function: (Ω = α gives the exact solution). Ψ T (x) = e αx 2 /2 We will call walker one configuration that will be used to generate new configurations according to the Metropolis/Markov chain algorithm. In the 1D harmonic oscillator case, walker i is simply W i = {x i } but in general (3D, multiparticles, spins, etc.) each walker will contain many more information, i.e. { r 1,..., r N,...}. Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 7 / 14

VMC: first implementation Following Metropolis, the VMC algorithm can be summarized in the following steps: 1 Generate a set of N walkers randomly distributed 2 Loop over the N walkers, and for each i-th walker: 3 Calculate W (x i ) = Ψ T x i 2 4 Make a trial step: x test = x + (ξ 0.5) 5 Calculate W (x test ) = Ψ T x test 2 6 Calculate the ratio W (x test )/W (x i ) and do Metropolis 7 If the move is accepted, set x i = x test. 8 Calculate averages 9 Iterate with 2) until the equilibration is reached, then reset estimators and iterate until the error is small enough Note: in VMC, N can be even 1. But using more configurations will be very convenient when parallel machines are available. Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 8 / 14

VMC: first implementation The calculation of observables is carried out over a total of M walkers (uncorrelated points in the Markov chain) as O = M Ψ i ω T W i W i Ô Ψ T i Ψ T W i W i Ψ T M i ω i where ω i is the weight of the configuration (usually 1). For example (remember that Ψ T = exp( αx 2 /2) Ψ T W i W i Ĥ Ψ T Ψ T W i W i Ψ T = = 1 Ψ T x i x i d 2 dx Ψ 2 T + 1 Ψ 2 Ψ T x i x i Ψ T 2 Ω2 T x i x i x 2 Ψ T Ψ T x i x i Ψ T = 1 2 (α2 xi 2 α) + 1 2 Ω2 xi 2 Note: if Ψ T is the exact solution, then Ψ T HΨ T Ψ T Ψ T = E = Ω 2 x! Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 9 / 14

VMC: the first piece of code... do j=1,nstep do n=1,nwalk psiold=exp(-0.5*alpha*xold(n)**2) call ran(csi,irn) xtest=xold(n)+sigma*(csi-0.5) psinew=exp(-0.5*alpha*xtest**2) prob=(psinew/psiold)**2 call ran(csi,irn) if (csi.gt.prob) xtest=xold(n) eloc=-0.5*((alpha*xtest)**2-alpha)+0.5*omega**2*xtest**2 xold(n)=xtest enddo enddo... Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 10 / 14

VMC: first implementation 1 Loop over the N walkers, and for each i-th walker: do j=1,nstep do n=1,nwalk 2 Calculate W (x i ) = Ψ T x i 2 psiold=exp(-0.5*alpha*xold(n)**2) 3 Make a trial step: x test = x + (ξ 0.5) call ran(csi,irn) xtest=xold(n)+sigma*(csi-0.5) 4 Calculate W (x test ) = Ψ T x test 2 psinew=exp(-0.5*alpha*xtest**2) Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 11 / 14

VMC: first implementation 1 Calculate the ratio W (x test )/W (x i ) and do Metropolis prob=(psinew/psiold)**2 call ran(csi,irn) 2 If the move is accepted, set x i = x test, otherwise reject the move if (csi.gt.prob) xtest=xold(n) xold(n)=xtest 3 Calculate averages eloc=-0.5*((alpha*xtest)**2-alpha)+0.5*omega**2*xtest**2 4 Iterate with 2) until the equilibration is reached, then reset estimators and iterate until the error is small enough Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 12 / 14

Variational Monte Carlo An example: 1D harmonic oscillator, VMC calculations. Energy as a function of the variational parameter α: 1.5 1.25 1 Energy 0.75 0.5 0.25 0 0 0.5 1 1.5 2 2.5 3 3.5 4 α Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 13 / 14

Variational Monte Carlo VMC is a tool to calculate the energy of a many-body system for a given wave function as a function of its variational parameters. This requires to solve multi-dimensional integrals, that are solved using Monte Carlo integration. Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 14 / 14

Variational Monte Carlo VMC is a tool to calculate the energy of a many-body system for a given wave function as a function of its variational parameters. This requires to solve multi-dimensional integrals, that are solved using Monte Carlo integration.... for now :-) Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 14 / 14

Backup: Harmonic Oscillator Ψ T (x) = e αx 2 /2 Ψ T 2 = dx e αx 2 π = α ( H = dx e αx 2 /2 1 d 2 2 dx 2 + 1 ) 2 Ω2 x 2 e αx 2 /2 = dx e αx 2 /2 [ 12 (α2 x 2 α) + 12 ] Ω2 x 2 e αx 2 /2 Ψ T H Ψ T Ψ T Ψ T [ 1 = 4α (Ω2 α 2 ) + α ] π 2 α = 1 4α (Ω2 α 2 ) + α 2 Stefano Gandolfi (LANL) - stefano@lanl.gov Metropolis/Variational Monte Carlo 1 / 1