-
Notifications
You must be signed in to change notification settings - Fork 125
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
[ITensors] Fix checkflux
for QN ITensor with no blocks
#1210
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1210 +/- ##
===========================================
- Coverage 85.40% 67.31% -18.09%
===========================================
Files 88 87 -1
Lines 8426 8378 -48
===========================================
- Hits 7196 5640 -1556
- Misses 1230 2738 +1508
☔ View full report in Codecov by Sentry. |
checkflux
checkflux
checkflux
for QN ITensor with no blocks
Looks good from my end, ready to merge? |
Just missed your comment. Thanks for reviewing. I'll merge. |
Fixes #1209 by allowing
checkflux
to work when block-sparse ITensors are created which have no blocks.The bug was coming from
correlation_matrix
due to user-specific operators whose onsite product turned out to be numerically zero (zero matrix), leading to no blocks. This is ok, but thecheckflux
function was assuming at least one non-zero block and failing in the case of zero blocks.