MatrixAlgebraKit support#163
Merged
Merged
Conversation
Contributor
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
==========================================
- Coverage 87.18% 82.00% -5.18%
==========================================
Files 20 22 +2
Lines 1264 1523 +259
==========================================
+ Hits 1102 1249 +147
- Misses 162 274 +112
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:
|
822b1cf to
31cab87
Compare
Member
|
Looks good, thanks! Nice to see how short it is. Very good point about dropping sectors from |
9bc74d9 to
4a9312f
Compare
4a9312f to
97d3eec
Compare
mtfishman
reviewed
Apr 30, 2026
mtfishman
approved these changes
Apr 30, 2026
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 restores support for MatrixAlgebraKit functions.
To keep this contained, this is now restricted to
FusedGradedMatrixonly, I'll then dispatch to these implementations in a follow-up PR.I think overall the implementation is quite solid, since it is mostly taken from TensorKit which has been somewhat battletested, and it should also take non-abelian dimensions into account properly.
Some more interesting design choices I made that could be discussed:
svd_valsandeig(h)_valsshould return a vector, not a matrix. To this end, I addedFusedGradedVector. We could consider merging the types forFusedGradedMatrixandFusedGradedVectortogether, but for now it was easier to just add this separately.S.sectorsshould no longer contain the truncated sector, butUandVshould still contain it to makeaxes(U, 1)andaxes(A, 1)still the same. This ties into a deeper issue that I'm just naively looping over the blocks here, and assuming that the number of sectors has to be the same for all arguments, which actually might be too strict. We should probably try and discuss this in a bit more depth tomorrow.