+1 vote
asked by (130 points)

I am trying to finish the tutorial 06 on dmrg. However, I am not able to find the help section on the website. I am facing issues in implementing SVD. Where can I find the proper syntax required to perform SVD in dmrg tutorial?
Note: that I am the c++ version of the ITensor package.

1 Answer

0 votes
answered by (70.1k points)

Hi asing,
For the C++ version the interface of the svd function is described and some examples given in the documentation here:
http://itensor.org/docs.cgi?vers=cppv3&page=classes/decomp

Click on the the link halfway down the page that say "Click to Show Example" to see a nice example of the interface. The Synopsis at the top shows one too.

The basic idea is that, given an ITensor with indices i,j,k,l, you pass the ones you want to end up on U to the svd function, like svd(T,{i,k}) if you want i and k to be on U, with the remaining indices going onto V.

In the context of DMRG, you should also pass truncation parameters to control the cost of the DMRG algorithm, so you should also pass values for the "MaxDim" and "Cutoff' named arguments, so like svd(T,{i,k}, {"MaxDim=", maxdim, "Cutoff=", cutoff}); where maxdim is some integer and cutoff is a real number.

Hope that helps. Also we have fully working examples of using our DMRG code if you want to look at those, such as in the sample folder and in the Code Formulas section of the C++ documentation.

Best,
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

...