0 votes
asked by (310 points)

I'm working through an algorithm that uses this partial Kronecker product formula for each tensor of an MPS in v3. Matt's solution (see link) works great for individual ITensors. Unfortunately, I can't seem to get this working the same way for the tensors of an MPS. I get an error about "different index structure".

I've tried brute-forcing the tensors to have the exact same indices several different ways with no luck. I suspect that this error has something to do with overwriting the MPS tensors as I compute them; is there a "correct" way to do that? I suppose I basically want to build an MPS from scratch, given that I know what the indices should be and what the tensors should be.

1 Answer

0 votes
answered by (14.1k points)

Hello,

Could you please post some sample code so we know what you are trying to achieve? Are you taking two MPS and trying to partial Kronecker product them together? Having more information would help us debug what is going on and figure out the best way to proceed.

Cheers,
Matt

commented by (310 points)
Sorry I didn't post code originally! It was a stupid error on my part, as it turned out -- when I was constructing the MPS in a loop, I didn't take into account the different index id numbers, so the construction was invalid. After I realized the problem, it was straightforward to fix. Sorry for spamming the message board.
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

...