GithubHelp home page GithubHelp logo

Comments (22)

jl-wynen avatar jl-wynen commented on July 28, 2024 1

Fixed in #28

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

The exponential discretization seems to be the wrong way around. At least that follows from comparing with exact results.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

The comparison depends on a bunch of things including: which correlator exactly is the measurement computing? For example < a a† > is in the natural order (I think) for Wick contraction and transformation into the propagator while to Wick contract < a† a> you'll pick up some anti-commutator terms in the wick contraction, but all you'll notice in an exact method is a time reversal.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

I am implementing the one-point functions P=< N_particles > and H=< N_holes >. From that you can build Q = H-P and N = H+P.

I did a calculation on an asymmetric triangle (hopping strengths 1, 1, 2, U=5, beta=1.75, sigmaKappa=-1, µ=0, particle/hole basis, variant 1 action) with the diagonal discretization and compared to an exact calculation. I measured Q, the total charge exactly to be -0.0771426, and N to be 3 (1 per site).

The diagonal discretization came out with the -(the exact charge) [modulo discretization errors, which I checked by running nt=16, 32 and seeing the correct trend]. The nt=32 results are

Q: (0.06578409266703213+0.005684437520519567j)±0.01172155472449005
N: (3.2602671754950254-0.0003313409697494861j)±0.001113443988806022

which you can see has the wrong Q (and ~10% discretization errors on N).

I reran with an exponential discretization, again measuring Q, the total charge (just nt=32). I got =(the exact charge)ish. Anyway, the sign is correct, even if it's a bit high.

Q: (-0.0907954470130278-0.006585932113434101j)±0.011173904788308112
N: (2.9999999999999933+7.173403552337876e-17j)±8.116642157964712e-15

As you can see N=3 so so well it's crazy. That must be the exponential discretization having magic in it.

ANYWAY, my conclusion is that the diagonal discretization has particles and holes swapped.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

(I added the onePointFunction measurements in 75b2fe4)

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

Soooo in https://arxiv.org/pdf/1807.07025.pdf just after (2) they have ρ=a†a-b†b. According to (2) and the immediately preceding discussion b are the holes. So now I'm really mixed up---the particles count positively towards the charge.

But... particles should be electrons, no? Holes should be positive, electrons negative. So there may be an overall minus sign in the charge operator that I'm not accounting for because I just followed their definition. It'd be good for @luutom or Timo to weigh in.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

We have been using positive particles and negative holes the whole time. If you look e.g. at the triangle, the ground state has Q=-1. Since we have more holes than particles in the ground state, that means holes are negatively charged.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

OK. If we stick to that convention (positive particles, negative holes) then the triangle's ground state indeed has Q=–1 and I stick by my original claim that the diagonal discretization has swapped particles and holes.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

OK. Here's my whole story. I consider the isosceles triangle

h = [[0,1,1],[1,0,2],[1,2,0]]

so that the translational symmetry is broken, the problem is not bipartite, and the problem is still small enough to solve exactly.

Exact Story

My Hamiltonian is

    H = - [ a† h a - b† h b ] + U/2 ρ V ρ - µ Q
    V = delta function in space
    ρ = a†a - b†b
    Q = sum ρ

and I take for my example µ=0, U=5 and, when need be, β=1.75 (I have set κ=1 in h, a choice of units). I selected the temperature by looking for a large <Q>.

My exact calculation for that β has <ρ1>=+0.000200901, <ρ2>=<ρ3>=–0.0386717 so <Q>=-0.0771426.

I also calculate the two-point correlation function < a_t a†_0 >, creating an a at 0 time and destroying it at time t. I use the three single-particle eigenoperators,

operators = [[ –1 + √3, 1, 1], [0, -1, 1], [–1–√3, 1, 1]] . [a†_1, a†_2, a†_3]]

except each row of that matrix is normalized, but if I write it out in complete glory it's gross.

I compute exactly by doing

C = 1/Z tr[ exp(-βH) a_t a†_0 ] = 1/Z tr[ exp(–(β–t) H) a exp(–H t) a† ]

and computing overlap factors and the matrix exponentials in the complete Hilbert space. Note that there is a sign that comes in here---how operators time-evolve in the Heisenberg picture. I use O(t) = exp(+H t) O exp(–H t).

That yields this correlator

Screen Shot 2020-02-26 at 17 33 43

With Isle

I use the following lattice

!lattice
name: 'triangle-asymmetric'
comment: 'An asymmetric triangle.'
nt: 0
adjacency: [[0,1],[1,2],[0,2]]
hopping: [1,2,1]
positions: [
    [0,0,0],
    [-0.5, +0.6123724357, 0],
    [-0.5, -0.6123724357, 0],
]

and docs/examples/fullHMCEvolution.py followed by docs/examples/measure.py with beta=1.75, U=5, nt=32 (like above) and both exponential and diagonal discretizations.

In particular, I use onePointFunction to measure < n_h = b†b = 1–bb† = 1–H > and < n_p = a†a = 1–aa† = 1–P> on each site. For expectation values I take a straight mean (don't even count the weights), no bootstrap or anything.

Here are the measurements:

ρ exact ρ exp ρ diag n exact n exp n diag
0 +0.0002 –0.326 +0.335 1 1 1.050
1 –0.038 –0.098 +0.096 1 1 1.099
2 –0.038 –0.097 +0.096 1 1 1.100
total –0.077 –0.522 +0.528 3 3 3.248

Looking at this suggests that exponential discretization has the correct signs, because the charges come out most similar, while diagonal discretization has the wrong sign.

I also use SingleParticleCorrelator to measure Species.PARTICLE and .HOLE.

(colors don't mean anything, aren't meant to be suggestive)
isle-dia
isle-exp

That's funny... comparing with the exact correlators above, the diagonal one looks most similar! What gives? That's incompatible with the hint from the one-point functions that the exponential is correct. Crap!

Well, there's one way to check these observables against one another. Note that

C_holes(t=0) – C_particles(t=0)  
     = < bb†–aa† > 
     = < –(1–a†a) + (1–b†b) > 
     = < a†a – b†b > 
     = < Q > when we sum over all the irreps.

Well... let's check!

NOPE, TOTAL FAILURE. Both discretizations have a mismatch, by a minus sign. Therefore, I conclude:

Conclusion

  • EXPONENTIAL has the right sign.
  • DIAGONAL has the wrong sign.
  • SingleParticleCorrelator ALSO has a wrong sign.

Caveat: without a continuum extrapolation, I can't be absolutely positive. It could be that the discretizations' correctness are switched. But one way or the other I can check the consistency of the two observables, and find a contradiction. Therefore the SingleParticleCorrelator has a wrong sign.

My guess it is in temporalRoller but I thought I had checked this carefully... it needs an independent check.

I can provide the Mathematica code + isle data (though each ensemble is large, measurements are ~half a gig).

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

One more possibility: the contraction of aadagger to the propagator is wrong, it should be the contraction of adag a. But I don’t think that could be right.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

EDIT I had the wrong sign for ρ in the original post. Now the number in the table are correct.

I can partially reproduce your exact results and correlators with re-weighting and bootstrap (by eye).
I checked the correlators with Nt=96 as well and got very good agreement with the exact results in the diagonal discretization. But I need to exchange particles and holes in the exponential case to get agreement, just like in your results.

ρ on the other hand changes quite significantly under re-weighting:

ρ exact ρ exp ρ diag n exact n exp n diag
0 +0.0002 –0.013 ± 0.033 +0.002 ± 0.032 1 1 1.0201 ± 0.0013
1 –0.038 +0.044 ± 0.020 –0.061 ± 0.018 1 1 1.0365 ± 0.0007
2 –0.038 +0.030 ± 0.021 –0.032 ± 0.019 1 1 1.0363 ± 0.0006
total –0.077 +0.062 ± 0.044 –0.090 ± 0.041 3 3 3.0929 ± 0.0016

Computing Q from the single particle correlators (w/ re-weighting, Nt=96) gives

  • exp: +0.063 ± 0.014
  • diag: –0.091 ± 0.015

In all cases, the diagonal discretization matches the exact results while the exponential only does so when switching particles and holes.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

I'm going crazy trying to sort this out. In https://github.com/evanberkowitz/isle-sign-convention I put together a single script sign-convention.py to do HMC, measurement, and bootstrapping of different ensembles for the asymmetric triangle. Now I get that DIAGONAL discretization produces the correct one-point functions for rho, and the EXPONENTIAL discretization produces the wrong sign.

Did this change? Am I going crazy?

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

OK, now using the sign-convention script mentioned above, and the positive-particle convention, I find:

diagonal + onePoint + singleParticle to ALL be correct and exponential to be wrong.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

Great!
Do you agree that the culprit is the minus sign in the exponentials in eq. (1.18) in the hubbardFermiAction docs? Compare with eq. (12) in arXiv:1812.09268
If so, is the sign on μ correct? I think it needs to be switched too, c.f. eq. (1.3).

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

I agree that:

  1. The sign in (docs:1.18) does not match the sign in (ergodicity:12).
  2. The sign on the chemical potential and h are opposite in (docs:1.3) and (docs:1.18) and one ought to be changed.

BUT what the CORRECT sign for the chemical potential is, I take no position. There's an independent sign convention there---is the Hamiltonian +µQ or –µQ (the latter is more usual). But there's no specification of the hamiltonian in the isle docs, and there's no chemical potential in the ergodicity paper, so it makes it hard to compare :(

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

Furthermore, because the chemical potential term is spacetime constant, even in the diagonal discretization it might make sense to keep it as the fugacity, exp(µ), multiplying the off-time-diagonal term, rather than expand it to make it part of the on-time-diagonal.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

If the Hamiltonian is –[a† h a – b† h b] + ρVρ – μ Q then since Q = sum_x a†a – b†b (positive particles) we can rewrite the quadratic term as –[a† (h + µ δ) a – b† (h + µ δ) b] + ρVρ. With that sign convention we should have h and µ have the same signs.

As mentioned, in (docs:1.3) we can rewrite (1+µ) as z=exp(µ) if we so desire.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

I think we should keep everything as is for the current project so it doesn't get too messy. But once that is done, we should switch the sign on h in the exponential discretisation.
The chemical potential is a different issue and can be decided when we need it.
Do you agree?

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

I agree that we can leave the overall sign convention for another time. But I would advocate changing now:

  • the sign of h in the exponential discretization
  • the sign of µ in the exponential discretization

even though we have something running---how much would be wasted, resource-wise? The reason is that "just" time-reversing the exponential correlators isn't exaaaaactly perfect, because the time slices go from 0 to (Nt-1), so time-reversed things will be off by O(dt) [i think?].

I advocate changing the sign of µ in the exponential discretization so that at least finite-µ means the same thing in the two discretizations and we only make changes to the exponential discretization right now. Then we can decide the overall sign of µ for all time in #27.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

Maybe you are right. I have a bunch of results now but transferring them to JURECA actually takes longer then re-running the simulation. So I'm going to change the signs.

from isle.

jl-wynen avatar jl-wynen commented on July 28, 2024

The only place where the sign enters is in this function:
https://github.com/jl-wynen/isle/blob/d62f8e463989cf48603d546ed18f539c6c17de43/src/isle/cpp/hubbardFermiMatrixExp.cpp#L24

But maybe I missed some other place. That is why I wanted a second pair of eyes to look at it.

from isle.

evanberkowitz avatar evanberkowitz commented on July 28, 2024

Continued discussion of details of code in #28.

from isle.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.