-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An MPS (approximate) simulator #3630
Conversation
Hello, I read more of the paper, and I think I understand how to do the 2D version (famous last words). In the meantime, is there any comment on this PR? It would be nice to have some feedback on 1D before I attempted 2D. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC'ing @rmlarose for review / comparison with external simulator.
Thanks for this addition! A couple of changes and clarifications needed, but overall the test coverage looks promising.
Thanks. PTAL. |
During the (ongoing) review of #3630 95-martin-orion@ found a bug in my draft code. He said that I should copy state like in #3109. I changed my code and added a test in that PR. However, I had inspired myself from the Clifford code which could have the same issue (I think), and so I am fixing the code in the present PR.
@tonybruguier I'm ready to merge this PR if you're happy with it - let me know. |
Yes, please merge if you think it's fine to do so. Thank you for your help! |
Thanks Orion for the ping! I still haven't had time to look closely but will offer a few cursory comments if they're useful. I think the simulator I'm not sure in which order gates are applied, but it could be good to sweep from left to right (or right to left) to keep some canonicalization. This may not be necessary at present but certain operations are faster with canonical MPS. Also not relevant now but maybe to future proof: this should support the "SimulatesExpectationValues" protocol when that is finalized since MPS are great for computing expectation values. |
This is based on this algo:
https://arxiv.org/abs/2002.07730