fix incorrect calculation of ee_region and improve effiency.#7
Open
zhou-yang-quantum wants to merge 3 commits into
Open
fix incorrect calculation of ee_region and improve effiency.#7zhou-yang-quantum wants to merge 3 commits into
zhou-yang-quantum wants to merge 3 commits into
Conversation
ryanlevy
requested changes
Nov 12, 2025
Owner
ryanlevy
left a comment
There was a problem hiding this comment.
Hi Zhou,
Thank you so much for the PR! Let me look into the bipartite cut function, this may be an issue of documentation as well. At first glance, I imagine this may be an artifact of not moving the MPS center even if we are a "left" or "right" region
Your A U C is definitely useful, good catch.
In the meantime can you please:
- Remove the vscode file
- create a test to catch the error for the bipartite cuts? You can see some examples in the test/test_entropy.jl file
b2f691a to
554c7f0
Compare
Author
|
Hi Ryan, I just deleted the .vscode file and added a brief test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Ryan,
Thank you for writing this wonderful package. Just some small fixes here.
Let psi be an MPS of length 10. We should have
ee_region(psi, 5:10)==ee_region(psi, 1:4)But instead, the function actually does,
ee_region(psi, 5:10) == ee_region(psi, 1:5)which is incorrect.
Moreover, when calculating a region whose complement is a connected region in the middle, e.g.
ee_region(psi, vcat(1:3, 7:10))it is more efficient to calculate the complement region ee,
ee_region(psi, 4:6)I have modified the function ee_region for these two improvements.
Best, Zhou