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
how to write a three-site interaction?
-
- Posts: 18
- Joined: 23 Jul 2018, 09:23
- Location: Technical University Munich
Re: how to write a three-site interaction?
Hi! Using the multi-coupling model, you can use the function add_multi_coupling in the following way:
to add the three-body terms in your Hamiltonian. Let's break it down:
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)])
- The first argument (lambda_) is the strength of your coupling.
- 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.
- 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.
- 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).
Last edited by Umberto Borla on 23 Sep 2019, 15:01, edited 1 time in total.
Re: how to write a three-site interaction?
Thanks for the clear answer, Umberto
Just as little side node:
The usual convention is to append an underscore in such a case, i.e., use
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 -
- Posts: 32
- Joined: 08 Jan 2019, 03:03
Re: how to write a three-site interaction?
Thanks for your explanation, Umberto. It's very clear.
-
- Posts: 18
- Joined: 23 Jul 2018, 09:23
- Location: Technical University Munich
Re: how to write a three-site interaction?
@QuichengTang: I'm glad to hear that this was useful.
@Johannes: Thanks for pointing it out, I forgot about it. I fixed it
@Johannes: Thanks for pointing it out, I forgot about it. I fixed it