+1 vote
asked by (320 points)

Hi, is there any existing function in ITensor 1 which can convert IQMPS to MPs? Thank you.

1 Answer

+1 vote
answered by (70.1k points)

Hi, good question. There is not, so I just added a new function that does this.

If you pull the latest code from GitHub, and do "git checkout version1" which will put you on the version1 development branch, then there is a new function called "toMPS" you can use like this:

IQMPS psi(sites);
... //code that changes psi...

auto psi_mps = toMPS(psi);

Let me know if you encounter any issues with it or have any more questions.

Miles

commented by (340 points)
Hi Miles,

Would it be possible to add this to the latest version of ITensor? Thanks!
commented by (70.1k points)
Hmm you're right: somehow I never added this. Just added it. Please let me know if you encounter any problems with it!
commented by (460 points)
Hi Miles,

I am just wondering is there a similar function "toMPO" that convert IQMPO to MPO? I have checked that there is actually a "toMPO" function but it is not used in this way. How could I modify that function to convert my IQMPO to MPO?

Best,
Yixuan
commented by (70.1k points)
Hi Yixuan,
Sorry for the slow reply! Yes we needed to have this function so I just added it to the latest version of ITensor on github. So please do a "git pull" and recompile and this function should be available. (Just do auto m = toMPO(M); where M is an IQMPO and m will be an MPO.)
commented by (460 points)
Hi Miles,

Thanks. That will be really helpful.

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

...