Heisenberg XXZ chain with stagger interaction

General discussions on the ideas behind the algorithm.
Post Reply
ling
Posts: 1
Joined: 23 Jul 2021, 06:42

Heisenberg XXZ chain with stagger interaction

Post by ling »

Hi, happy new day!
I try to use tenpy to calculate the entropy of Heisenberg XXZ chain (open boundary) with alternating interaction.
Hailtonian:\(H=\sum_{i=1}^{L} {J ( 1 + \gamma (-1)^{i} ) (S_{i}^{x} S_{i+1}^{x} + S_{i}^{y} S_{i+1}^{y} + J_{z} S_{i}^{z} S_{i+1}^{z})}\)
This is my program.

Code: Select all

from tenpy.models.lattice import Site, Chain
from tenpy.models.model import CouplingModel, MPOModel, CouplingMPOModel, NearestNeighborModel
from tenpy.tools.params import asConfig
from tenpy.networks.site import SpinHalfSite
from tenpy.linalg import np_conserved as npc
import numpy as np

from lattice import StaggerLadder

class StaggerLineModel(CouplingMPOModel):
    def __init__(self, model_params={}):
        model_params = asConfig(model_params, "StaggerLadderModel")
        L = model_params.get('L', 4)
        bc_MPS = model_params.get('bc_MPS', 'finite')
        site = SpinHalfSite(conserve=None)
        bc = 'periodic' if bc_MPS == 'infinite' else 'open'
        lat = StaggerLadder(L, site, bc=bc, bc_MPS=bc_MPS)
        model_params.setdefault('lattice', lat)
        self.params = model_params
        CouplingMPOModel.__init__(self, model_params)

    def init_sites(self, model_params):
        return SpinHalfSite(conserve=None)

    def init_terms(self, model_params):
        J = model_params.get('J', 1.)
        Jz = model_params.get('Jz', 1.)
        gamma = model_params.get('gamma', 0.2)
        h = model_params.get('hz', 0.)
        # add terms
        for u1, u2, dx in self.lat.pairs['J1']:
            self.add_coupling((1 - gamma)*(J) , u1, 'Sx', u2, 'Sx', dx)
            self.add_coupling((1 - gamma)*(J) , u1, 'Sy', u2, 'Sy', dx)
            self.add_coupling((1 - gamma)*Jz*J, u1, 'Sz', u2, 'Sz', dx)        
        for u1, u2, dx in self.lat.pairs['J2']:
            self.add_coupling((1 + gamma)*(J) , u1, 'Sx', u2, 'Sx', dx)
            self.add_coupling((1 + gamma)*(J) , u1, 'Sy', u2, 'Sy', dx)
            self.add_coupling((1 + gamma)*Jz*J, u1, 'Sz', u2, 'Sz', dx)        
        for u in range(len(self.lat.unit_cell)):
            self.add_onsite(h, u, 'Sz')

 
I find that when the anosptropic parameter J_{z} increases to more bigger value (e.g. J_{z}=3.4), an error will occur. Is this because my program parameter setting is wrong? Or is it because the symmetry of the system makes it impossible to find the correct ground state? What should I do?
Looking forward to your reply.
User avatar
Johannes
Site Admin
Posts: 282
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

Re: Heisenberg XXZ chain with stagger interaction

Post by Johannes »

What error do you get? Can you please include the error traceback? Otherwise I can only guess what the problem might be....

It seems strange that it works for smaller J_z, but not for larger one.

By the way, you can actually do this without implementing a custom lattice/model, just based on the tenpy SpinChain.
The coupling strengths can be a numpy array that varies spatially, so you can do something like

Code: Select all

alternate = np.ones(L-1)  # there 
alternate[::2] = -1
Jx = Jy = J*(1+gamma*alternate)
Jz = J*Jz *(1+gamma*alternate)
hz = 1.
model_params = {'L': L, 'bc_MPS': 'finite', 'Jx': Jx, 'Jy': Jy, 'Jz': Jz, 'hz': hz}
model = SpinChain(model_params)
Post Reply