## Lattice with different spins

How do I use this algorithm? What does that parameter do?
shelder
Posts: 2
Joined: 22 Sep 2020, 22:18

### Lattice with different spins

Hello,

I am interested in implementing a model which has all sites on the lattice with S=1/2, except for one which has S=1. Or, if possible, I would like to specify which sites have S=1/2, and which have S=1 (possibly more than one). Is there any way to do this in TeNPy? I am currently using CouplingModel to implement the case with all spins S=1/2, as shown below, for a honeycomb lattice with a two-site basis. If there is any way I can modify this to specify different spins on selected sites, this would be a great help.

Code: Select all

class Kitaev(CouplingModel, NearestNeighborModel, MPOModel):
def __init__(self, Lx=Lx_val, Ly=Ly_val, Jx=Jx_val, Jy=Jy_val, Jz=Jz_val, g=g_val, bc_MPS="finite"):
site1 = SpinSite(S=0.5, conserve=None)
site2 = SpinSite(S=0.5, conserve=None)
sites = [site1, site2] # Two sites in the unit cell for honeycomb
lat = Honeycomb(Lx, Ly, sites, bc=["open", "open"], bc_MPS="finite")
CouplingModel.__init__(self, lat)

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

### Re: Lattice with different spins

The tenpy.models.lattice.IrregularLattice is doing exactly what you want.
The idea is that you first generate the regular lattice (in your case a Honeycomb lattice) and then add/replace the extra site(s) for the Spin-1.

If you want to conserve e.g. the total Sz, or the Sz of the spin-1/2 sites, you can do so by using tenpy.networks.site.set_common_charges.

Take a look at the examples provided under the above links, and let me know if it is still unclear afterwards
shelder
Posts: 2
Joined: 22 Sep 2020, 22:18

### Re: Lattice with different spins

Hello Johannes,

Thanks very much for your reply. I am now using IrregularLattice, and I am able to add and remove sites from the regular lattice at a chosen location. However, I'm still unsure how to specify the spin value of the added site. In my code below, I start with a regular honeycomb lattice of spin-1/2 sites, and remove one site. I then add a site in the same place, which I want to be spin-1. I know that I can specify a general spin S site using SpinSite ("newsite" in my code), but is there a way to specify this to be the added site?

Code: Select all


Lx_val = 3
Ly_val = 3
Jx_val = 4.0
Jy_val = 4.0
Jz_val = 4.0
g_val = 0.0

class Kitaev(CouplingModel, NearestNeighborModel, MPOModel):
def __init__(self, Lx=Lx_val, Ly=Ly_val, Jx=Jx_val, Jy=Jy_val, Jz=Jz_val, g=g_val, bc_MPS="finite"):
site1 = SpinSite(S=0.5, conserve=None)
site2 = SpinSite(S=0.5, conserve=None)
sites = [site1, site2] # Two S=1/2 sites in the unit cell for regular honeycomb lattice

newsite = SpinSite(S=1.0, conserve=None) # The S=1 site I want to add in place of a S=1/2 site

# Specify a regular honeycomb lattice of S=1/2 sites
regular_lat = Honeycomb(Lx, Ly, sites, bc=["periodic", "periodic"], bc_MPS="finite")

# Remove one site (from middle of cluster)
irregular_lat = lattice.IrregularLattice(regular_lat, remove=[1, 1, 1], add=None)

# Add one site (in the same spot). How to specify "newsite", or S=1?
irregular_lat2 = lattice.IrregularLattice(irregular_lat, remove=None, add=([[1, 1, 1]], [9]))

# Initialize CouplingModel with this modified lattice
CouplingModel.__init__(self, irregular_lat2)


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

### Re: Lattice with different spins

Sure! just add the extra site into the unit cell. Since there are already two sites in the unit cell, it will get the unit-cell index 2,
so you can specify the new added site to be [1, 1, 2] instead of [1, 1, 1].

You can do the whole process in a single step:

Code: Select all

irregular_lat = lattice.IrregularLattice(regular_lat, remove=[1, 1, 1], add=([[1, 1, 2]], [9]),

The add_positions specifies the position inside the unit cell such that plotting the lattice, e.g. with irregular_lat.plot_sites(plt.gca()) works as expected.