Skip to content

Commit a526711

Browse files
authored
Use GradedUnitRanges.map_blocklabels (#6)
1 parent 8767c22 commit a526711

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SymmetrySectors"
22
uuid = "f8a8ad64-adbc-4fce-92f7-ffe2bb36a86e"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
@@ -11,7 +11,7 @@ LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993"
1111

1212
[compat]
1313
BlockArrays = "1.2.0"
14-
GradedUnitRanges = "0.1.0"
14+
GradedUnitRanges = "0.1.1"
1515
HalfIntegers = "1.6.0"
1616
LabelledNumbers = "0.1.0"
1717
julia = "1.10"

src/sector_product.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using BlockArrays: blocklengths
55
using LabelledNumbers: LabelledInteger, label, labelled, unlabel
6-
using GradedUnitRanges: GradedUnitRanges, dual
6+
using GradedUnitRanges: GradedUnitRanges, dual, map_blocklabels
77

88
# ===================================== Definition =======================================
99
struct SectorProduct{Sectors} <: AbstractSector
@@ -232,10 +232,6 @@ end
232232

233233
arguments_diff(nt1::NamedTuple, nt2::NamedTuple) = symdiff_keys(nt1, nt2)
234234

235-
function map_blocklabels(f, r::AbstractUnitRange)
236-
return gradedrange(labelled.(unlabel.(blocklengths(r)), f.(blocklabels(r))))
237-
end
238-
239235
function shared_arguments_fusion_rule(shared1::NT, shared2::NT) where {NT<:NamedTuple}
240236
tuple_fused = shared_arguments_fusion_rule(values(shared1), values(shared2))
241237
return map_blocklabels(SectorProduct NT arguments SectorProduct, tuple_fused)

0 commit comments

Comments
 (0)