Hi,
I am interested to find ground state energy for a spin chain using DMRG for a fixed Sz_total=0,1,2. How to do that?
The way that our QN conserving DMRG works is that when you give it an initial state to use, it keeps the total quantum numbers of that state exactly the same throughout the calculation. So if you give it an initial state with total S^z=1 for example, then DMRG will find the lowestenergy state having total S^z=1.
For a detailed walkthrough of how to do this, please see the following code example pages:
 Julia version (the writing is also applicable to the C++ version)
https://itensor.github.io/ITensors.jl/stable/tutorials/QN_DMRG.html  C++ version
http://itensor.org/docs.cgi?vers=cppv3&page=formulas/qn_dmrg
Thanks. But for even N it is not possible to fix Sz_total=1.
I see â€“ so there is one possible source of confusion which is that for S^z, ITensor uses units where

S^z=1/2 corresponds to
QN("Sz",1)

S^z=1 corresponds to
QN("Sz",2)

S^z=3/2 corresponds to
QN("Sz",3)
and so on. So the â€śITensor unitsâ€ť are twice that of the usual spin units.
Then if your point about Sz_total=1 (ITensor units) not being possible for an even number of spins means S^z=1/2 (physics units) isnâ€™t possible, that is correct and is just an unavoidable consequence of the mathematics of spin. But if you meant S^z=1 in physics units, then that would be possible.
Could you please clarify the units you meant? (ITensor units versus physics?)
suppose I have N=6 spin1/2 chain with arranegment up_1 dn_2 up_3 dn_4 up_5 dn_6. Here Sz_total=0. If I flip one spin then arrangement will be up_1 dn_2 up_3 up_4 up_5 dn_6. So here Sz_total=1. So I was expecting output QN(â€śSzâ€ť,1) where I was getting QN(â€śSzâ€ť,2).
In my previous answer, I indicated that Sz_total=1 in physical corresponds to QN("Sz",2)
in ITensor units. Does that answer your question?
Yes, That answers my question. Thanks a lot.
Hi miles,
Suppose I am using AFM spinhalf chain having N sites and I want a state conserving total Sz=N/2 i.e. all spins are up or down. After DMRG calculations I would expect ground state and first excited state energy to be same. But it comes different. Can you please clarify?
Hi vrushali.k,
To keep the forum better organized, please start a new topic when asking a new question.
Also, if you do decide to, could you please provide some more information about what you are asking? Whether or not the ground and first excited state have the same energy depends on whether the Hamiltonian has a gap. As you know, some systems have a gap and others do not and it depends very much on the system.
okay.