## Alternating Heisenberg coupling at infinite chain

How do I use this algorithm? What does that parameter do?
Yu-Jie Liu
Posts: 1
Joined: 03 May 2022, 13:52

### Alternating Heisenberg coupling at infinite chain

Hi,

I wanted to implement infinite DMRG to solve an alternating Heisenberg chain with nearest neighbour couplings J_ on the even and J on the odd sites. I created a CouplingModel class and used

Code: Select all

self.add_coupling([J_, J],0,"Sigmaz",0,"Sigmaz",[1])
self.add_coupling([J_,J], 0,"Sigmay",0,"Sigmay",[1])
Is this correct? I only specify the coupling strengths for the first two sites but my understanding is TeNPy will lift this to fill the entire chain.

Thanks,
Yu-Jie
Johannes
Posts: 337
Joined: 21 Jul 2018, 12:52
Location: TU Munich

### Re: Alternating Heisenberg coupling at infinite chain

Hi,
yes, that is correct. It works if the number of couplings is even (ie. odd number of sites for finite systems, even number of sites for infinite MPS) , otherwise it complains about incommensurate arrays for the expansion.
Inderpreet Kaur
Posts: 2
Joined: 25 Apr 2022, 13:47

### Re: Alternating Heisenberg coupling at infinite chain

Hi, I am very new to tenpy. I am sorry if answer to this question is already there but I could not find any particular solution anywhere. I need to incorporate alternate strengths in one term of the Hamiltonian and compute it's ground state using the finite matrix-product state (MPS) representation. If I consider even coupling and even number of sites, then for e.g., the following statement works fine:

It is also according to the following link,

However, I am getting incommensurate error when I consider odd number of sites and finite MPS, opposite to what you have suggested in the previous comment. Can you please suggest, if there is any solution when one considers odd number of sites and finite MPS (with the motivation that the strengths of coupling is symmetric throughout the whole chain if one considers open boundaries)?
Johannes
Posts: 337
Joined: 21 Jul 2018, 12:52
Location: TU Munich

### Re: Alternating Heisenberg coupling at infinite chain

I don't see the issue here, I checked that it works for an even number of couplings, where the couplings are not incommensurable.
For nearest neighbor couplings A_i B_{i+1}, this means it works for (finite, odd # sites) or (infinite, even # sites), as you can easily check with the example below. Note that if you have next-nearest neighbors, this behaviour switches - then (finite, even # sites) or (infinite, odd # sites) work.

Code: Select all

import tenpy
from tenpy.models.xxz_chain import XXZChain2

class AltXXZChain(XXZChain2):

def init_terms(self, model_params):
Jz = model_params.get('Jz', 0.)
Jz1 = model_params.get('Jz1', 1.5)
Jz2 = model_params.get('Jz2', 0.5)
super().init_terms(model_params)
for u1, u2, dx in self.lat.pairs['nearest_neighbors']:
self.add_coupling([Jz1, Jz2], u1, 'Sz', u2, 'Sz', dx)

#  Mfineven = AltXXZChain({'L': 8, 'bc_MPS': 'finite'}) # errors
Mfinodd = AltXXZChain({'L': 7, 'bc_MPS': 'finite'})
Minfeven = AltXXZChain({'L': 8, 'bc_MPS': 'infinite'})
#  Minfodd = AltXXZChain({'L': 7, 'bc_MPS': 'infinite'}) # errors

Inderpreet Kaur wrote: 18 May 2022, 10:30 Can you please suggest, if there is any solution when one considers odd number of sites and finite MPS (with the motivation that the strengths of coupling is symmetric throughout the whole chain if one considers open boundaries)?
An odd number of sites for finite MPS with oben boundary conditions has an *even* number of couplings, so it is not symmetric over a bond, the bond strength for L=5 sites would be [strong, weak, strong, weak].
If you want an *even* number of sites, e.g., L=6 with bonds [strong, weak, strong, weak, strong, you can explicitly set all the terms in the array by expanding the couplings to the corresponding shapes yourself:

Code: Select all

class AltXXZChainIncom(XXZChain2):
def init_terms(self, model_params):
Jz = model_params.get('Jz', 0.)
Jz1 = model_params.get('Jz1', 1.5)
Jz2 = model_params.get('Jz2', 0.5)
super().init_terms(model_params)
for u1, u2, dx in self.lat.pairs['nearest_neighbors']:
coupling_shape, _ = self.lat.coupling_shape(dx)
strength = to_array([Jz1, Jz2], coupling_shape, allow_incommensurate=True)
self.add_coupling(strength, u1, 'Sz', u2, 'Sz', dx)

iMfineven = AltXXZChainIncom({'L': 8, 'bc_MPS': 'finite'}) # does not error
iMfinodd = AltXXZChainIncom({'L': 7, 'bc_MPS': 'finite'})
iMinfeven = AltXXZChainIncom({'L': 8, 'bc_MPS': 'infinite'})
iMinfodd = AltXXZChainIncom({'L': 7, 'bc_MPS': 'infinite'}) # does not error

Inderpreet Kaur
Posts: 2
Joined: 25 Apr 2022, 13:47

### Re: Alternating Heisenberg coupling at infinite chain

Thanks so much for your help and for providing a detailed reply. It helped a lot!