Page 1 of 1

About four-site coupling terms

Posted: 26 Sep 2019, 19:19
by zzwszj
Hello,

I am new to the TeNPy. Now I have a Hamiltonian with four-site coupling terms. For example, like J, u1, ' Sz', u2, 'Sz', u3, 'Sz', u4, 'Sz', where u1, u2, u3, and u4 are different. I search the guide and find add_coupling can not deal with it. Does the TeNPy can do the four different sites coupling terms?

Thanks in advance.

Re: About four-site coupling terms

Posted: 27 Sep 2019, 07:22
by Johannes
Welcome!

There is a way to add such couplings, namly with add_multi_coupling of the tenpy.models.model.MultiCouplingModel instead of just the add_coupling of the tenpy.models.model.CouplingModel.
The tenpy.models.toric_code.ToricCode is an example where this is used.

Take a look at this topic for more explanations on the add_multi_coupling.

Does this help? ;)

Re: About four-site coupling terms

Posted: 30 Sep 2019, 13:59
by zzwszj
Thanks, it helps!