+1 vote
asked by (240 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.

Samuel

1 Answer

+1 vote
answered by (70.1k points)
selected by
 
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).

Miles

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

...