## N_sweeps_check & unit cell in infinite dmrg

How do I use this algorithm? What does that parameter do?
DK_Lee
Posts: 5
Joined: 05 Jul 2019, 04:59

### N_sweeps_check & unit cell in infinite dmrg

Hi.

I'm using the infinite dmrg in your TeNPy to simulate the spin-1 chain in the external field.
and I fix the length of unit cell as 20 (L=20)

When 'N_sweeps_check'= 10(default) in the gapless phase, the ground state does not converge very well (other dmrg_params are also default except 'chi_max'=200) as the entanglement entropy fluctuates greatly.

So, i change 'N_sweeps_check' as 100 and thereby it converges very well!

It might be a stupid question, but Is there any relation between 'N_sweeps_check' and 'L' to get a good ground state?

Johannes
Posts: 135
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: N_sweeps_check & unit cell in infinite dmrg

In general, the parameter N_sweeps_check should not change the convergence properties - at least not much....
Let's look at what it influences:
• For checking the convergence, DMRG checks the average change of the energy / entropy per sweep in the last N_sweeps_check steps.
• The parameter update_env defaults to half of N_sweeps_check.
Did you set this parameter explicitly?
update_env defines how many sweeps we do without changing the state to converge the environment, every N_sweeps_check sweeps before checking the convergence.
In general, a large number of update_env is needed if you have a large correlation length. Also, it helps to get back into canonical form; what's the "norm_error" reported by DMRG?

DK_Lee
Posts: 5
Joined: 05 Jul 2019, 04:59

### Re: N_sweeps_check & unit cell in infinite dmrg

I was a bit late to check it.

As you mentioned above, 'nomr_error' is larger than 1.00e-05 and "UserWarning" pops up when 'N_sweeps_check'=1.
On the other hand, the case of 'N_sweeps_check'=100 is not.

In addition, while checking dmrg_params in tenpy.algorithms.dmrg,

Code: Select all

        while True:
# check convergence criteria
if self.sweeps >= max_sweeps:
break
if (self.sweeps > min_sweeps and -Delta_E < max_E_err * max(abs(E), 1.)
and abs(Delta_S) < max_S_err):

I found that the last line in above code is not abs(Delta_S) < max_S_err * S , i.e., S is not included.

So, is it fine to miss S? or is it typo?

Johannes