Skip to content

fix incorrect calculation of ee_region and improve effiency.#7

Open
zhou-yang-quantum wants to merge 3 commits into
ryanlevy:mainfrom
zhou-yang-quantum:bugfix-ee-region
Open

fix incorrect calculation of ee_region and improve effiency.#7
zhou-yang-quantum wants to merge 3 commits into
ryanlevy:mainfrom
zhou-yang-quantum:bugfix-ee-region

Conversation

@zhou-yang-quantum
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Owner

@ryanlevy ryanlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@zhou-yang-quantum
Copy link
Copy Markdown
Author

Hi Ryan,

I just deleted the .vscode file and added a brief test.

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.

2 participants