Fix bug in summing QN conserving tensor networks#295
Closed
emstoudenmire wants to merge 7 commits intomainfrom
Closed
Fix bug in summing QN conserving tensor networks#295emstoudenmire wants to merge 7 commits intomainfrom
emstoudenmire wants to merge 7 commits intomainfrom
Conversation
Contributor
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
+ Coverage 69.00% 69.10% +0.09%
==========================================
Files 81 81
Lines 4027 4027
==========================================
+ Hits 2779 2783 +4
+ Misses 1248 1244 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
This PR was based on an out-of-date version of ITensorNetworks, which overcomplicated it. |
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.
This PR fixes an issue with summing two QN-conserving tensor networks when using the "directsum" backend.
The issue occurs when the input TNs have tensors with varying, non-zero flux, even though each TN has the same total flux. Before this PR, the code would
directsumall the local tensors together, resulting in local tensors with "mixed flux" which is not allowed. As a side note, we may want to havedirectsumthrow an error when this happens.This PR orthogonalizes the input TNs to the same root vertex before proceeding with the directsum algorithm. With this orthogonalization step, the only way the directsum strategy could fail would be if the TNs had different total flux, which would be a user error.