Skip to content

Fix basis rotation and MPS orthogonality in METTS collapse - #4

Open
Rafael-DSoares wants to merge 3 commits into
awietek:mainfrom
Rafael-DSoares:main
Open

Fix basis rotation and MPS orthogonality in METTS collapse#4
Rafael-DSoares wants to merge 3 commits into
awietek:mainfrom
Rafael-DSoares:main

Conversation

@Rafael-DSoares

Copy link
Copy Markdown
Contributor

Fixed the X-basis measurements. The old code was accidentally flipping the X directions backwards, i.e., the state X+ basis was mapped onto the Z- and the X- to -Z+. So, I replaced the rotation gate with the Hadamard gate. This ensures that the X basis is mapped onto the Z basis in the correct way.

Changed sample to sample!. Before, the code would crash because the state had the incorrect orthogonality center before sampling. Adding the ! forces ITensors to automatically fix the orthogonality center right.

Updated read_last_product_state function to also return vectors of strings, which is useful when collapsing from a mixed basis. As a result, the product state arrays now correspond to vectors of strings with the specific basis direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant