Numerical Path Integrals: Austin Liu

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Numerical path integrals

Numerical path integrals

Austin Liu

Bernardi Group
Department of Applied Physics and Materials Science
California Institute of Technology
[email protected]

July 18, 2016


Numerical path integrals

Overview

1 Review of Quantum Mechanics


Propagators using Path Integrals

2 Numerical Integration
Importance Sampling
Metropolis Algorithm
Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Notation and background

For simplicity, first consider a time-independent Hamiltonian.


d
i~ |i = H |i
dt
|(t)i = e i H(tt0 )/~ |(t0 )i
K (x, t; x0 , t0 ) = hx|U(t, t0 )|x0 i
(x, t) = hx|(t)i = hx|U(t, t0 )|(t0 )i
Z
= dx0 hx|U(t, t0 )|x0 i hx0 |(t0 )i

Propagator is the kernel of the integral transform.


Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Time-sliced path integral

Following the approach by Zee1 - consider the propagator:

hxN , tN |x0 , t0 i
= hxN | e iH(tN t0 )/~ |x0 i
Z
= dx1 dx2 . . . dxN1 hxN |e iHt/~ |xN1 i hxN1 |e iHt/~ |xN2 i

. . . hx1 |e iHt/~ |x0 i

1
A. Zee QFT in a nutshell
Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Time-sliced path integral

Each transition amplitude is:


i p2 i
hxj+1 |e iHt/~ |xj i = hxj+1 |e ~ 2m t e ~ V (xj )t |xj i
Z
i i p2
= e ~ V (xj )t dp hxj+1 |e ~ 2m t |pi hp|xj i
Z
i i p2
= e ~ V (xj )t dp e ~ 2m t hxj+1 |pi hp|xj i

e ipx/~
The convention here is hx|pi =
2~
,
Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Time-sliced path integral

Z
iHt/~ ~i V (xj )t dp i p2 t+ ip(xj+1 xj )
hxj+1 |e |xj i = e e ~ 2m ~
2~
i r 2
e ~ V (xj )t 2m~ 2m~(xj+1 x j)
= e 4it~ 2
2~ it  
 x x 2
j+1 j
r i PN1
m ~ j=0 t t
V (xj )
= e
2~it
2 +bx b2 p
dx e ax = e 4a a . Hence:
R
Note

hxN |e iH(tN t0 )/~ |x0 i


  2 
 m N/2 N1 YZ i PN1 m xj+1 xj
V (xj )
~ j=0 t 2 t
= dxj e
2~it
j=1
Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Time-sliced path integral

hxN , tN |x0 , t0 i = hxN |e iH(tN t0 )/~ |x0 i


  2 
 m N/2 N1 YZ i PN1 m xj+1 xj
V (xj )
~ j=0 t 2 t
= dxj e
2~it
j=1
Z xN  
i
= D[x(t)] exp S[x(t)]
x0 ~

where
Z tN
S[x(t)] = dt L(x, x)
t0
1
L(x, x) = mx 2 V (x)
2
Numerical path integrals
Review of Quantum Mechanics
Propagators using Path Integrals

Imaginary time
Let t i :
   2
x 1 x
LE x, = m V (x)
2

so:
Z xN  
1
hxN , N |x0 , 0 i = D[x( )] exp S[x( )]
x0 ~

where
Z N
S[x( )] = d LE (x, x)
0
Numerical path integrals
Numerical Integration
Importance Sampling

Importance Sampling

hxN , tN |x0 , t0 i
  2 
 m N/2 N1 YZ ~1 N1
P
m xj+1 xj
+V (xj )
j=0 2
= dxj e
2~
j=1

We want to sample more points in the regions which contribute


more to the integral.
Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 1-D

In the 1-D case2 , want to replace original integral


Z b Z b Z 1
f (x(y ))
I = dx f (x) = dx p(x) = dy J(y )f (x(y ))
a a p(x) 0

dx
where J(y (x)) = dy = 1/p(x) is the Jacobian of the
transformation. p(x) is interpreted as a probability density which
we are choosing points from.

1
G. P. Lepage VEGAS Documentation.
http://pythonhosted.org/vegas/background.html
Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 1-D

Now estimate the integral:


1 X
I S (1) = J(yi )f (x(yi )) = E(f (x(y ))J(y )) = E(f (x)p(x))
M
i

where we select M points yi from U(0, 1).


Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 1-D

Since:
Z 1 
1
I2 = 2 2
dy J (y )f (x(y )) I 2
= Var(f (x(y ))J(y ))
M 0
Z b 
1 2 2
= dx J(y (x))f (x) I
M a

where we select M points yi from U(0, 1). So the variance


vanishes if we can choose:
Rb
f (x)dx
J(y (x)) = a
f (x)
Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 1-D

The grid gives the transformation


Desired grid function:

x(y = i/N) = xi
x0 = a
for i = 0, 1, . . . , N with Jacobian:
x1 = x0 + x0
.. dx xi
. J(y ) = Ji = = Nxi
dy 1/N
xN = xN1 + xN1 = b
for i/N < y < (i + 1)/N
Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 1-D
The variance of the estimate is:
Z b 
2 1 2 2
I = J(y (x))f (x)dx I
M a
Z xi+1 !
1 X
= Ji f 2 (x)dx I 2
M xi i

so as
X Z xi+1 X Z xi+1
2
Ji f (x)dx = Nxi f 2 (x)dx I 2
i xi i xi

the variance vanishes. Therefore adjust the grid such that xi is


small when |f (x)| is large.
Numerical path integrals
Numerical Integration
Importance Sampling

Implementation in 2-D

The VEGAS routine assumes that a separable Jacobian can be


used in the multidimensional case (to save memory, so the number
of points to store goes as Nd and not N d ).
Suppose we want a mapping from x 1 , x 2 to y 1 , y 2 , then we can
approximate:

1 2
(x1 , x2 ) dx1 dx2
J(y , y ) =
=
(y1 , y2 ) dy1 dy2

Similar conditions on the grid in each direction can be obtained.


Numerical path integrals
Numerical Integration
Importance Sampling

Example in 2-D
Sum of two Gaussians that are diagonally offset:
Numerical path integrals
Numerical Integration
Importance Sampling

Example in 2-D
Final grid:
Numerical path integrals
Numerical Integration
Importance Sampling

Stratified sampling

The wasted evaluations along the second diagonal may be reduced


by stratified sampling.
Divide integration region into hypercubes
Perform MC integral in each region
Obtain variances and define new grid, keeping number of
hypercubes constant, repeat until contributions to 2 from
each are close enough.
Numerical path integrals
Numerical Integration
Importance Sampling

Evaluation of the propagator

We can evaluate the integral for the propagator:


  2 
N1 Z i PN1 m x j+1 xj
 m N/2 Y ~ j=0 t 2 t
V (xj )
dxj e
2~it
j=1
Numerical path integrals
Numerical Integration
Importance Sampling

Evaluation of the propagator

With V (xj ) = 12 m 2 xj2 :


Numerical path integrals
Numerical Integration
Metropolis Algorithm

Want to compute averages of the form:


R
f (x)p(x)dx
hf i = R
p(x)dx

For example, the quantity:

Dx x(2 )x(1 )e S[x]


R
hx(2 )x(1 )i = R
Dx e S[x]

(set ~ = 1 for notational ease)


Numerical path integrals
Numerical Integration
Metropolis Algorithm

note that hx|e H |xi = Dx e S[x] , so rewrite the numerator


R

(sum over the repeated index for the energy eigenstates,


considering paths where xf = xi = x) as:
Z
dx hx|e H(f 2 ) xe H(2 1 ) xe H(2 i ) |xi
Z
= dx hx|En i hEn |e H(f 2 ) xe H(2 1 ) xe H(2 i ) |En i hEn |xi
Z
= dx hx|En i hEn |xe H(2 1 ) x|En i hEn |xi e En (f i )

= hxe H(2 1 ) x|En i e En (f i )


Numerical path integrals
Numerical Integration
Metropolis Algorithm

The denominator becomes


Z Z
H(f i )
dx hx|e |xi = dx hx|En i hEn |e H(f i ) En i hEn |xi

= e En (f i )

so we have (with T = f i , = 2 1 )

hxe H x|En i e En T
P
hx(2 )x(1 )i G ( ) = n P En T
ne
hE0 |xe (HE0 ) x|E0 i
| hE0 |x|E1 i |2 e (HE0 )
q
at large times, note that x = ~
2m (a + a)
Numerical path integrals
Numerical Integration
Metropolis Algorithm

Finally obtain

log(G ( )/G ( + )) (E1 E0 )


Numerical path integrals
Numerical Integration
Metropolis Algorithm

Algorithm

(i) (i)
First generate Ncf paths x (i) = {x0 , xN1 }. Beginning with an
arbitrary path, randomize xj at the j th site using the
Metropolis-Hastings algorithm as follows:
Generate random number in uniformly in the range (, ).
Compute S, the change in the action caused by replacing
xj xj + .
If S < 0, accept the move.
If S > 0, accept the move with probability e S
Numerical path integrals
Numerical Integration
Metropolis Algorithm

Algorithm

The overall algorithm is:


Initialize all points xji to 0, for i {0, , Ncf 1},
j {0, , N 1}.
Update the path 5Ncor times.
Update the path Ncor times, noting the acceptance ratio, once
this is satisfactory, run the simulation and compute the
desired function for a path G (t).
Average over Ncf to get hG (t)i.
Numerical path integrals
Numerical Integration
Metropolis Algorithm

The relevant measurement for us is:


1 X
G (t) = hx(tj + t)x(tj )i
N
j
1 X
= hx(j+n) mod N xj i
N
j
Numerical path integrals
Numerical Integration
Metropolis Algorithm

Want to calculate the variance of the quantity hG (t)i.


Estimate the variance by generating bootstrap copies of G .
Given {G (i) , i = 1, Ncf } Monte Carlo measurements,
randomly sample Ncf times to get a copy of G .
Obtain new estimate of E = (E1 E0 ).
Multiple such estimates allow us to estimate the variance of
E .
Numerical path integrals
Numerical Integration
Metropolis Algorithm

t Delta E(t) Error


------------
0 1.02946 0.0462194
0.5 1.01308 0.0655298
1 0.933914 0.119393
1.5 0.92962 0.183209
2 0.993295 0.273887
Numerical path integrals
Numerical Integration
Metropolis Algorithm

Future directions

Compare convergence of multidimensional integration routine with

X
G (x, t; 0, 0) = m (x)m (0)e iEm t
m

for simple cases.


Look at convergence of:
X m (x)m (x 0 ) 0 (x)m0 (x 0 )
(x, x 0 , ) = m
0
(E m Em0 ) i
m,m
Numerical path integrals
Numerical Integration
Metropolis Algorithm

References
G. P. Lepage (2005)
Lattice QCD for Novices. arXiv:hep-lat/0506036

G. P. Lepage (1978)
A new algorithm for adaptive multidimensional integration
Journal of Computational Physics 27(2), 192 203

G. P. Lepage (2014)
vegas 3.0 Documentation http://pythonhosted.org/vegas/

R. Shankar (1994)
Principles of Quantum Mechanics

A. Zee (2003)
Quantum Field Theory in a Nutshell

H. Gould, J. Tobochnik, W. Christian (2011)


An Introduction to Computer Simulation Methods, 367 401.
Numerical path integrals
Numerical Integration
Metropolis Algorithm

The End

You might also like