2D DMRG with boundary conditions and lattice index
Posted: 22 Mar 2020, 04:58
Hi everyone:
(1) I want to simulate a self-defined 2D lattice with Finite lattice sizes along both the x and y directions. I am not sure how to define the boundary conditions. Is it the right way to define the boundary condition like this:
(2) For the 2D case, we calculate the each site occupation: A = psi.expectation_value('N'). The expectation value A is a 1D list. Whether the list index corresponds to the site index of the lattice indicated by the function ''ax.plot_site()" (For example, the following figure)? E.g., the 11th element A[10] is the occupation at lattice site 10 indicated by the figure.
(1) I want to simulate a self-defined 2D lattice with Finite lattice sizes along both the x and y directions. I am not sure how to define the boundary conditions. Is it the right way to define the boundary condition like this:
Code: Select all
class Mylattice(lattice.Lattice):
def __init__(self, Lx, Ly, siteA, **kwargs)
......
super().__init__([Lx, Ly], [siteA], **kwargs)
class Mymodel(CouplingMPOModel):
def init_lattice(self, model_params):
site = self.init_sites(model_params)
bc_MPS = get_parameter(model_params, 'bc_MPS', 'finite', self.name)
bc_y = get_parameter(model_params, 'bc_y', 'finite', self.name)
order = get_parameter(model_params, 'order', 'default', self.name)
bc_x = 'periodic' if bc_MPS == 'infinite' else 'open'
bc_y = 'periodic' if bc_y == 'cylinder' else 'open'
bc = [bc_x, bc_y]
lat = Mylattice(Lx, Ly, site, order=order, bc=bc, bc_MPS=bc_MPS) # Set Boundary Conditions.