how to write a three-site interaction?

How do I use this algorithm? What does that parameter do?
Post Reply
QichengTang
Posts: 26
Joined: 08 Jan 2019, 03:03

how to write a three-site interaction?

Post by QichengTang »

Hi everyone,

I'm confused how to write a three-site interaction? I have read the example of toric code, but I donnot understand.
If I want to write a O’Brien-Fendley model
\(H=\sum_{j=1}^N [-\sigma^z_{j}\sigma^z_{j+1}-\sigma^x_{j}+\lambda(\sigma^x_{j}\sigma^z_{j+1}\sigma^z_{j+2}+\sigma^z_{j}\sigma^z_{j+1}\sigma^x_{j+2})]\)
How to write the last two three-site terms?

Thanks,
Qicheng

Umberto Borla
Posts: 15
Joined: 23 Jul 2018, 09:23
Location: Technical University Munich

Re: how to write a three-site interaction?

Post by Umberto Borla »

Hi! Using the multi-coupling model, you can use the function add_multi_coupling in the following way:

Code: Select all

self.add_multi_coupling(lambda_, 0, "Sigmax", [(0, "Sigmaz", 1), (0, "Sigmaz", 2)])
self.add_multi_coupling(lambda_, 0, "Sigmaz", [(0, "Sigmaz", 1), (0, "Sigmax", 2)])
to add the three-body terms in your Hamiltonian. Let's break it down:
  1. The first argument (lambda_) is the strength of your coupling.
  2. The second argument (0) is the position within a unit cell where you want to place your operator. Since in your case the unit cell is only one site, this will always be 0 for you. More complicated systems might have a unit cell formed by multiple states, in which case you need to specify where your operator is to be placed. For example, if the unit cell is formed by a fermion and a spin site, you must put spin operators like "Sigmaz" on the second site of the unit cell and the argument would be 1.
  3. The third argument is the operator you want to put in the position just specified. The positions of the other operators that you will put (the ones that go inside the square brackets) are calculated relatively to the operator defined here.
  4. The fourth argument is a list of tuples [(p1, o1, dx1), (p2, o2, dx2), ...]. Each tuple specifies an operator that you want to add in the following way: the first element p is the position of the operator within the unit cell, exactly as explained in point 2. So in your case this is again always 0. The second element is the name of the operator that you want to add. The third element is the distance (number of unit cells, in general!) of the operator from the operator specified initially. In your case you want to add one operator one the nearest neighbour site, so dx1 = 1, and one more operator on the next nearest neighbour site, so dx2=2).
I hope that this was helpful. Please write again if something is not clear yet :)
Last edited by Umberto Borla on 23 Sep 2019, 15:01, edited 1 time in total.

User avatar
Johannes
Site Admin
Posts: 127
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

Re: how to write a three-site interaction?

Post by Johannes »

Thanks for the clear answer, Umberto :)

Just as little side node: lambda is a special keyword in python.
The usual convention is to append an underscore in such a case, i.e., use lambda_ instead as a variable name ;-)

QichengTang
Posts: 26
Joined: 08 Jan 2019, 03:03

Re: how to write a three-site interaction?

Post by QichengTang »

Thanks for your explanation, Umberto. It's very clear.

Umberto Borla
Posts: 15
Joined: 23 Jul 2018, 09:23
Location: Technical University Munich

Re: how to write a three-site interaction?

Post by Umberto Borla »

@QuichengTang: I'm glad to hear that this was useful.

@Johannes: Thanks for pointing it out, I forgot about it. I fixed it ;)

Post Reply