diff --git a/Project.toml b/Project.toml index 30bfc2f..05c9942 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SymmetrySectors" uuid = "f8a8ad64-adbc-4fce-92f7-ffe2bb36a86e" authors = ["ITensor developers and contributors"] -version = "0.1.0" +version = "0.1.1" [deps] BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" @@ -11,7 +11,7 @@ LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993" [compat] BlockArrays = "1.2.0" -GradedUnitRanges = "0.1.0" +GradedUnitRanges = "0.1.1" HalfIntegers = "1.6.0" LabelledNumbers = "0.1.0" julia = "1.10" diff --git a/src/sector_product.jl b/src/sector_product.jl index 39d4e80..175d53e 100644 --- a/src/sector_product.jl +++ b/src/sector_product.jl @@ -3,7 +3,7 @@ using BlockArrays: blocklengths using LabelledNumbers: LabelledInteger, label, labelled, unlabel -using GradedUnitRanges: GradedUnitRanges, dual +using GradedUnitRanges: GradedUnitRanges, dual, map_blocklabels # ===================================== Definition ======================================= struct SectorProduct{Sectors} <: AbstractSector @@ -232,10 +232,6 @@ end arguments_diff(nt1::NamedTuple, nt2::NamedTuple) = symdiff_keys(nt1, nt2) -function map_blocklabels(f, r::AbstractUnitRange) - return gradedrange(labelled.(unlabel.(blocklengths(r)), f.(blocklabels(r)))) -end - function shared_arguments_fusion_rule(shared1::NT, shared2::NT) where {NT<:NamedTuple} tuple_fused = shared_arguments_fusion_rule(values(shared1), values(shared2)) return map_blocklabels(SectorProduct ∘ NT ∘ arguments ∘ SectorProduct, tuple_fused)