Page 1 of 1

Different ways to run DMRG on a finite cylinder geometry

Posted: 04 Oct 2021, 13:21
by Ozaru9000
Hi! I want to run a DMRG for a given model on a cylinder, and then compare the obtained results with the same model, but run on a torus. From what I understood from documentation, there is a couple of ways, in which I can obtain a cylinder geometry (examples for the Honecomb lattice and SpinModel):

1) A finite lattice with open boundary conditions and a model with bcx="open" and bcy="cylinder":

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=Lx, Ly=Ly, sites=spinSite)
model_params = {
        "lattice": lattice,
        "bc_MPS": "finite",
        "bc_x": "open",
        "bc_y": "cylinder",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG
2) A finite lattice with open boundary conditions and a model with bcx="periodic" and bcy="ladder" (the 1st example rotated by 90 degrees):

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=Lx, Ly=Ly, sites=spinSite)
model_params = {
        "lattice": lattice,
        "bc_MPS": "finite",
        "bc_x": "periodic",
        "bc_y": "ladder",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG

3) A finite lattice with bc=['open', 'periodic'] and a model with bcx="open", bcy="cylinder":

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=Lx, Ly=Ly, sites=spinSite, bc=['open', 'periodic'])
model_params = {
        "lattice": lattice,
        "bc_MPS": "finite",
        "bc_x": "open",
        "bc_y": "cylinder",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG
4) A finite lattice with bc=['periodic', 'open'] and a model with bcx="periodic", bcy="ladder" (the 3rd example rotated by 90 degrees):

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=Lx, Ly=Ly, sites=spinSite, bc=['open', 'periodic'])
model_params = {
        "lattice": lattice,
        "bc_MPS": "finite",
        "bc_x": "periodic",
        "bc_y": "ladder",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG

Would I obtain the same groundstate by running all of the above examples? If so, what is the difference between them?

Finally, if I want to run the same model on a torus I would just need to launch the following code?

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=Lx, Ly=Ly, sites=spinSite, bc='periodic')
model_params = {
        "lattice": lattice,
        "bc_MPS": "finite",
        "bc_x": "periodic",
        "bc_y": "periodic",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG

Re: Different ways to run DMRG on a finite cylinder geometry

Posted: 11 Oct 2021, 20:18
by Johannes
Whatch out! The model parameters bc_MPS, bc_x, bc_y are only used if you don't specify the lattice instance directly, since the lattice instance already has the boundary conditions!

Code: Select all

model_params = {
        "S": 0.5,
        "conserve": "Sz",
        "lattice": 'Honeycomb',
        "Lx": 10,
        "Ly": 3,
        "bc_MPS": "finite",
        "bc_x": "open",
        "bc_y": "cylinder",
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG
is equivalent to (notice that we don't define the lattice/site parameters in the model again!)

Code: Select all

spinSite = SpinSite(S=0.5, conserve='Sz')
lattice = Honeycomb(Lx=10, Ly=3, sites=spinSite, bc=['open', 'periodic'], bc_MPS='finite')
model_params = {
        "lattice": lattice,
        "Jx": 1.0,
        "Jy": 1.0,
        "Jz": 1.0,
    }
model = SpinModel(model_params)
# And then run DMRG
In total, you have 3 boundary condtions for a 2D lattice:
  1. bc_MPS: whether you use a 'finite' or 'infinite' MPS. A finite MPS will just have the number of sites given by the lattice, Lx*Ly*len(lattice.unit_cell), see N_sites.
    The infinite MPS will repeat the specified lattice (and couplings) in x-direction.
    Note that the MPS (in TeNPy) always has open boundary conditions, it never forms a loop.
  2. bc_x: whether the couplings in x direction be 'periodic' or 'open'.
    For infinite MPS, this should always be 'periodic', because otherwise you end up with decoupled unit cells.
    For finite MPS, it can be 'periodic' or 'open', where 'open' is usually recommended. 'periodic' adds long range couplings from x=0 to x=(Lx-1).
  3. bc_y: In the lattice itself, this is also just 'open' or 'periodic'. To clarify this a bit more, these couplings are named 'ladder' (=open) or 'cylinder' (=periodic) in the CouplingMPOModel.init_lattice.
    I just pushed 22e27739a4 which allows to explicitly use "periodic" or "open" for bc_y as well.
For a finite cylinder, you thus need:

Code: Select all

bc_MPS='finite', bc_x='open', bc_y='cylinder'
For an infinite cylinder, you need:

Code: Select all

bc_MPS='infinite', bc_x='periodic', bc_y='cylinder'
The default of bc_x thus depends on bc_MPS, but you can overwrite it to bc_x='periodic' for the finite MPS to force torus boundary conditions.

In general, you can also use bc_MPS='finite', bc_x='periodic', bc_y='ladder' to get a cylinder with the axis in y-direction, i.e. your example 2. But I strongly discourage this because of the way the MPS winds by default (first in y, then in x-direction): you need a bond dimension exponentially large in Ly to keep truncation errors constant!

Re: Different ways to run DMRG on a finite cylinder geometry

Posted: 13 Oct 2021, 11:47
by Ozaru9000
Thank you for the answer. That clarifies everything!