Skip to content

Make SVD more general to accommodate graded arrays #114

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

Merged
merged 11 commits into from
May 22, 2025
Merged

Conversation

mtfishman
Copy link
Member

@mtfishman mtfishman commented May 13, 2025

@lkdvos this is still work in progress, but this should give you an idea for what I have in mind for generalizing the block sparse SVD function to accommodate graded arrays.

With the right overloads of eachblockaxis, mortar_axis, and similar_output for graded unit ranges/arrays, locally I'm able to preserve symmetry information.

To-do:

  • Make the new interface functions public (?).
  • Add tests.

Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 95.34884% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.23%. Comparing base (6c05eb9) to head (bf2a7a8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/BlockArraysExtensions/blockedunitrange.jl 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   75.15%   75.23%   +0.07%     
==========================================
  Files          29       29              
  Lines        1284     1296      +12     
==========================================
+ Hits          965      975      +10     
- Misses        319      321       +2     
Flag Coverage Δ
docs 13.32% <0.00%> (-0.13%) ⬇️

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.

@mtfishman mtfishman changed the title [WIP] Make SVD more general to accommodate graded arrays Make SVD more general to accommodate graded arrays May 14, 2025
@mtfishman mtfishman marked this pull request as ready for review May 14, 2025 01:49
@mtfishman
Copy link
Member Author

mtfishman commented May 14, 2025

@lkdvos this is ready for review. I think it would be nice to merge this soon so then I can make a corresponding PR to GradedArrays.jl using these new customization points to fix ITensor/GradedArrays.jl#29 (though I know you are traveling so may not have time to review, I can make a draft PR to GradedArrays.jl in the meantime).

I think the main considerations are:

  1. The names and arguments, I'm definitely open to suggestions.
  2. Whether these are the right customization points.

@mtfishman
Copy link
Member Author

You can see how this interface is used to account for abelian symmetries in ITensor/GradedArrays.jl#33.

Copy link
Contributor

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

I think this looks very clean in general, should be good to go?

@mtfishman
Copy link
Member Author

I think this looks very clean in general, should be good to go?

Thanks, I think so, the main things I wanted feedback on are the names/interfaces of the new interface functions eachblockaxis, mortar_axis, and similar_output, since those are semi-public and act as the customization points for ITensor/GradedArrays.jl#33. If you're happy with those, I'm happy with those!

@lkdvos
Copy link
Contributor

lkdvos commented May 22, 2025

I don't think I can come up with anything better than eachblockaxis or mortar_axis. similar_output is a little non-descriptive maybe, and the semi-public state of that is an interesting problem. I don't think this is a major issue though, and I'm fine with keeping the name as is since I also can't come up with better alternatives

@mtfishman
Copy link
Member Author

That's basically how I feel as well. Since it is semi-public we can always reassess as we go along (we'll have to make a breaking change to change it but it would be very minor since it will only be used by GradedArrays.jl for now).

@mtfishman mtfishman merged commit 297e724 into main May 22, 2025
19 checks passed
@mtfishman mtfishman deleted the graded_svd branch May 22, 2025 17: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