Skip to content

Commit

Permalink
inline factorize_gradedaxis
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Oct 10, 2024
1 parent 20acb54 commit 21df582
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions NDTensors/src/lib/SymmetrySectors/src/sector_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,10 @@ function fix_fused_product_type(::AbelianStyle, T::Type, fused)
end

function fix_fused_product_type(::NotAbelianStyle, T::Type, fused)
g = factorize_gradedaxis(fused)
return recover_gradedaxis_product_type(T, g)
end

function factorize_gradedaxis(fused)
# convert eg. Tuple{GradedUnitRange{SU2}, GradedUnitRange{SU2}} into GradedUnitRange{SU2×SU2}
# convert e.g. Tuple{GradedUnitRange{SU2}, GradedUnitRange{SU2}} into GradedUnitRange{SU2×SU2}
g = reduce(×, fused)
# convention: keep unsorted blocklabels as produced by F order loops in ×
return g
return recover_gradedaxis_product_type(T, g)
end

function recover_gradedaxis_product_type(T::Type, g0::AbstractGradedUnitRange)
Expand Down

0 comments on commit 21df582

Please sign in to comment.