### 01_dmrg.ipynb but with periodic boundary conditions

Posted:

**21 Sep 2022, 19:09**I am trying out DMRG for the first time in Google Colab with Tenpy. After adding a cell with I am able to run 01_dmrg.ipynb from https://tenpy.readthedocs.io/en/latest/ ... _dmrg.html. It runs well and it's really nice to see the output!

One thing I noticed is that the central charge fitting, using the default exclude=None to drop 100/4=25 sites from the left and right boundaries, gives a central charge of .508 instead of .5. That's of course a small enough error to confidently know that the central charge is .5, but I've noticed that in exact-diagonalization of the transverse-field ising model in periodic chains, I can get closer to .5 at smaller system sizes.

For example, for L=20 with sparse extraction of the ground state in a periodic TFIM, I get that fitting $c/3 \log(\frac{L}{\pi} \sin(\pi l/L)+\text{const}$ gives me c=.5008 - an order of magnitude better error for a smaller system size. The smallest subsystem size I include has three spins, which is also fractionally smaller than the default exclude of tenpy.tools.fit.central_charge_from_S_profile.

Since the 01_dmrg code is for an open chain, I want to see whether I can get even closer to c=.5 with a periodic chain and larger system sizes than I access with exact diagonalization. I recognize that Tenpy is primarily designed for open MPS which can be put in canonical form, and so that periodic boundary conditions involve long-range couplings and bond dimensions being squared. Even given this, I would like to try to make a version of 01_dmrg for periodic boundary conditions with the dream of L=100 but maybe more realistically L=40. I read that I will need to put bc_x in the model params to 'periodic', and so I am trying to run the following code:

However, I receive the error How can I fix this error? I anticipate I maybe need to set some additional parameters in the model_params or perhaps make my own model.

Code: Select all

`!pip install physics-tenpy,`

One thing I noticed is that the central charge fitting, using the default exclude=None to drop 100/4=25 sites from the left and right boundaries, gives a central charge of .508 instead of .5. That's of course a small enough error to confidently know that the central charge is .5, but I've noticed that in exact-diagonalization of the transverse-field ising model in periodic chains, I can get closer to .5 at smaller system sizes.

For example, for L=20 with sparse extraction of the ground state in a periodic TFIM, I get that fitting $c/3 \log(\frac{L}{\pi} \sin(\pi l/L)+\text{const}$ gives me c=.5008 - an order of magnitude better error for a smaller system size. The smallest subsystem size I include has three spins, which is also fractionally smaller than the default exclude of tenpy.tools.fit.central_charge_from_S_profile.

Since the 01_dmrg code is for an open chain, I want to see whether I can get even closer to c=.5 with a periodic chain and larger system sizes than I access with exact diagonalization. I recognize that Tenpy is primarily designed for open MPS which can be put in canonical form, and so that periodic boundary conditions involve long-range couplings and bond dimensions being squared. Even given this, I would like to try to make a version of 01_dmrg for periodic boundary conditions with the dream of L=100 but maybe more realistically L=40. I read that I will need to put bc_x in the model params to 'periodic', and so I am trying to run the following code:

Code: Select all

```
L = 100
model_params = {
'J': 1. , 'g': 1., # critical
'L': L,
'bc_x': 'periodic',
'bc_MPS': 'finite',
}
M = TFIChain(model_params)
```

Code: Select all

`ValueError: Can't give nearest neighbor H_bond for long-range 0-99`