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

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

D. Guirado Instituto de Astrofísica de Andalucía CSIC, Granda, Spain Polarization school, Aussois, 06/06/2013

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo

I, at any rate, am convinced that He does not throw dice. Albert Einstein

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

Random processes and probability distributions. Phys 420/580 Lecture 20

Lecture notes on Regression: Markov Chain Monte Carlo (MCMC)

Today: Fundamentals of Monte Carlo

Alex Gezerlis. New Ideas in Constraining Nuclear Forces ECT*, Trento, Italy June 5, 2018

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

Random number generators and random processes. Statistics and probability intro. Peg board example. Peg board example. Notes. Eugeniy E.

Lecture 10: The Normal Distribution. So far all the random variables have been discrete.

Simulation. Version 1.1 c 2010, 2009, 2001 José Fernando Oliveira Maria Antónia Carravilla FEUP

Monte Carlo Methods. Part I: Introduction

A Short Course on Geant4 Simulation Toolkit. Introduction.

Variational Monte Carlo Technique

Reduction of Variance. Importance Sampling

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

Quantum Monte Carlo calculations of medium mass nuclei

Monte Carlo Methods in High Energy Physics I

Quantum Monte Carlo calculations of neutron and nuclear matter


Monte Carlo integration (naive Monte Carlo)

Physics 403 Monte Carlo Techniques

Sampling Based Filters

Computational modeling

Sampling Based Filters

Quantum Monte Carlo calculations with chiral Effective Field Theory Interactions

Nuclear structure I: Introduction and nuclear interactions

From neutrons to atoms (in 2D) and back

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

Monte Carlo programs

Computer Intensive Methods in Mathematical Statistics

Lecture 2 : CS6205 Advanced Modeling and Simulation

Physics with Mathematica Fall 2013 Exercise #1 27 Aug 2012

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

The Monte Carlo Method

AMath 483/583 Lecture 26. Notes: Notes: Announcements. Notes: AMath 483/583 Lecture 26. Outline:

Quantum Monte Carlo with

Dense Matter and Neutrinos. J. Carlson - LANL

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

The Monte Carlo method what and how?

A simple algorithm that will generate a sequence of integers between 0 and m is:

Abstract. 2. We construct several transcendental numbers.

Theoretical Cryptography, Lecture 10

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

Lecture 3. G. Cowan. Lecture 3 page 1. Lectures on Statistical Data Analysis

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

Introduction to Bayesian Learning. Machine Learning Fall 2018

4.5 Applications of Congruences

The Monte Carlo Method in Medical Radiation Physics

Topics for Today. Sampling Distribution. The Central Limit Theorem. Stat203 Page 1 of 28 Fall 2011 Week 5 Lecture 2

Experiment 1: The Same or Not The Same?

Generating the Sample

Lecture 6. Statistical Processes. Irreversibility. Counting and Probability. Microstates and Macrostates. The Meaning of Equilibrium Ω(m) 9 spins

Monte Carlo Radiation Transfer I

QUACCS 2014: Quantum Monte Carlo for Electrons

MONTE CARLO METHOD. Reference1: Smit Frenkel, Understanding molecular simulation, second edition, Academic press, 2002.

Note: Final Exam is at 10:45 on Tuesday, 5/3/11 (This is the Final Exam time reserved for our labs). From Practice Test I

Neutron Matter: EOS, Spin and Density Response

Big Bang, Black Holes, No Math

ISE/OR 762 Stochastic Simulation Techniques

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V

Monte Carlo Integration. Computer Graphics CMU /15-662, Fall 2016

Lecture Notes 3 Multiple Random Variables. Joint, Marginal, and Conditional pmfs. Bayes Rule and Independence for pmfs

Pairing wave functions for quantum Monte Carlo methods

CS 125 Section #12 (More) Probability and Randomized Algorithms 11/24/14. For random numbers X which only take on nonnegative integer values, E(X) =

PHYS 1442 Section 004 Lecture #14

Sampling Based Filters

Problem 1: (Chernoff Bounds via Negative Dependence - from MU Ex 5.15)

Hand Simulations. Christos Alexopoulos and Dave Goldsman 9/2/14. Georgia Institute of Technology, Atlanta, GA, USA 1 / 26

Welcome back to PHY 3305

CENTRAL LIMIT THEOREM

Strong Lens Modeling (II): Statistical Methods

March 19 - Solving Linear Systems

GAUGE THEORY OF ELEMENTARY PARTICLE PHYSICS: PROBLEMS AND SOLUTIONS BY TA-PEI CHENG, LING-FONG LI

Monte Carlo Methods in Engineering

Motion of a charged particle in an electric field. Electric flux

New approaches to uncertainty evaluation:

Winter 2019 Math 106 Topics in Applied Mathematics. Lecture 8: Importance Sampling

Quantum Monte Carlo calculations of the equation of state of neutron matter with chiral EFT interactions

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

Physics 403. Segev BenZvi. Monte Carlo Techniques. Department of Physics and Astronomy University of Rochester

Doing Physics with Random Numbers

Time-Dependent Statistical Mechanics 1. Introduction

CSE 103 Homework 8: Solutions November 30, var(x) = np(1 p) = P r( X ) 0.95 P r( X ) 0.

Nuclear and Nucleon Matter Constraints on Three-Nucleon Forces

PHYS 1444 Section 003 Lecture #18

Projectile Motion: Vectors

AFDMC Method for Nuclear Physics and Nuclear Astrophysics

The Mathematics of Doodling. Ravi Vakil, Stanford University

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 45

Error propagation. Alexander Khanov. October 4, PHYS6260: Experimental Methods is HEP Oklahoma State University

Discrete Mathematics for CS Spring 2006 Vazirani Lecture 22

SIMCON - Computer Simulation of Condensed Matter

Sampling exactly from the normal distribution

Introduction to numerical computations on the GPU

APPLYING QUANTUM COMPUTER FOR THE REALIZATION OF SPSA ALGORITHM Oleg Granichin, Alexey Wladimirovich

CE 530 Molecular Simulation

Transcription:

Introduction 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 Introduction 1 / 15

Why (quantum) Monte Carlo? Monte Carlo: solve multi-dimensional integrals by using random numbers. Quantum Monte Carlo: solve quantum mechanical problems using Monte Carlo methods. Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 2 / 15

Why (quantum) Monte Carlo? Monte Carlo: solve multi-dimensional integrals by using random numbers. Quantum Monte Carlo: solve quantum mechanical problems using Monte Carlo methods. From Wikipedia, Monte Carlo algorithm : In computing, a Monte Carlo algorithm is a randomized algorithm whose running time is deterministic, but whose output may be incorrect with a certain (typically small) probability. The name refers to the grand casino in the Principality of Monaco at Monte Carlo, which is well-known around the world as an icon of gambling. Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 2 / 15

About these lectures My contact: Stefano Gandolfi, stefano@lanl.gov 9 lectures (45 minutes each) Main topics: VMC DMC GFMC/AFDMC Quantum Monte Carlo simulations of solids W. M. C. Foulkes, L. Mitas, R. J. Needs, and G. Rajagopal, Rev. Mod. Phys. 73, 33 (2001) Quantum Monte Carlo methods for nuclear physics J. Carlson, S. Gandolfi, F. Pederiva, Steven C. Pieper, R. Schiavilla, K. E. Schmidt, and R. B. Wiringa, Rev. Mod. Phys. 87, 1067 (2015) Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 3 / 15

Introduction What do you need if interested to exercises and examples: Basic knowledge of Fortran For your own practice coding, you are very welcome to use any language that you like (but my help will be dependent on that!) Know how to compile and run a simple code Have your laptop ready to compile Fortran codes. I can help if you use a Linux distribution Have basic libraries installed (Lapack, Blas, random numbers generator,...) Install some MPI library. I recommend OpenMPI, https://www.open-mpi.org/ (I can help installing on Linux) Have fun while learning!!! Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 4 / 15

Using random events: the first example The first, older, example that I found on literature to calculate something by mean of random events, the dartboard method: Throw darts, i.e. choose points randomly within a rectangular box with some area inside to integrate on: A area A box A box = 4 r 2, A area = π r 2, π = 4 A area A box # hits inside the area = P(hit inside the area)= # hits inside the box Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 5 / 15

The first example The first code! npt=10000 count=0 do j=1,npt x=random1 y=random2 if (sqrt(x**2+y**2).lt.radius) count=count+1 enddo pi=4.0*count/npt Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 6 / 15

Another example, π Buffon s Needle Problem (1733): What is the probability that a needle of length l will land on a line, given a floor with equally spaced parallel lines a distance d apart? Let s define x = l/d. For a short needle (l < d): P(x) = 2π 0 l cos θ d θ d 2π = 2l πd π 2lN dh where N is needles thrown, and H is the time for a needle to cross a line. Possible exercise: throw many needles, or write a MC code for this! Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 7 / 15

Monte Carlo integration The goal of Monte Carlo integration is to solve multi-dimensional integrals using random numbers! Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 8 / 15

Monte Carlo integration The goal of Monte Carlo integration is to solve multi-dimensional integrals using random numbers! Why??? Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 8 / 15

Brute force integration Suppose that we want to calculate some integral of dimension D. The easiest thing to do is a sum over discrete intervals h, something like I = b a dx 1... b a dx D f (x 1... x D ) h D f (x 1... x D ) Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 9 / 15

Brute force integration Suppose that we want to calculate some integral of dimension D. The easiest thing to do is a sum over discrete intervals h, something like I = b a dx 1... b a dx D f (x 1... x D ) h D f (x 1... x D ) It s easy to show that if we want an error of order ɛ, we need to sum a number of points N = ɛ D Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 9 / 15

Brute force integration Suppose that we want to calculate some integral of dimension D. The easiest thing to do is a sum over discrete intervals h, something like I = b a dx 1... b a dx D f (x 1... x D ) h D f (x 1... x D ) It s easy to show that if we want an error of order ɛ, we need to sum a number of points N = ɛ D so, for ɛ = 0.1 and a system with 20 particles (D = 60) we have to sum N = 10 60 points. With the best available supercomputers the time needed is greater than the age of the universe! Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 9 / 15

Central limit theorem Assume independent samples X i Compute averages by blocks : Xi = 1 j+nb N b i X i Central limit theorem: For N b the Distribution of averages over blocks converges to a Gaussian, whose width gives the statistical error. Histogram of 100,000 blocks, for different values of N b : probability 0.2 0.15 0.1 N b =1 N b =2 N b =10 N b =100 0.05 0 90 95 100 105 110 value of x i Note how the width reduces by increasing N b! Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 10 / 15

Statistical errors from Gaussian distributions Assume independent samples with Gaussian distribution of measurements Compute average X = 1 N b i X i Compute standard error σ = i (X i X ) 2 /N b The probabilities to have the average X within 1,2, or 3 σ within the exact integral are P( X σ x X + σ ) 0.6827 P( X 2 σ x X + 2 σ ) 0.9545 P( X 3 σ x X + 3 σ ) 0.9973 N b Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 11 / 15

Monte Carlo integration Monte Carlo methods provide the tools to solve multi-dimensional integrals! Monte Carlo methods allow us to solve for integrals: I = dxf (x) = dxw (x) F (x) W (x), where we sample points x i distributed as W (x), and we evaluate F (x i )/W (x i ). In the limit of large points sampled, we have: X = 1 N N n=1 F (x n ) W (x n ) I. Central limit theorem: Sample many X i above. As explained before, the average of them is a measure of I, with a (statistical) error that goes like 1/ N b and depends critically on the choice of W (x). Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 12 / 15

Monte Carlo sampling: the first example Sampling the distribution x i = 100 + 15 (ξ 0.5) with ξ uniformly distributed from 0 to 1: 0.03 0.03 0.03 0.025 0.025 0.025 probability 0.02 0.015 0.01 probability 0.02 0.015 0.01 probability 0.02 0.015 0.01 0.005 0.005 0.005 0 90 92 94 96 98 100 102 104 106 108 110 value of x 0 90 92 94 96 98 100 102 104 106 108 110 value of x 0 90 92 94 96 98 100 102 104 106 108 110 value of x 100 samples 1000 samples 1,000,000 samples Caveat: samples must be independent! calculate averages using several independent samples. Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 13 / 15

Block size vs number of blocks The total number of samples is given by N tot = N b N val. What happens by increasing N b by keeping constant N tot? 0.2 0.15 N b =10,000, N val =1,000 N b =1,000, N val =10,000 N b =100, N val =100,000 N b =10, N val =1,000,000 probability 0.1 0.05 0 97 98 99 100 101 102 103 value of x i The distribution is more peaked, but it becomes less Gaussian for small values of N val. Need to find a compromise. Possible exercise: try to solve some simple integral Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 14 / 15

Monte Carlo integration Questions??? Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 15 / 15

Monte Carlo integration Questions???... for now :-) Stefano Gandolfi (LANL) - stefano@lanl.gov Introduction 15 / 15