How to use ITensor to calculate a Hamiltonian by hand?

Hi all! Now I want to calculate a Hamiltonian defined by myself, by using ITensor.jl, how should I do it?

I want to calculate two types of Hamiltonian:
(1) SU(3) spin model, here I need to construct a Hamiltonian by 8 Gell-Mann matrices, and then to use MPS/MPO to write it. But I have no idea about this.

(2) A special SU(2) spin model, maybe it is a more simple example which should be solved firstly.
In details, I want to reconstruct three spin-1/2 matrix in this way:

\tilda{sigma}_z =
0 0 0
0 1 0
0 0 -1

in other words, I want to reconstruct these spin matrix in the form the direct summation of 0*identity_matrix and Pauli-matrix. And the Hamiltonian is constructed by these three new “spin” operators.

How should I do? (as an example, I need the solution to the second Hamiltonian)

It depends on what you mean, but I assume you are meaning you want to define an MPO by setting the elements of each MPO tensor in a custom way?

For resources about common MPO patterns (i.e. which numbers to put into an MPO to make a particular operator), some good papers are

In terms of how to actually make custom MPO’s in ITensor, a good pattern to use is roughly this:

  1. first, make all of the ‘virtual’ or link indices you are going to use to connect the MPO tensors together. Store these into an array, named links say, for easy access. The sizes of these indices depends on the particular MPO you are trying to make.
  2. next, make an empty MPO (like M = MPO(N)) and then write a for loop where you loop from 1 to N-1 and then set the elements of each MPO tensor that you want to make, something like:
T = ITensor(links[i],sites[i],sites[i]', links[i+1])
T[1,1,2,1] = -0.7
...
M[i] = T
  1. finally, make the boundary conditions of the MPO as two vectors that have the indices links[1] and links[N], respectively. Contract these boundary vectors into the first and last MPO tensor.

Hope that gives you an idea of how to get started with this.

1 Like

Alternatively, you can make custom operator definitions: Physics (SiteType) System Examples · ITensors.jl and then construct MPOs from symbolic representations of the Hamiltonian by constructing an OpSum and converting to an MPO. Note that should allow you to represent any Hamiltonian, since you can define a complete local operator basis and expand your Hamiltonian in that basis.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.