Higher spin MPS/IQMPS

+1 vote
asked Feb 9 by samuel (170 points)

Hello Miles,

I would like to use the DMRG algorithm on higher spins, namely S=3/2, S=2 and maybe S=5/2 if possible. It seems that only S=1/2 and S=1 are implemented in the library. What would be the easiest way for me to add these features ? Can I simply start from either "spinhalf.h" or "spinone.h" and redefine the generators ?

Also, as far as I understand the compilation process, I should then only add a line in "all_mps.h" containing #include "itensor/mps/sites/spinthreehalf.h", for example, and recompile the library ?

Thank you.


1 Answer

+1 vote
answered Feb 9 by miles (11,590 points)
selected Feb 10 by samuel
Best answer

Hi Samuel,
Yes you'd need to define a new site set based on spinhalf.h and spinone.h. It should be pretty clear, hopefully, to see how to extend them but if not please post your questions here or by email to me. Basically there is a SpinHalfSite object or a SpinOneSite object which defines the QN's (quantum numbers) of each setting of a site index. And there are the operators such as Sz which are customized for each S value. That's all you should have to change.

About including your new file, you could add that line to all_mps.h as you say, or even simpler you could just add that #include line to the top of your project's code (such as the file that contains your main function, or any file that contains code that will need to know about your custom site set).


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
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.