+1 vote
asked by (420 points)

Dear itensor

I am working on finite temperature spin-1 Heisenberg model including single-ion anisotropy term
H=J\sum{i,j} S}i . Sj -K \sumi (S_i^z)^2

To catch the correct physics at temperature at T-->0, it seems one needs to use a kind of "soft edges" trick, to approximate the infinite system.

I mean, I want to have a chain of spin-1 excepts those are sitting at both edges should be spin1/2.

S1/2---S1---S1---S1. . . S1---S1--S1/2

any suggestions are highly appreciated.

Regards
Javad

1 Answer

0 votes
answered by (70.1k points)
selected by
 
Best answer

Hi Javad,
Thanks for the question. This is a case we had thought about quite a bit, so we have a way to do it in both the C++ and Julia versions of ITensor. I'll give an answer for both.

---- Julia ITensor ----

Starting from a usual DMRG code such as the one in this example:

https://itensor.github.io/ITensors.jl/stable/examples/DMRG.html

right after making the siteinds array (which is just a Julia array of indices), modify the first and last indices to be S=1/2 indices, like this

N = 100
sites = siteinds("S=1",N)
sites[1] = siteind("S=1/2")
sites[N] = siteind("S=1/2")

---- C++ ITensor ----

Starting from the usual DMRG code for a S=1 chain, such as the sample code here:

https://github.com/ITensor/ITensor/blob/v3/sample/dmrg.cc

change the line auto sites = SpinOne(N); to include an extra named argument asking for the edge spins to be spin-half, like this:

auto sites = SpinOne(N,{"SHalfEdge=",true});
commented by (420 points)
Dear Miles

Many thanks for your fast and practical reply .
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...