Menu

How exact is openmps?

Technical
Keyi Liu
2020-06-11
2020-08-31
  • Keyi Liu

    Keyi Liu - 2020-06-11

    Hi,

    I've been running some preliminary tests using the openmps and I've noticed one thing, that the ground state energies from the variational calculation do not have good agreement with exact diagonalization (12 sites at half filling, all spinless fermions).

    This is my Hamiltonian. Only when the interaction parameter is zero, i.e. only the NN hopping terms remain, do I get convergence of GS energy between the variational search and ED.

    So my question is how exact is the algorithm? In all the MPS calculation I have extremely relaxed dimension requirements and strict convergence parameters which I thought would guarantee good results.

    I'm fairly new to the whole field, therefore looking for any insights that might point to either a coding issue or a physics issue.

     
  • Matthew Jones

    Matthew Jones - 2020-06-11

    Hi Keyi Liu,

    This is a great question. Thanks for posting.

    To better assist, would you be able to upload your scripts?
    That way, I can see how you've implemented the above, and can give you better feedback.

    -Matt

     
    • Keyi Liu

      Keyi Liu - 2020-06-11

      Sure.

      The code is pretty barebone. There are a couple of things, I read the documentation on how you do the summation so I decided there should be a factor of 2 on the n_i sums to to remove the implicit double counting correction. In addition, the lambdas can be different but are kept the same for charge neutral conditions.

      Interestingly, if I only keep the nuclear interaction term (the n_i sums) and limit the range to NN and next NN, I have good agreement (still not exact, but a lot better) with ED.

      I've included the code and some results. The lambda's I use in ED and the MPS results are the same.

       
  • Keyi Liu

    Keyi Liu - 2020-06-12

    Just out of curiosity I've also tried time evolution (quenching). The Krylov calculations never converged, and the TDVP returned the same results as the statics.

     
    • Matthew Jones

      Matthew Jones - 2020-06-12

      If you want to run time-evolution from a prescribed state, you'll have to disable MPS (which will first find the ground state [or n-th excited state, depending on your settings] using variational methods, then evolve under a defined time-dependent Hamiltonian).

      How did you setup the quench? If it's trivial, the state would not evolve beyond the ground state initialization.

      I believe our implementation of Krylov in MPS does not support long-range interactions. We experimented with it, but the computational scaling was not ideal. I'll have to check the implementation in Fortran.

      In the meantime, we can run a quick check by removing long-range interactions (anything longer than nearest-neighbor) from your Hamiltonian, and seeing if there is convergence, then. This will help me identify if there is a bug (if the Fortran shows long-range interactions are implemented).

      Would you mind sending me your convergence parameters so that I can sanity check them, too?

       

      Last edit: Matthew Jones 2020-06-12
  • Keyi Liu

    Keyi Liu - 2020-06-12

    Sure. I will generate the results again to make sure everything looks right. By the way in my previous reply the sim_VariationalCoulomb1D.py file should have some of the parameters in the code

     
    • Matthew Jones

      Matthew Jones - 2020-06-12

      Thanks!
      By the way, I'm working on your first question. I'll report back soon.

       
  • Matthew Jones

    Matthew Jones - 2020-06-13

    Happy to report that Krylov methods should generalize properly to long-range interactions.
    I'm going through the scripts you sent me and making some corrections to the convergence schemes. These should correct the behavior we're seeing.

    I'll send a more detailed analysis in a follow-up message to this one.
    Thanks for your patience!

     
    • Daniel Jaschke

      Daniel Jaschke - 2020-06-13

      @Matt: Krylov supports long-range interactions as well as LRK and TDVP,
      since all three of them are based on the MPO (TEBD does not), but Krylov
      has weaknesses evolving from a pre-defined state or in certain sudden
      quench scenarios. For the statics, I would first look at the variance
      (always measured). It gives you an idea of how close you are to an
      eigenstate.

      On Sat, Jun 13, 2020 at 9:29 AM Matthew Jones matjones@users.sourceforge.net wrote:

      Happy to report that Krylov methods should generalize properly to
      long-range interactions.
      I'm going through the scripts you sent me and making some corrections to
      the convergence schemes. These should correct the behavior we're seeing.

      I'll send a more detailed analysis in a follow-up message to this one.
      Thanks for your patience!


      How exact is openmps?
      https://sourceforge.net/p/openmps/discussion/tech/thread/76d596abc1/?limit=25#3d0d


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/openmps/discussion/tech/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Matthew Jones

        Matthew Jones - 2020-06-13

        Thanks for the insight/tip, Daniel! I’ll certainly include some analysis of the variance in my follow up.

        I think I tried the Krylov methods for evolution from a certain state with long-range interactions, and couldn’t get it to converge; so, I drew the wrong conclusion (or when it “did converge” the data was wrong).

        I’ve mostly stuck to LRK and TDVP, and am a bit less familiar with Krylov. The input, here, is greatly appreciated!

         
    • Keyi Liu

      Keyi Liu - 2020-07-15

      Hi Matt,

      Just out of curiosity, has there been any new development since the last update? I do understand this is quite an unusual time with a lot of things going on, so I'm happy to know anything that might be helpful. Thanks a lot in advance.

       
  • Keyi Liu

    Keyi Liu - 2020-06-15

    Hi Matt,

    First off thank you for all the time and effort you put in helping me out. I really appreciate it! Let me know if you need more inputs from me. Looking forward to your analysis.

     
  • Keyi Liu

    Keyi Liu - 2020-06-19
     

    Last edit: Keyi Liu 2020-07-15
  • Matthew Jones

    Matthew Jones - 2020-08-28

    OpenMPS has an exact diagonalization library whose API is nearly identical to our MPS Python library. A benefit associated with this design is that we may declare an MPS simulation, and reuse that declaration. One caveat: not all MPO term keys are supported in the ED library (FiniteFunction for example).

    I rewrote the script you provided so that it uses InfiniteFunction instead (which is a supported term key). Because InfiniteFunction imposes a summation rule that i < j, two terms were added whereby the operators were exchanged.

    The script itself can run the simulation with or without MPS ansatz (I introduced a boolean keyword argument to enable this).

    Attached you will find three figures:
    1. Ground state energy as computed by OpenMPS using variational ground state search with error bars [1].
    2. Ground state energy as computed by OpenMPS using the exact diagonalization submodule.
    3. A plot of ground state energy residuals (MPS v.s. ED).

    Below, I also provide an example of how the InfiniteFunction indexes the 1D lattice to apply the appropriate operators. Namely, these site-local operators are used to construct the total system operator by taking the Kronecker product.

    Note: InfiniteFunction fits the weighting function to a set of exponentials up to a provided tolerance within the finite lattice (L=...).

    Some conclusions:
    1. There is good agreement between MPS methods and ED methods.
    2. MPS methods can be used to study larger systems.
    3. MPS (variational) methods provide a way of measuring numerical error/accuracy when this comparison is not possible.

    My concern is that both methods produce energies that do not agree with your reference text.
    Can you verify my understanding of the system you've presented is correct?

    To me, a logical next step would be to confirm that we're both analyzing the same system numerically (between your ED simulations and the ones presented, here).


    H.AddMPOTerm('InfiniteFunction', ['n', '1'], ...)  # Left
    H.AddMPOTerm('InfiniteFunction', ['1', 'n'], ...)  # Right
    ###########################################
    ## for 5 sites: ###########################
    ## Left ############ | Right ##############
    ## [n, (1), 1, 1, 1] | [(1), n, 1, 1, 1] ##
    ## [n, 1, (1), 1, 1] | [(1), 1, n, 1, 1] ##
    ## [n, 1, 1, (1), 1] | [(1), 1, 1, n, 1] ##
    ## [n, 1, 1, 1, (1)] | [(1), 1, 1, 1, n] ##
    ##                   |                   ##
    ## [1, n, (1), 1, 1] | [1, (1), n, 1, 1] ##
    ## [1, n, 1, (1), 1] | [1, (1), 1, n, 1] ##
    ## [1, n, 1, 1, (1)] | [1, (1), 1, 1, n] ##
    ##                   |                   ##
    ## [1, 1, n, (1), 1] | [1, 1, (1), n, 1] ##
    ## [1, 1, n, 1, (1)] | [1, 1, (1), 1, n] ##
    ##                   |                   ##
    ## [1, 1, 1, n, (1)] | [1, 1, 1, (1), n] ##
    ###########################################
    

    [1] The error values were obtained by grabbing the numerical variance of the ground state from the variational method.

     

    Last edit: Matthew Jones 2020-08-28
    • Keyi Liu

      Keyi Liu - 2020-08-31

      Thank you for the work on top of your busy schedule. I'm in the process of checking my own scripts and will let you know any updates ASAP

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.