## Multiple sites to combine charges

How do I use this algorithm? What does that parameter do?
steven_tao
Posts: 12
Joined: 11 Mar 2020, 01:07

### Multiple sites to combine charges

Hi TeNPy community,

If I have a 1D chain, each unit cell contains three sublattices: two bosons and one spin. "Two bosons" here refers to one boson with pseudo spins (or two species bosons). In the simulation, I want to fix the number of both bosons (For each boson, we set a fixed number, as the same case of spin-1/2 fermion with both "N" and "Sz" conservations). To self define the lattice structure, how we can set the "site.multi_sites_combine_charges() " for boson and spin? Is it ok for the below example:

Code: Select all

class Model(lattice.Lattice):
def __init__(self, Lx, siteA, siteB, siteC, **kwargs):
site.multi_sites_combine_charges([siteA, siteC])   #  siteA for Boson with pseudo spin up; siteB for Boson with pseudo spin down
site.multi_sites_combine_charges([siteB, siteC])   #  siteC for spin
super().__init__([Lx], [siteA, siteB, siteC], **kwargs)

class BosonSin(CouplingMPOModel):
def init_lattice(self, model_params):
siteA = BosonSite(Nmax=2, conserve='N')
siteB = SpinHalfSite(None)
lat = Model(Lx, site[0], siteA, siteA, siteB, order=order, bc=bc_x, bc_MPS=bc_MPS)
If I use the following way

Code: Select all

site.multi_sites_combine_charges([siteA, siteB, siteC])
, an error occurs. Why?

In the simulation, how I can keep number conservations for bosons A and B?

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

### Re: Multiple sites to combine charges

So you have 3 separate conserved quantities: number of A bosons siteA, number of bosons siteB, spin SiteZ?
The charges for the siteA and siteB need to be different, so you can't pass the very same Site-instance.
I expect the following to work:

Code: Select all

class BosonSin(CouplingMPOModel):
def init_lattice(self, model_params):
siteA = BosonSite(Nmax=2, conserve='N')
siteB = BosonSite(Nmax=2, conserve='N')
siteC = SpinHalfSite(conserve='Sz')
site.multi_sites_combine_charges([siteA, siteB, siteC])
lat = lattice.Lattice([Lx], [siteA, siteB, siteC], order=order, bc=bc_x, bc_MPS=bc_MPS)

If just the total number of bosons is conserved, you would instead use something like

Code: Select all

site.multi_sites_combine_charges([siteA, siteB, siteC], same_charge=[(0, 'N'), (1, 'N')])

If the spin Sz is not conserved, just use SpinHalfSite(conserve=None).