DMRG for 2D Binary Spin-Lattice with a Specific Type of Hamiltonian (Julia)

Hello,
I am quite new to Julia and ITensros lib and tensor networks overall. I have been studying them for a couple of weeks, yet I have some questions which I couldn’t resolve on my own. Sorry, if some of the questions are already mentioned in the documentation but couldn’t get the intuitive idea from there.

1) I want to approximate a 2D spin-lattice with dmrg. Spins are binary as 1 or 0. Is there a default configuration for this? If not, How can I define this from scratch?

2) This is one of the components I have in the Hamiltonian. Is it possible to define this with OpSum() and ampo? 3) I have some other components in the Hamiltonian very similar to this one. How can I create H = H1 + H2 + H3 for the overall Hamiltonian?

Hope I did not violate any rules. I am working on this for a project, so this is not a homework or exam problem. In case the image link is not working, I am adding one more: commented by (64.7k points)
Hi thanks for the question. For part (1), yes we have two types of site indices that can work for your case. They are the “S=1/2” site type or the “Qubit” site type. Formally these are equivalent (just an index with a dimension of 2) but the practical differences are that they use different conventions like the states of the Qubit are called “0” and “1” whereas for “S=1/2” they are called “Up” and “Dn”.

We need to make a more comprehensive introduction about this, but you can see many examples of the siteinds function in places like here:
https://itensor.github.io/ITensors.jl/dev/examples/DMRG.html
All the siteinds function does is return a Julia array of indices of the requested type. So if you change “S=1” to either “S=1/2” or “Qubit” you will get the kind of indices you want.

Regarding your other questions, I was able to view your link with the Hamiltonian definition. However, I am not sure how the “s” operator is defined and what “e” means etc (I have some guesses but not really 100% sure) so if you could please provide more details it would be helpful.

Overall, our system for making Hamiltonians expects a sum of products of local operators. So in your case, you would need to compute the overall square (power of 2) in your Hamiltonian to expand the whole thing as a sum for it to be ready to be input to our system.

Hope that helps you get started - we can discuss more.

Miles
commented by (130 points)
edited by
Sorry for the inconvenience,

edit: opening the squares is not feasible I think, since there is a square term with a double summation. This introduces a square term with N^2 local spin.

The density matrix has the dimension NxN^2 and there is a certain pattern in it that will be defined by the hamiltonian. So, S is the spin at the location (i)'th row and (e+m*N)'th column. So, m, i, and e for just indexing. To be more simple I didn't go into the conceptual background of them. If you think it is necessary I can reveal more about them.

Also, I have some prework for flatten this density matrix and thread this is a 1D ground-state search. But it is not fully done yet and I understand as ITensors can work with 2D structures as well.

Other than that S is the spin itself as 0 or 1 (in this case up/down but in the computation, they should be threaded as 0/1). It has also a conceptual meaning. If you need, I can put references. I tried my best to ask the question as simply as possible and didn't go much about them. However, I myself write down the hamiltonian. So, it is not any kind of copy-paste or something. But of course, I inspired some other works.

For the third question, I want to take a linear combination of the defined 3 hamiltonians. I also need to multiply hamiltonians with a constant.

Thank you again for your response, it is a precious experience for me to discuss with you!

Regards

emre
commented by (130 points)
edited by
Hello again,

I prepared a very short 1-page doc about what I am trying to do and wanted to share it with you.

in short:

I took the problem as an NxN matrix and it defines the problem for optimization.

flatten it and added one more dimension and this matrix created spins as NxN^2 matrix.

I also flatten it to be able to use it for MPS in 1D.

Then defined the hamiltonian accordingly in a way that the ground state solution is the optimized value.

I planned to set psi0 with a heuristic algorithm to avoid divergence.

Other than that I am not sure expanding out the square is possible since there is a term with double summation in the square. I do not know any way to expand this trivially. The number of the components is decided by N, in some sense it is uncertain. Cant be hard-coded I think.

I read some of your papers on this project and I am glad you responded to me before, thanks for that.

If you think this is doable with ITensors it is VERY good news for me. If not I am open to any suggestion that you can give me. Thanks for your attention.

emre
commented by (64.7k points)
Hi, so before getting into the larger context of the project you are trying accomplish, expanding a square of a sum is always possible. For example, if you have an expression like

(\sum_j A_j)^2 then it would, as you know, expand into

\sum_i \sum_j A_i A_j

Double sums are perfectly fine as input to OpSum (= AutoMPO) in ITensor. The only requirement is that each line of input to OpSum is a product of single-site operators. So terms like A_i A_j are fine, as are A_i B_j C_k etc. An overall square is not something OpSum can process itself, because it would require doing symbolic algebra to expand the square and collect terms etc. So you have to do that part on paper first.

Hope that helps!