Shadow Hamiltonians and ForceGradient Symplectic Integrators A D

  • Slides: 44
Download presentation
Shadow Hamiltonians and Force-Gradient Symplectic Integrators A D Kennedy University of Edinburgh (Mike Clark

Shadow Hamiltonians and Force-Gradient Symplectic Integrators A D Kennedy University of Edinburgh (Mike Clark and Paulo Silva) 25 September 2020 Perspectives on Light Quark Simulations

Object To review why we need symmetric symplectic integrators, how they sometimes fail, and

Object To review why we need symmetric symplectic integrators, how they sometimes fail, and what properties we will require in the near future To give a pedagogical introduction to shadow Hamiltonians and how they can help to understand tune symplectic integrators Not to present new results: you will have to wait until the summer (perhaps)! 25 September 2020 A D Kennedy 2

Caveat A recent (published) paper had near the beginning the passage “The object of

Caveat A recent (published) paper had near the beginning the passage “The object of this paper is to prove (something very important). ” It transpired with great difficulty, and not till near the end, that the “object” was an unachieved one. Littlewood, “A Mathematician’s Miscellany” 25 September 2020 A D Kennedy 3

Why Integrators? HMC algorithm requires reversible area-preserving integrators We need small integration step sizes

Why Integrators? HMC algorithm requires reversible area-preserving integrators We need small integration step sizes for small and thus good acceptance rates Naïve expectation is order n integrator for Long history. . . Campostrini—Rossi Sexton—Weingarten Takaishi—de. Forcrand. . . and a whole subfield of numerical analysts 25 September 2020 A D Kennedy 4

Long Trajectories We need long trajectories to generate independent gauge field configurations Meyer, Simma,

Long Trajectories We need long trajectories to generate independent gauge field configurations Meyer, Simma, Sommer, Della Morte, Witzel, and Wolff where is the relevant correlation length, probably an inverse hadron size in lattice units It is easy to fool oneself into the false economy of choosing trajectories that are too short! 25 September 2020 A D Kennedy 5

Towards Light Quarks Step size limited by integrator instabilities Not by exceptional configurations! Instabilities

Towards Light Quarks Step size limited by integrator instabilities Not by exceptional configurations! Instabilities caused by excessively noisy estimates of fermionic force Not (yet) by fermionic forces themselves “Cured” by using more pseudofermion estimators Mike Clark, Lattice 2006 (Tucson) Hasenbusch, DDHMC, RHMC 25 September 2020 A D Kennedy 6

Approaching the Physical m� We now need larger and finer lattices Mike Clark, Lattice

Approaching the Physical m� We now need larger and finer lattices Mike Clark, Lattice 2006 (Tucson) Bulk effects become more important Higher-order integrators will become increasingly important 25 September 2020 A D Kennedy 7

Problems to be Solved Multiple pseudofermions reduce the fermionic force But what exactly is

Problems to be Solved Multiple pseudofermions reduce the fermionic force But what exactly is this “fermion force” that is to be minimized? Painful tuning problem Higher-order integrators have lots of free parameters They are often built of longer sub-steps Which make instabilities worse These are painful to tune too 25 September 2020 A D Kennedy 8

Into the Shadow World For each symplectic integrator there exists a Hamiltonian H’ which

Into the Shadow World For each symplectic integrator there exists a Hamiltonian H’ which is exactly conserved This may be obtained by replacing the commutators in the BCH expansion of with the Poisson bracket 25 September 2020 A D Kennedy 9

Why and How? Classical mechanics is not specified just by a Hamiltonian H but

Why and How? Classical mechanics is not specified just by a Hamiltonian H but also by a closed fundamental 2 -form For every function (0 -form) A this defines a Hamiltonian vector field Which just means that for all X 25 September 2020 A D Kennedy 10

Concrete Shadows To be a little less abstract consider the familiar case where and

Concrete Shadows To be a little less abstract consider the familiar case where and we have so 25 September 2020 A D Kennedy 11

Classical Trajectories Classical trajectories are then integral curves of the Hamiltonian vector field of

Classical Trajectories Classical trajectories are then integral curves of the Hamiltonian vector field of the Hamiltonian H In other words, this vector field is always tangent to the classical trajectory 25 September 2020 A D Kennedy 12

Poisson Brackets Consider the action of a Hamiltonian vector field of a function (0

Poisson Brackets Consider the action of a Hamiltonian vector field of a function (0 -form) Where we have introduced the Poisson bracket of two functions These obey the Jacobi identity This follows from the closure of the fundamental 2 -form It is not trivial: Poisson brackets are not commutators Functions form a Lie algebra with PBs as the Lie product 25 September 2020 A D Kennedy 13

Concrete Poisson Brackets To make this more familiar when the Poisson bracket becomes 25

Concrete Poisson Brackets To make this more familiar when the Poisson bracket becomes 25 September 2020 A D Kennedy 14

Hamilton’s Equations (again) To make this really concrete consider the action of the Hamiltonian

Hamilton’s Equations (again) To make this really concrete consider the action of the Hamiltonian vector field on an arbitrary function f that we saw earlier 25 September 2020 A D Kennedy 15

Commutators So far this is just a fancy (and complicated) way of rewriting Hamilton’s

Commutators So far this is just a fancy (and complicated) way of rewriting Hamilton’s equations, but now we derive a surprising new result The commutator of Hamiltonian vector fields is itself a Hamiltonian vector field To see why this is useful we next consider. . . 25 September 2020 A D Kennedy 16

Symplectic Integrators We are interested in finding the classical trajectory in phase space of

Symplectic Integrators We are interested in finding the classical trajectory in phase space of a system described by the Hamiltonian Define the corresponding Hamiltonian vector fields (with ) and so that 25 September 2020 A D Kennedy 17

Symplectic Integrators Formally the solution of Hamilton’s equations with trajectory length is the exponential

Symplectic Integrators Formally the solution of Hamilton’s equations with trajectory length is the exponential of the Hamiltonian vector field, Since the kinetic energy T is a function only of p and the potential energy S is a function only of q, it follows that the action of and may be evaluated trivially (Taylor’s theorem!) 25 September 2020 A D Kennedy 18

Symplectic Integrators Baker-Campbell-Hausdorff (BCH) formula If A and B belong to any (non-commutative) algebra

Symplectic Integrators Baker-Campbell-Hausdorff (BCH) formula If A and B belong to any (non-commutative) algebra then , where constructed from commutators of A and B (i. e. , is in the Free Lie Algebra generated by A and B ) More precisely, 25 September 2020 where A D Kennedy and 19

Symplectic Integrators Explicitly, the first few terms are In order to construct reversible integrators

Symplectic Integrators Explicitly, the first few terms are In order to construct reversible integrators we use symmetric symplectic integrators The following identity follows directly from the BCH formula 25 September 2020 A D Kennedy 20

Symplectic Integrators From the BCH formula we find that the PQP symmetric symplectic integrator

Symplectic Integrators From the BCH formula we find that the PQP symmetric symplectic integrator is given by In addition to conserving energy to O ( ² ) such symmetric symplectic integrators are manifestly area preserving and reversible 25 September 2020 A D Kennedy 21

Shadow Hamiltonian But more significantly the PQP integrator follows the integral curves of exactly

Shadow Hamiltonian But more significantly the PQP integrator follows the integral curves of exactly And is constructed from commutators of the Hamiltonian vector fields and Therefore it is the Hamiltonian vector field of the corresponding combination of Poisson brackets This is called the shadow Hamiltonian 25 September 2020 A D Kennedy 22

Shadow Hamiltonian For the PQP integrator we have 25 September 2020 A D Kennedy

Shadow Hamiltonian For the PQP integrator we have 25 September 2020 A D Kennedy 23

What use are Shadows? Find a Hamiltonian H’ whose shadow is the Hamiltonian H

What use are Shadows? Find a Hamiltonian H’ whose shadow is the Hamiltonian H the we want? No luck! The shadow is not the sum of a kinetic term and a potential term in general 25 September 2020 A D Kennedy 24

What use are Shadows? Use the shadow to tune an integrator A precise definition

What use are Shadows? Use the shadow to tune an integrator A precise definition of a “large” fermionic force is a large contribution to the shadow Hamiltonian An integrator becomes unstable when the BCH expansion for its shadow fails to converge In which case there is no (real) conserved shadow Hamiltonian Optimize the integrator by minimizing ? Not quite, as we shall see later 25 September 2020 A D Kennedy 25

Gauge Theories But first there a few details that we shouldn’t overlook Can we

Gauge Theories But first there a few details that we shouldn’t overlook Can we compute Poisson brackets and shadow Hamiltonians for gauge fields and fermions? 25 September 2020 A D Kennedy 26

Review Flat Manifold General Symplectic 2 -form Hamiltonian vector field Equations of motion Darboux

Review Flat Manifold General Symplectic 2 -form Hamiltonian vector field Equations of motion Darboux theorem: All manifolds are locally flat Poisson bracket 25 September 2020 A D Kennedy 27

Maurer—Cartan Equations The generators of a Lie algebra satisfy the commutation relations These may

Maurer—Cartan Equations The generators of a Lie algebra satisfy the commutation relations These may be extended to a frame of “left invariant” vector fields over the Lie group The dual left invariant forms with satisfy the Maurer—Cartan equations 25 September 2020 A D Kennedy 28

Fundamental 2 -form We can invent any Classical Mechanics we want… So we may

Fundamental 2 -form We can invent any Classical Mechanics we want… So we may therefore define the closed fundamental 2 -form which globally defines an invariant Poisson bracket by 25 September 2020 A D Kennedy 29

Hamiltonian Vector Field We may now follow the usual procedure to find the equations

Hamiltonian Vector Field We may now follow the usual procedure to find the equations of motion Introduce a Hamiltonian function (0 -form) on the cotangent bundle (phase space) over the group manifold Define a vector field 25 September 2020 such that A D Kennedy 30

Poisson Brackets For any Hamiltonian vector field So for 25 September 2020 we have

Poisson Brackets For any Hamiltonian vector field So for 25 September 2020 we have vector fields A D Kennedy 31

More Poisson Brackets We thus compute the lowest-order Poisson bracket and the Hamiltonian vector

More Poisson Brackets We thus compute the lowest-order Poisson bracket and the Hamiltonian vector corresponding to it 25 September 2020 A D Kennedy 32

Even More Poisson Brackets 25 September 2020 A D Kennedy 33

Even More Poisson Brackets 25 September 2020 A D Kennedy 33

Computing Poisson Brackets These are quite complicated (some might say disgusting) objects to compute

Computing Poisson Brackets These are quite complicated (some might say disgusting) objects to compute on the lattice Even for the simplest Wilson gauge action They consists sums of complicated lattice loops with momenta inserted in various places Fortunately there is a recursive way of computing them which is tractable even for more complicated gauge actions It involves inserting previously computed Liealgebra-valued fields living on links into the loops in the action using a “loop walker” algorithm 25 September 2020 A D Kennedy 34

Fermion Poisson Brackets Fermions are easy to include in the formalism We only need

Fermion Poisson Brackets Fermions are easy to include in the formalism We only need a few extra linear equation solves 25 September 2020 A D Kennedy 35

Tuning Your Integrator For any (symmetric) symplectic integrator the conserved Hamiltonian is constructed from

Tuning Your Integrator For any (symmetric) symplectic integrator the conserved Hamiltonian is constructed from the same Poisson brackets A procedure for tuning such integrators is Measure the Poisson brackets during an HMC run Optimize the integrator (number of pseudofermions, step-sizes, order of integration scheme, etc. ) offline using these measured values 25 September 2020 A D Kennedy 36

What to Tune As I said a while ago, minimizing is not a good

What to Tune As I said a while ago, minimizing is not a good choice It is much better to minimize the variance of This is a function of two sets of quantities The ensemble-averaged Poisson brackets The integrator parameters 25 September 2020 Clark, Kennedy, and Silva Lattice 2008 (JLab) A D Kennedy 37

Why Minimize the Variance? As the system wanders through phase space is constant, so

Why Minimize the Variance? As the system wanders through phase space is constant, so Clark, Kennedy, and Silva Lattice 2008 (JLab) We hypothesize that the distribution of is essentially sampled independently and randomly at the start and end of each equilibrium trajectory Therefore we want to minimize the variance of this distribution 25 September 2020 A D Kennedy 38

Simplest Integrators 25 September 2020 A D Kennedy 39

Simplest Integrators 25 September 2020 A D Kennedy 39

Campostrini Integrator 25 September 2020 A D Kennedy 40

Campostrini Integrator 25 September 2020 A D Kennedy 40

Force-Gradient Integrators An interesting observation is that the Poisson bracket depends only of q

Force-Gradient Integrators An interesting observation is that the Poisson bracket depends only of q We may therefore evaluate the integrator explicitly The force for this integrator involves second derivatives of the action Using this type of step we can construct efficient Force-Gradient (Hessian) integrators 25 September 2020 A D Kennedy 41

Force-Gradient Integrators 25 September 2020 A D Kennedy 42

Force-Gradient Integrators 25 September 2020 A D Kennedy 42

Problems? Difficulties? Cancellations between Poisson Brackets require higher accuracy Double precision Accurate linear equation

Problems? Difficulties? Cancellations between Poisson Brackets require higher accuracy Double precision Accurate linear equation solutions Approximates solves do not correspond to Hamiltonian vector fields Perhaps one can still define a pseudofermion action using an approximate ? 25 September 2020 A D Kennedy 43

Conclusions We hope that very significant performance improvements can be obtained using Force-Gradient integrators

Conclusions We hope that very significant performance improvements can be obtained using Force-Gradient integrators For fermions one extra inversion of the Dirac operator is required Pure gauge force terms and Poisson brackets get quite complicated to program Real-life speed-up factors will be measured soon… 25 September 2020 A D Kennedy 44