Skip to content

Commit 97f202f

Browse files
authored
Use GradedArrays.jl instead of GradedUnitRanges.jl (#36)
1 parent 1d5b4f9 commit 97f202f

17 files changed

+41
-48
lines changed

Project.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
name = "FusionTensors"
22
uuid = "e16ca583-1f51-4df0-8e12-57d32947d33e"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.2.4"
4+
version = "0.3.0"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
88
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
99
BlockSparseArrays = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
10-
GradedUnitRanges = "e2de450a-8a67-46c7-b59c-01d5a3d041c5"
10+
GradedArrays = "bc96ca6e-b7c8-4bb6-888e-c93f838762c2"
1111
HalfIntegers = "f0d1745a-41c9-11e9-1dd9-e5d34d218721"
1212
LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
13-
LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993"
1413
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1514
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
16-
SymmetrySectors = "f8a8ad64-adbc-4fce-92f7-ffe2bb36a86e"
1715
TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
1816
TensorProducts = "decf83d6-1968-43f4-96dc-fdb3fe15fc6d"
1917
TypeParameterAccessors = "7e5a90cf-f82e-492e-a09b-e3e26432c138"
@@ -22,14 +20,12 @@ WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b"
2220
[compat]
2321
Accessors = "0.1.39"
2422
BlockArrays = "1.2.0"
25-
BlockSparseArrays = "0.3.9"
26-
GradedUnitRanges = "0.2.2"
23+
BlockSparseArrays = "0.4.0"
24+
GradedArrays = "0.2.1"
2725
HalfIntegers = "1.6.0"
2826
LRUCache = "1.6.1"
29-
LabelledNumbers = "0.1.0"
3027
LinearAlgebra = "1.10.0"
3128
Strided = "2.2.0"
32-
SymmetrySectors = "0.1.9"
3329
TensorAlgebra = "0.2.4"
3430
TensorProducts = "0.1.3"
3531
TypeParameterAccessors = "0.3.0"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
55

66
[compat]
77
Documenter = "1.10.0"
8-
FusionTensors = "0.2.3"
8+
FusionTensors = "0.3.0"
99
Literate = "2.20.1"

examples/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
FusionTensors = "e16ca583-1f51-4df0-8e12-57d32947d33e"
33

44
[compat]
5-
FusionTensors = "0.2.3"
5+
FusionTensors = "0.3.0"

src/fusion_trees/clebsch_gordan_tensors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
using HalfIntegers: half
66
using WignerSymbols: clebschgordan
77

8-
using GradedUnitRanges: dual
9-
using SymmetrySectors:
8+
using GradedArrays: dual
9+
using GradedArrays.SymmetrySectors:
1010
AbelianStyle,
1111
AbstractSector,
1212
NotAbelianStyle,

src/fusion_trees/fusiontree.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# TBD
44
# compatibility with TensorKit conventions?
55

6-
using GradedUnitRanges: AbstractGradedUnitRange, GradedUnitRanges, flip, isdual, sector_type
7-
using SymmetrySectors:
6+
using GradedArrays: GradedArrays, AbstractGradedUnitRange, flip, isdual, sector_type
7+
using GradedArrays.SymmetrySectors:
88
×,
99
AbstractSector,
1010
SectorProduct,
@@ -40,7 +40,7 @@ using TensorProducts: ⊗
4040
# affect the basis on which the tree projects for self-dual irreps.
4141
#
4242
#
43-
# The interface uses AbstractGradedUnitRanges as input for interface simplicity
43+
# The interface uses AbstractGradedArrays as input for interface simplicity
4444
# however only blocklabels are used and blocklengths are never read.
4545

4646
struct SectorFusionTree{S,N,M}
@@ -86,9 +86,9 @@ end
8686

8787
Base.length(::SectorFusionTree{<:Any,N}) where {N} = N
8888

89-
# GradedUnitRanges interface
90-
GradedUnitRanges.sector_type(::Type{<:SectorFusionTree{S}}) where {S} = S
91-
function GradedUnitRanges.flip(f::SectorFusionTree)
89+
# GradedArrays interface
90+
GradedArrays.sector_type(::Type{<:SectorFusionTree{S}}) where {S} = S
91+
function GradedArrays.flip(f::SectorFusionTree)
9292
return SectorFusionTree(
9393
dual.(leaves(f)),
9494
.!arrows(f),

src/fusiontensor/array_cast.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using BlockArrays: AbstractBlockArray, BlockedArray, blockedrange, blocklengths, findblock
44

55
using BlockSparseArrays: BlockSparseArrays, BlockSparseArray
6-
using GradedUnitRanges: AbstractGradedUnitRange, blocklabels
7-
using SymmetrySectors: block_dimensions, quantum_dimension
6+
using GradedArrays: AbstractGradedUnitRange, blocklabels
7+
using GradedArrays.SymmetrySectors: block_dimensions, quantum_dimension
88
using TensorAlgebra: contract
99

1010
# ================================= High level interface =================================

src/fusiontensor/fusiontensor.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using BlockArrays: AbstractBlockMatrix, BlockArrays, BlockIndexRange, blocklengt
44

55
using BlockSparseArrays:
66
AbstractBlockSparseMatrix, BlockSparseArray, eachblockstoredindex, to_block_indices
7-
using GradedUnitRanges:
7+
using GradedArrays:
88
AbstractGradedUnitRange,
99
blocklabels,
1010
blockmergesort,
@@ -15,7 +15,7 @@ using GradedUnitRanges:
1515
map_blocklabels,
1616
sector_type,
1717
space_isequal
18-
using SymmetrySectors: SectorProduct, TrivialSector
18+
using GradedArrays.SymmetrySectors: SectorProduct, TrivialSector
1919
using TensorAlgebra: BlockedTuple, tuplemortar
2020
using TensorProducts: tensor_product
2121

@@ -61,8 +61,8 @@ function charge_block_size(ft::FusionTensor, f1::SectorFusionTree, f2::SectorFus
6161
return ntuple(i -> Int(length(axes(ft)[i][b[i]])), ndims(ft))
6262
end
6363

64-
# GradedUnitRanges interface
65-
function GradedUnitRanges.sector_type(
64+
# GradedArrays interface
65+
function GradedArrays.sector_type(
6666
::Type{<:FusionTensor{<:Any,<:Any,<:Any,<:Any,<:Dict{<:Tuple{<:Any,F}}}}
6767
) where {F}
6868
return sector_type(F)
@@ -76,7 +76,7 @@ function BlockArrays.findblock(ft::FusionTensor, f1::SectorFusionTree, f2::Secto
7676
b2 = find_sector_block.(leaves(f2), domain_axes(ft))
7777
return Block(b1..., b2...)
7878
end
79-
# TBD move to GradedUnitRanges? rename findfirst_sector?
79+
# TBD move to GradedArrays? rename findfirst_sector?
8080
function find_sector_block(s::AbstractSector, l::AbstractGradedUnitRange)
8181
return findfirst(==(s), blocklabels(l))
8282
end

src/fusiontensor/linear_algebra_interface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ using LinearAlgebra: LinearAlgebra, mul!, norm, tr
55
using BlockArrays: Block, blocks
66

77
using BlockSparseArrays: eachblockstoredindex
8-
using GradedUnitRanges: blocklabels
9-
using SymmetrySectors: quantum_dimension
8+
using GradedArrays: blocklabels
9+
using GradedArrays.SymmetrySectors: quantum_dimension
1010

1111
# allow to contract with different eltype and let BlockSparseArray ensure compatibility
1212
# impose matching type and number of axes at compile time

src/permutedims/unitaries.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using BlockArrays: Block, findblock
44
using LRUCache: LRU
55

6-
using SymmetrySectors: quantum_dimension
6+
using GradedArrays.SymmetrySectors: quantum_dimension
77

88
const unitary_cache = LRU{Any,Float64}(; maxsize=10000) # TBD size
99

test/Project.toml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,22 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
44
BlockSparseArrays = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
55
FusionTensors = "e16ca583-1f51-4df0-8e12-57d32947d33e"
6-
GradedUnitRanges = "e2de450a-8a67-46c7-b59c-01d5a3d041c5"
6+
GradedArrays = "bc96ca6e-b7c8-4bb6-888e-c93f838762c2"
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
88
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
99
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
10-
SymmetrySectors = "f8a8ad64-adbc-4fce-92f7-ffe2bb36a86e"
1110
TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
1211
TensorProducts = "decf83d6-1968-43f4-96dc-fdb3fe15fc6d"
1312
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1413

1514
[compat]
1615
Aqua = "0.8.11"
1716
BlockArrays = "1.5.0"
18-
BlockSparseArrays = "0.3.9"
19-
FusionTensors = "0.2.3"
20-
GradedUnitRanges = "0.2.2"
17+
BlockSparseArrays = "0.4.0"
18+
FusionTensors = "0.3.0"
19+
LinearAlgebra = "1.10.0"
2120
SafeTestsets = "0.1.0"
2221
Suppressor = "0.2.8"
23-
SymmetrySectors = "0.1.9"
2422
TensorAlgebra = "0.2.7"
2523
TensorProducts = "0.1.3"
26-
LinearAlgebra = "1.10.0"
2724
Test = "1.10.0"

0 commit comments

Comments
 (0)