We give an introduction to the calculation of path integrals on a lattice, with the quantum harmonic oscillator as an example. In addition to providing an explicit computational setup and corresponding pseudocode, we pay particular attention to the existence of autocorrelations and the calculation of reliable errors. The over-relaxation technique is presented as a way to counter strong autocorrelations. The simulation methods can be extended to compute observables for path integrals in other settings.

1.
B. L.
van der Waerden
,
Sources of Quantum Mechanics
(
Dover
,
New York
,
1968
).
2.
S. G.
Brush
, “
Resource letter HP-1: History of physics
,”
Am. J. Phys.
55
,
683
690
(
1987
).
3.
P. A. M.
Dirac
, “
The Lagrangian in quantum mechanics
,”
Phys. Z. Sowjetunion
3
,
64
72
(
1933
).
4.
P. A. M.
Dirac
,
The Principles of Quantum Mechanics
(
Oxford U. P.
,
London
,
1947
).
5.
R. P.
Feynman
, “
Space-time approach to non-relativistic quantum mechanics
,”
Rev. Mod. Phys.
20
,
367
387
(
1948
).
6.
S. G.
Brush
, “
Functional integrals and statistical physics
,”
Rev. Mod. Phys.
33
,
79
92
(
1961
).
7.
R. P.
Feynman
and
A. R.
Hibbs
,
Quantum Mechanics and Path Integrals
(
McGraw-Hill
,
New York
,
1965
).
8.
K.
Huang
,
Quantum Field Theory: From Operators to Path Integrals
, 2nd ed. (
Wiley
,
Weinheim
,
2010
).
9.
F. W.
Weigel
, “
Path integral methods in statistical mechanics
,”
Phys. Rep.
16
,
57
114
(
1975
).
10.
H.
Wio
,
Path Integrals for Stochastic Processes: An Introduction
(
World Scientific
,
Singapore
,
2013
).
11.
N.
Wiener
, “
The average value of a functional
,”
Proc. London Math. Soc.
22
,
454
467
(
1921
).
12.
M.
Kac
, “
Wiener and integration in function spaces
,”
Bull. Am. Math. Soc.
72
,
52
68
(
1966
).
13.
L. D.
Landau
and
E. M.
Lifschitz
,
Classical Mechanics
(
Pergamon Press
,
Oxford
,
1960
).
14.
R. P.
Feynman
,
The Feynman Lectures in Physics
(
Addison–Wesley
,
Reading, MA
,
1965
), Vol.
3
, pp.
3-1
3-7
.
15.
R.
Sawant
,
J.
Samuel
,
A.
Sinha
,
S.
Sinha
, and
U.
Sinha
, “
Nonclassical paths in quantum interference experiments
,”
Phys. Rev. Lett.
113
,
120406-1
5
(
2014
).
16.
D. J.
Amit
,
Field Theory, The Renormalization Group, and Critical Phenomena
(
World Scientific
,
Singapore
,
1984
).
17.
J.
Zinn-Justin
,
Path Integrals in Quantum Mechanics
(
Oxford U. P.
,
Oxford
,
2006
).
18.
M.
Creutz
and
B.
Freedman
, “
A statistical approach to quantum mechanics
,”
Ann. Phys.
132
,
427
462
(
1981
).
19.
C.
Morningstar
, “
The Monte Carlo method in quantum field theory
,” e-print arXiv:hep-lat/0702020.
20.
M.
Creutz
,
Quarks, Gluons and Lattices
(
Cambridge U. P.
,
Cambridge, UK
,
1983
).
21.
C.
Gattringer
and
C. B.
Lang
,
Quantum Chromodynamics on the Lattice: An Introductory Presentation
(
Springer
,
Berlin
,
2010
).
22.
T.
DeGrand
and
C.
DeTar
,
Lattice Methods for Quantum Chromodynamics
(
World Scientific
,
Singapore
,
2006
).
23.
I.
Montvay
and
G.
Münster
,
Quantum Fields on a Lattice
(
Cambridge U. P.
,
Cambridge, UK
,
1994
).
24.
H. J.
Rothe
,
Lattice Gauge Theories: An Introduction
, 4th ed. (
World Scientific
,
Singapore
,
2012
).
25.
J.
Smit
,
Introduction to Quantum Fields on a Lattice
(
Cambridge U. P.
,
Cambridge
,
2002
).
26.
See supplementary material at https://doi.org/10.1119/1.5024926 for a derivation of the lattice-dependent expressions for ⟨x̂2⟩ and ⟨x̂4⟩ and pseudocode for the MH step and jackknife procedure.
27.
N.
Metropolis
,
A. W.
Rosenbluth
,
M. N.
Rosenbluth
,
A. H.
Teller
, and
E.
Teller
, “
Equation of state calculations by fast computing machines
,”
J. Chem. Phys.
21
,
1087
1092
(
1953
).
28.
W. A.
Hastings
, “
Monte Carlo sampling methods using Markov chains and their applications
,”
Biometrica
57
,
97
190
(
1970
).
29.

Different observables can approach their equilibrium values at different rates.

30.

The local logarithmic slope can also be determined less locally, as long as one stays within the range for which Eq. (49) holds.

31.

If the error on the error had started to increase at some Δt* < 40, Δt* would have defined the cutoff for this parameter set.

32.
M. H.
Quenouille
, “
Problems in plane sampling
,”
Ann. Math. Stat.
20
,
355
375
(
1949
).
33.
J.
Shao
and
D.
Tu
,
The Jackknife and Bootstrap
(
Springer
,
New York
,
1996
).
34.

Initially the jackknife variance will increase monotonically with bin size. After a while, it will reach a plateau versus the bin size, and eventually the jackknife variance will fluctuate; that is, vary non-monotonically as a function of the bin size. We should choose the bin size in the plateau region.

35.
U.
Wolff
, “
Monte Carlo errors with less errors
,”
Comput. Phys. Commun.
156
,
143
153
(
2004
).
36.

The Matlab function UWerr.m, Version 6, described in Ref. 36, was used to determine the statistical errors of the asymptotic autocorrelation time.

37.

If the asymptotic autocorrelation time is fully determined by the term et/τ0, there is no fundamental distinction between the asymptotic and the integrated autocorrelation time, because τO,int12+1eτ/τ00etτ0=τ0=τO,exp.

38.
W.
Janke
and
T.
Sauer
, “
Path integral Monte Carlo using multigrid techniques
,”
Chem. Phys. Lett.
201
,
499
505
(
1993
).
39.
M.
Creutz
,“
Overrelaxation and Monte Carlo simulation
,”
Phys. Rev. D
36
,
515
519
(
1987
).
40.
F. R.
Brown
and
T. J.
Woch
, “
Overrelaxed heat-bath and Metropolis algorithms for accelerating pure gauge Monte Carlo simulations
,”
Phys. Rev. Lett.
58
,
2394
2396
(
1987
).
41.

In the continuum limit, the term 1+ω̃2/2 in Eq. (69) approaches 1. Thus, in this limit, the trial change x̃i approximates the choice of x̃i by Creutz, and Brown and Woch.40 We note that the acceptance rate for x̃i approaches one in the continuum limit, where the kinetic term dominates.

42.
C. M.
Bender
and
T. T.
Wu
, “
Anharmonic oscillator
,”
Phys. Rev.
184
,
1231
1260
(
1969
).
43.
F. T.
Hioe
and
E. W.
Montroll
, “
Quantum theory of anharmonic oscillators. I. Energy levels of oscillators with positive quartic anharmonicity
,”
J. Math. Phys.
16
,
1945
1955
(
1975
).

Supplementary Material

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.