If/How to avoid: "final DMRG state not in canonical form..."

How do I use this algorithm? What does that parameter do?
Post Reply
xaver
Posts: 7
Joined: 23 Apr 2021, 07:51

If/How to avoid: "final DMRG state not in canonical form..."

Post by xaver »

I'm trying to run finite system dmrg on a spin model with multi-site exchange, i.e. with coupling terms of type \(J_{\alpha_1\dots\alpha_r} S^{\alpha_1}_{i_1}\dots S^{\alpha_r}_{i_r}\). In my case, I can have \(r=2,4,6\) spins involved. The Hamiltonian is hermitean. I should clearly state, that I'm a noob with tenpy.

I've set up a model mm. I'm using 'bc':'periodic' boundary conditions for my lattice. For the mps I'm using 'bc_MPS':'finite'.

Prior to dmrg, and for checks I've used ExactDiag.from_H_mpo, build_full_H_from_mpo, full_H.to_ndarray to extract the full Hamiltonian on some small system, to independently compare it with the Hamiltonian 'on a piece of paper'. At this level, things seem all ok.

Then I set up a psi = MPS.from_product_state and run dmrg with out = dmrg.run(psi,mm,dmrg_params), where

Code: Select all

dmrg_params={
    'mixer': True, 
    'max_E_err': 1.e-10,
    'trunc_params': {
        'chi_max': 200, # I've used various values here up to 300
        'svd_min': 1.e-10        
        }
    }
Already for rather small systems, with \(L\lesssim10\) unit cells, I start to get

Code: Select all

final DMRG state not in canonical form up to norm_tol=1.00e-10: norm_err=xyz
With increasing \(L\), say \(\sim 50\), and depending on the model's parameters, the actual size of norm_err will 'easily' go up to \(O(1)\).
  • My first problem is, that I have no idea, if this issue is devastating, just a warning, or totally irrelevant for a user's perspective? If I do psi.test_sanity() after the dmrg run, it raises no error. Moreover some of the anticipated dmrg output, including some 1st operator's expectation values seem ok. ... hopefully.
  • My second problem is, that I have no idea how to get rid of this issue - if indeed one should? Playing with the value of chi_max does not really help and it is unclear to me anyway if that is direction into which to look. Adding things like 'norm_tol_iter': 500 and 'norm_tol': 1.e-10 to dmrg_params does not 'do' anything. (Additionally, something happens, which I don't understand at all , namely, when I use the in-place-solution for psi from a dmrg run as a starting state for a run with identical parameters, I still get the same norm_err issue.)
Any help would be most appreciated.
Xaver

PS.: Certainly I have tried to understand SciPost Phys. Lect. Notes 5, tenpy.readthedocs.io, and the discussion in this post ... but obviously in vain.
User avatar
Johannes
Site Admin
Posts: 316
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

Re: If/How to avoid: "final DMRG state not in canonical form..."

Post by Johannes »

You shouldn't trust expectation values/correlation functions that were calculated from an MPS that is not in canonical form, because these functions implicitly assume that psi is in canonical form.
When your DMRG is really converged and doesn't change the state during the sweep any more, you would expect that it ends up in canonical form.
Hence the warning: something might be wrong. The threshold of "what is an acceptable norm error" is given by the norm_tol parameter.
If DMRG notices that the error is larger than `norm_tol`, it raises the warning, and it brings the state to canonical from, by just calling `psi.canonical_form()`. For finite MPS, this is a numerically exact procedure that doesn't change the represented MPS; for infinite MPS it can however change the state much more than just by machine precision. The norm_tol_iter parameter is only used for infinite MPS.

Do you have multiple degenerate ground states? Maybe with a finite-size gap that goes below machine precision/truncation error for larger L?
In that case, DMRG might not converge because it's jumping between different solutions. Or is your system even gapless?
xaver
Posts: 7
Joined: 23 Apr 2021, 07:51

Re: If/How to avoid: "final DMRG state not in canonical form..."

Post by xaver »

Thx. for replying! I did already spend a lot more time playing around, and indeed, 'my' model has a parameter range to which your suggestion
Johannes wrote: 08 Jun 2021, 02:49 Do you have multiple degenerate ground states?
exactly applies. I was unaware of that property :o . I.e, tenpy gave me a gentle hint :oops: Stupidly, I was running all my tests exactly in that parameter range. Once, out of that range, or slightly breaking the related symmetry, the norm_err dropped below the default threshold (...mostly). I hope that solves my issue.

Anyway, in view of your reply, maybe you'll also find time sometime to elaborate on what one should expect from tenpy in case of
Johannes wrote: 08 Jun 2021, 02:49 Or is your system even gapless?
Say, one would like to have some fun, doing (i)dmrg on a non-interacting 1D tight-binding spin-less fermion system at some finite filling (or just the XY chain), trying to reach the thermodynamic limit. While one certainly does not need dmrg for that, does your remark also imply 'some' remedy for such cases? Or would (i)dmrg get inapplicable?
pasa
Posts: 20
Joined: 09 Mar 2020, 12:45

Re: If/How to avoid: "final DMRG state not in canonical form..."

Post by pasa »

Hi Johannes,

First of all Merry Christmas and hope you are doing healthy and fine.

I think I am encountering a similar situation as the one you suggested in this comment: The system I am studying is gapless. I am calculating the ground state of a 3-local Hamiltonian (spin operators acting on three consecutive sites) which is expected to be gapless in a certain regime. Moreover, I am using infinite DMRG and to help the convergence of the algorithm I: (i) used the 'start_env' option, (ii) use the chi_list option as well, and (iii) group consecutive sites. Nevertheless, and while I apparently find no warnings, the result cannot be in canonical form as the results I am getting for two-point connected correlations functions are not correct: They do not decay to zero.

Could it be that after I use psi.group_split(), the state is not in canonical form (I did the sanity check but apparently, unless I did something wrong, everything was fine)?

Thanks.

Pablo
User avatar
Johannes
Site Admin
Posts: 316
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

Re: If/How to avoid: "final DMRG state not in canonical form..."

Post by Johannes »

Hi Pablo,
I hope you also had some nice holidays and wish you a happy new year!

The log files should report the "norm_error" - is it close to zero in your case?
You can also explicitly check the output of norm_test to check whether the state is in in canonical form. (To be clear, psi.test_sanity() does not check this.)

May the two-point correlations don't decay for another reason? Are you sure you don't have symmetry breaking, maybe even just induced by the finite bond dimension?
Post Reply