Skip to content
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

[ENHANCEMENT] Define tools to blockpermute axes #21

Open
ogauthe opened this issue Feb 18, 2025 · 0 comments
Open

[ENHANCEMENT] Define tools to blockpermute axes #21

ogauthe opened this issue Feb 18, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ogauthe
Copy link
Collaborator

ogauthe commented Feb 18, 2025

As mentioned in ITensor/BlockSparseArrays.jl#52

I think it could be reasonable to make functionality like:

    GradedUnitRanges.blockmergesortperm
    GradedUnitRanges.blockmergesort
    GradedUnitRanges.blocksortperm
    GradedUnitRanges.blocksort (not defined yet but probably should be).

part of the public interface of GradedUnitRanges.jl, since sorting by sector and merging common sectors is a pretty common operation. However, maybe they should be renamed to:

    GradedUnitRanges.sectormergesortperm
    GradedUnitRanges.sectormergesort
    GradedUnitRanges.sectorsortperm
    GradedUnitRanges.sectorsort

to make it clearer that the sorting/merging is done by sector. I don't think there is a need for GradedUnitRanges.blockpermute(a::AbstractBlockedUnitRange, indices::AbstractVector{<:Block{1}}) since if I understand what you mean by that, that is already defined through indexing syntax like a[indices], or to get it as a new axis you can do only(axes(a[indices])) as I suggest in the comment above.

@ogauthe ogauthe added the enhancement New feature or request label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant