Skip to content

MatrixAlgebraKit support#163

Merged
lkdvos merged 7 commits into
mainfrom
matrixalgebrakit
Apr 30, 2026
Merged

MatrixAlgebraKit support#163
lkdvos merged 7 commits into
mainfrom
matrixalgebrakit

Conversation

@lkdvos
Copy link
Copy Markdown
Contributor

@lkdvos lkdvos commented Apr 28, 2026

This PR restores support for MatrixAlgebraKit functions.
To keep this contained, this is now restricted to FusedGradedMatrix only, 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_vals and eig(h)_vals should return a vector, not a matrix. To this end, I added FusedGradedVector. We could consider merging the types for FusedGradedMatrix and FusedGradedVector together, but for now it was easier to just add this separately.
  • There is a somewhat unresolved issue with truncating full blocks, in the sense that in that case S.sectors should no longer contain the truncated sector, but U and V should still contain it to make axes(U, 1) and axes(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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 56.75676% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.00%. Comparing base (5a45d95) to head (97d3eec).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fusedgradedvector.jl 14.41% 95 Missing ⚠️
src/matrixalgebrakit.jl 88.80% 15 Missing ⚠️
src/fusedgradedmatrix.jl 85.71% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (5a45d95) and HEAD (97d3eec). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5a45d95) HEAD (97d3eec)
docs 2 1
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     
Flag Coverage Δ
docs 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos lkdvos force-pushed the matrixalgebrakit branch from 822b1cf to 31cab87 Compare April 28, 2026 15:31
@mtfishman
Copy link
Copy Markdown
Member

Looks good, thanks! Nice to see how short it is. Very good point about dropping sectors from S, happy to discuss tomorrow.

@lkdvos lkdvos force-pushed the matrixalgebrakit branch 3 times, most recently from 9bc74d9 to 4a9312f Compare April 29, 2026 19:10
@lkdvos lkdvos force-pushed the matrixalgebrakit branch from 4a9312f to 97d3eec Compare April 29, 2026 21:48
@lkdvos lkdvos requested a review from mtfishman April 29, 2026 22:00
Comment thread src/matrixalgebrakit.jl
@lkdvos lkdvos merged commit 2aa8c5d into main Apr 30, 2026
15 of 17 checks passed
@lkdvos lkdvos deleted the matrixalgebrakit branch April 30, 2026 12:12
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