# mixed spin-1/2 and spin-1

+1 vote

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

answered by (70.1k points)
selected by

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 .