correlated sampling without reweighting, computing …roland assaraf laboratoire de chimie...

41
Introduction Correlated sampling with reweighting Correlated sampling with no reweighting Conclusion and perspectives Correlated sampling without reweighting, computing properties with size-independent variances Roland Assaraf Laboratoire de Chimie Théorique, CNRS-UMR 7616, Université Pierre et Marie Curie Paris VI, Case 137, 4, place Jussieu 75252 PARIS Cedex 05, France BIRS 2012 Roland Assaraf Correlated sampling without reweighting

Upload: others

Post on 30-Jan-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Correlated sampling without reweighting,computing properties with size-independent

    variances

    Roland Assaraf

    Laboratoire de Chimie Théorique, CNRS-UMR 7616, Université Pierre et MarieCurie Paris VI, Case 137, 4, place Jussieu 75252 PARIS Cedex 05, France

    BIRS 2012

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Some perspective on Quantum Monte Carlo (QMC)

    Many problem in Quantum physics at zero temperature

    The Schroedinger equation,

    HΦ = (−N∑

    i=1

    ∆i + V(r1, r2 . . . rN))Φ = EΦ (1)

    N number of particles.

    ri, 3 spatial coordinates of particle i.

    E lowest eigenvalue, the groundstate energy.

    Φ(r1 . . . rN) the lowest eigen vector, the groundstate

    Φ antisymetric for electrons (fermions).

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Stochastic technics in principle adapted for solving theSchroedinger equation :

    Solving the many problem in Quantum Physics

    Computing integrals in large dimensions.

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Example : variational energy

    Variational energy

    EV ≡ 〈Ψ|Ĥ|Ψ〉

    Average on a probability distribution

    〈Ψ|Ĥ|Ψ〉 =∫

    dRΨ2(R)HΨΨ

    (R)

    = 〈HΨΨ (R)〉Ψ2 = 〈e(R)〉Ψ2R : 3N coordinates of the N interacting particles

    Ev =1N

    N∑k=1

    e(Rk)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Example : variational energy

    Variational energy

    EV ≡ 〈Ψ|Ĥ|Ψ〉

    Average on a probability distribution

    〈Ψ|Ĥ|Ψ〉 =∫

    dRΨ2(R)HΨΨ

    (R)

    = 〈HΨΨ (R)〉Ψ2 = 〈e(R)〉Ψ2R : 3N coordinates of the N interacting particles

    Ev =1N

    N∑k=1

    e(Rk)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Example : variational energy

    Variational energy

    EV ≡ 〈Ψ|Ĥ|Ψ〉

    Average on a probability distribution

    〈Ψ|Ĥ|Ψ〉 =∫

    dRΨ2(R)HΨΨ

    (R)

    = 〈HΨΨ (R)〉Ψ2 = 〈e(R)〉Ψ2R : 3N coordinates of the N interacting particles

    Ev =1N

    N∑k=1

    e(Rk)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    In general

    More generally

    EQMC = 〈e(R)〉ΠDepending on the QMC method, the nature of R might change :

    3N particle coordinates (VMC,DMC..).

    Trajectories in the space of 3N particle coordinates(PDMC, PIMC, reptation...)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Accurate energies

    No analytical integration

    Flexibility (choice of ψ in VMC).

    Weak limitation in system sizes.

    Possibility to improve “arbitrarily” the accuracy(“zero-variance zero-bias principle”, choice of ψ in VMC..).

    In practice, reference methods for total energies on largesystems (large N)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Quantites of physical interest

    They are energy differences.

    Exploiting accurate total energies

    More tricky in QMC than in a deterministic method.

    Energy differences are usually very small.

    Statistical uncertainties.

    Small statistical uncertainty on a total energy might be huge ona difference if energies are computed independently.

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Why energy differences are usually small ?

    ExamplesBinding energies, transition state energies. One, two particle gaps (electron

    affinities, ionization energies) . . .

    First order derivatives of the energy : Any observable (force, dipole, moment,

    densities...).

    Higher order derivatives : spectroscopic constants . . .

    They are groundstate energies of similar systems

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Paradigm : Calculation of an observable O

    Hλ = H + λO => Ō =dEλdλ

    ≃ Eλ − E0λ

    =∆λλ

    (2)

    ∆λ = Eλ − E0 ∝ λ small

    Behavior as a function of the system size

    limN→∞ ∆λ(N) = K finite.

    The perturbation λO depends usually on a few degrees offreedom.

    ∆λ has a locality property

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    In summary

    Small λ and large N

    ∆λ(N) ∝ λ

    Accuracy on ∆λ in an independent energy calculation

    δ∆λ∆λ

    ∝ δE0λ

    ∝√

    No locality property for the statistical uncertainty.

    Comparison to total energy

    δ∆λ∆λ

    ∝ N32

    λ

    δEE

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Overview

    1 Introduction

    2 Correlated sampling with reweightingThe methodStatistical uncertaintiesNumerical illustration

    3 Correlated sampling with no reweightingThe methodNumerical illustration

    4 Conclusion and perspectives

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    correlated sampling with reweighting

    We have to compute the difference

    Eλ − E0 = 〈eλ(R)〉πλ − 〈e(R)〉π

    Sampling the same distribution for the two energies

    Eλ − E0 =〈eλ πλπ 〉π〈πλπ〉π

    − 〈e〉π. (3)weight wλ

    Different contexts

    Variational Monte Carlo eλ(R) =Hλψλψλ

    (R), wλ(R) =ψ2

    λ

    ψ2(R)

    Forward walking method inc ontext of DMC algorithms.

    ...

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    correlated sampling with reweighting

    We have to compute the difference

    Eλ − E0 = 〈eλ(R)〉πλ − 〈e(R)〉π

    Sampling the same distribution for the two energies

    Eλ − E0 =〈eλ πλπ 〉π〈πλπ〉π

    − 〈e〉π. (3)weight wλ

    Different contexts

    Variational Monte Carlo eλ(R) =Hλψλψλ

    (R), wλ(R) =ψ2

    λ

    ψ2(R)

    Forward walking method inc ontext of DMC algorithms.

    ...

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    correlated sampling with reweighting

    We have to compute the difference

    Eλ − E0 = 〈eλ(R)〉πλ − 〈e(R)〉π

    Sampling the same distribution for the two energies

    Eλ − E0 =〈eλ πλπ 〉π〈πλπ〉π

    − 〈e〉π. (3)weight wλ

    Different contexts

    Variational Monte Carlo eλ(R) =Hλψλψλ

    (R), wλ(R) =ψ2

    λ

    ψ2(R)

    Forward walking method inc ontext of DMC algorithms.

    ...

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    General expression

    Compact expression

    ∆λ = Eλ − E0 = 〈eλ − e〉π +cov(eλ,wλ)

    〈wλ〉π(4)

    λ dependence

    Eλ − E0 = λ∂Eλdλ |λ=0 + o(λ).

    E′λ = 〈e′λ〉π + cov(eλ,w′λ)

    Zero-Variance (ZV) estimator Pulay correction

    Finite statistical uncertainty on E′λ =⇒ δ∆λ∆λ = K + o(λ)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Pair correlation function

    [J. Toulouse, R. Assaraf, C. J. Umrigar. J. Chem. Phys. 126 244112 (2007)]Ou =

    ∑i

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    N-dependence

    R. Assaraf, D. Domin, W. Lester.

    Model of two separated (non interacting) subsystems

    Particles coordinates Rl and Ru. Hλ = Hlλ + Hu

    Variational Monte Carlo

    R = (Rl,Ru)

    Ψλ(R) = Ψλ(Rl,Ru) = Ψlλ(Rl)Ψu(Ru)

    Local energy eλ(R) = elλ(Rl) + eu(Ru)

    Eλ − E = 〈elλ − el0〉 +cov(eλ,wl)

    〈wl〉 (5)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    First term (ZV)

    〈elλ − el0〉 depends only on Rl

    =⇒ Locality property of its variance

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Pulay term

    cov(eλ,wl)〈wl〉 =

    cov(elλ,wl)

    〈wl〉 +cov(eu,wl)

    〈wl〉 (6)

    Local Non local

    The non local contribution is 0 (eu and wl independant) !

    Its variance on a finite sample (eu(Rui ),wl(Rli))i∈[1..M] :

    ∝ V(eu) ∝ N.=⇒ δ∆λ(N) ∝

    √N for large N.

    Non locality property of the Pulay term.

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Conclusion

    δ∆λ∆λ

    ∝√

    N (7)

    Correlated sampling with reweighting solves the small λdifficulty but not the large N one

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Illustration on Hn chains

    Is the analysis for non interacting subsystems holds forinteracting systems ?

    Hydrogen chains, metallic and insulating

    Calculation of the force on the first nucleus : derivative ofthe energy with respect to the position of the first nucleus

    Variational calculation

    ψ is a single determinant (Restricted Hartree Fock)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Metallic hydrogen chains

    -0.01

    0

    0.01

    0.02

    0.03

    0.04

    0.05

    0.06

    0.07

    0.08

    0.09

    0 10 20 30 40 50

    For

    ce

    Number of H atoms

    Metallic chain ZV [~ψmin,0]

    ZV [ψ´λ,0]

    ZV [ψ´λ,v]

    ZV [ψ´λ,v]+P[ψ´λ,v]

    ZV [ψ´λ,0]+P[ψ´λ,0]

    ZV [~ψmin,0]+P[ψ´λ,0]

    RHF

    FIG.: Energy derivative, different estimators

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Insulating hydrogen chains

    -0.01

    0

    0.01

    0.02

    0.03

    0.04

    0.05

    0 10 20 30 40 50

    For

    ce

    Number of H atoms

    Insulating chain

    ZV [~ψmin,0]

    ZV [ψ´λ,0]

    ZV [ψ´λ,v]

    ZV [ψ´λ,v]+P[ψ´λ,v]

    ZV [ψ´λ,0]+P[ψ´λ,0]

    ZV [~ψmin,0]+P[ψ´λ,0]

    RHF

    FIG.: Energy derivative, different estimators

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Histogram of the ZV term, metallic chain

    0

    200

    400

    600

    800

    1000

    1200

    1400

    -3 -2 -1 0 1 2 3

    Fre

    quen

    cies

    eλ´-

    H2H4H8

    H24H48

    FIG.: Histogram of the energy derivative in the Hn chain

    ZV contribution has the local property ! !Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Histogram of the local energy, metallic chain

    0

    200

    400

    600

    800

    1000

    1200

    1400

    1600

    -10 -8 -6 -4 -2 0 2 4 6 8 10

    Fre

    quen

    cies

    eL-

    Local energy histogram

    Metallic chain

    H2H4H8

    H24H48

    FIG.: Histogram of the local in the Hn chain

    The local energy has not the local propertyRoland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Statistical uncertainties

    0

    0.0001

    0.0002

    0.0003

    0.0004

    0.0005

    0.0006

    0.0007

    0.0008

    0.0009

    0 10 20 30 40 50 60 70 80 90

    Sta

    tistic

    al u

    ncer

    tain

    ty

    Number of H atoms

    ZV [~ψmin,0]

    ZV [ψ´λ,0]

    ZV [ψ´λ,v]

    ZV [ψ´λ,v]+P[ψ´λ,v]

    ZV [ψ´λ,0]+P[ψ´λ,0]

    ZV [~ψmin,0]+P[ψ´λ,0]

    P[ψ´λ,0]

    P[ψ´λ,v]

    FIG.: Statistical uncertainties in the insulating Hn chain

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodStatistical uncertaintiesNumerical illustration

    Statistical uncertainties

    0

    0.0002

    0.0004

    0.0006

    0.0008

    0.001

    0.0012

    0 10 20 30 40 50 60 70 80 90

    Sta

    tistic

    al u

    ncer

    tain

    ty

    Number of H atoms

    ZV [~ψmin,0]

    ZV [ψ´λ,0]

    ZV [ψ´λ,v]

    ZV [ψ´λ,v]+P[ψ´λ,v]

    ZV [ψ´λ,0]+P[ψ´λ,0]

    ZV [~ψmin,0]+P[ψ´λ,0]

    P[ψ´λ,0]

    P[ψ´λ,v]

    FIG.: Statistical uncertainties in the metallic Hn chain

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    The methodAssaraf, Caffarel, Kollias 2011

    Basic idea

    〈eλ(R)〉πλ − 〈e(R)〉π = 〈eλ(Rλ) − e(R)〉Π(R,Rλ)

    Marginal distributions of Π(R,Rλ) must be π(R), πλ(Rλ).

    differences of the order of λ, 〈(Rλ) − R)2〉 = Kλ2

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    How to build such a process

    Choosing close stochastic processe, L, Lλ having π and πλas stationary states.

    Stability versus chaos. Two trajectories with the differentinitial conditions and same pseudo random numbers meetexponentially fast.

    Insures that close processes will produce closetrajectories.

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    For example, with the overdamped Langevin process onewould have

    R(t + dt) = R(t) + b [R(t)] dt + dW (8)

    Rλ(t + dt) = Rλ(t) + bλ [Rλ(t)] dt + dW (9)

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    Stability of the process versus chaos

    Chain of 120 Hydrogens (120 electrons).Same process but different initial conditions.Perturbed system one atom displaced of λ = 10−4a.u (finitedifference derivative).

    1e-20

    1e-18

    1e-16

    1e-14

    1e-12

    1e-10

    1e-08

    1e-06

    0.0001

    0 2 4 6 8 10 12 14

    <(R

    λ=0-

    R)2

    >

    Time (au)

    (t)

    (average on 100 walkers at time t)

    Synchronization H120 molecule

    FIG.: Synchronization of trajectories in H120Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    Independance of the uncertainties on λ

    Exact derivative

    H120 finite differences

    〈(Rλ−Rλ

    )2〉

    〈ELλ−ELλ〉

    Finite difference parameterλ (au)

    〈(Rλ−

    )2〉

    〈E

    Lλ−

    EL

    λ〉

    2

    1.8

    1.6

    1.4

    1.2

    1

    10.10.010.0010.0001

    -0.05

    -0.1

    -0.15

    -0.2

    -0.25

    FIG.: Quadratic distances betwen the two processes

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    Locality of the algorithm

    1e-16

    1e-15

    1e-14

    1e-13

    1e-12

    1e-11

    1e-10

    1e-09

    1e-08

    0 10 20 30 40 50 60 70 80

    <r i(

    λ)-r

    i)2>

    Distance from the first atom (a.u.)

    Metallic chain

    H2H4H6H8

    H16H24H48

    1e-26

    1e-24

    1e-22

    1e-20

    1e-18

    1e-16

    1e-14

    1e-12

    1e-10

    1e-08

    0 10 20 30 40 50 60 70 80<

    r i(λ)

    -ri)2

    >Distance from the first atom (a.u.)

    Insulating chainH2H4H8

    H16H24H48

    FIG.: Square average of the inter electron distance at a givendistance from the first atom

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    -0.01

    0

    0.01

    0.02

    0.03

    0.04

    0.05

    0.06

    0.07

    0.08

    0.09

    0 10 20 30 40 50

    For

    ce

    Number of H atoms

    Metallic / correlated sampling with no reweighting

    Metallic / RHF

    Insulating / correlated sampling with no reweighting

    Insulating / RHF

    FIG.: Energy derivative with the correlated sampling with noreweighting

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    0

    0.0005

    0.001

    0.0015

    0.002

    0 10 20 30 40 50

    Sta

    tistic

    al u

    ncer

    tain

    ty

    Number of H atoms

    Metallic / correlated sampling with no reweighting

    Insulating / correlated sampling with no reweighting

    FIG.: Uncertainty as a function of N, metallic chains

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    0

    200

    400

    600

    800

    1000

    1200

    -3 -2 -1 0 1 2 3

    Fre

    quen

    cies

    (eλ(Rλ)-e(R))/λ

    Exact derivative histogram

    Metallic chain

    H2H4H8

    H24H48

    FIG.: Histogram of the correlated difference metallic chain

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    The methodNumerical illustration

    0

    200

    400

    600

    800

    1000

    1200

    -3 -2 -1 0 1 2 3

    Fre

    quen

    cies

    (eλ(Rλ)-e(R))/λ

    Exact derivative histogram

    Metallic chain

    H2H4H8

    H24H48

    FIG.: Histogram of the correlated difference metallic chain

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Reweighting introduces statistitical fluctuations difficult tocontrol

    Solves the small perturbation problem (λ small).

    Sometimes large prefactors in the variance.

    Same large N behavior as independent energycalculations.

    Correlated sampling with no reweighting

    Solves the small λ and large N undesirable behavior.

    Perspective to obtain small energy differences withcomparable accuracy to the energy.

    Relies on some particular dynamics (stability with respectto the chaos).

    Roland Assaraf Correlated sampling without reweighting

  • IntroductionCorrelated sampling with reweighting

    Correlated sampling with no reweightingConclusion and perspectives

    Possible to build such stable dynamics

    At the core of perfect sampling (criteria of timeconvergence, see Fahy, Krauth...).

    Building such dynamics for general molecules is underway.

    Vast subject (numerically, mathematically). Collaborationsare welcome...

    Roland Assaraf Correlated sampling without reweighting

    IntroductionCorrelated sampling with reweightingThe methodStatistical uncertaintiesNumerical illustration

    Correlated sampling with no reweightingThe methodNumerical illustration

    Conclusion and perspectives