Skip to content

Commit 436727d

Browse files
authored
Bump compat for SUNRepresentations to 0.4 (#161)
Widens SUNRepresentations compat from `"0.3"` to `"0.3, 0.4"` in both root and `test/Project.toml`, plus one ext fix needed for the 0.4 API change. ### Ext change SUNRepresentations 0.4 removed the un-parameterized `SUNIrrep(...)` constructor — it now throws and requires `SUNIrrep{N}(...)`. The extension was using `SUNIrrep((λ..., 0))` which worked in 0.3 but breaks in 0.4. Fix: `SUNIrrep{N}((λ..., 0))` — compatible with both 0.3 and 0.4. `c.I` continues to work in 0.4 via a `Base.getproperty` backwards-compat shim that returns the weight, so `sector_label` is unchanged. ### Changes - ext/GradedArraysSUNRepresentationsExt/GradedArraysSUNRepresentationsExt.jl: `SUNIrrep((λ..., 0))` → `SUNIrrep{N}((λ..., 0))` - Project.toml: `SUNRepresentations = "0.3"` → `"0.3, 0.4"` - test/Project.toml: `SUNRepresentations = "0.3"` → `"0.3, 0.4"` - Project.toml: version `0.8.4` → `0.8.5` Smoke-tested locally: the SU tests (`test_sectors.jl`, `test_fusion_rule.jl`) all pass against SUNRepresentations 0.4.
1 parent 18c37c5 commit 436727d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GradedArrays"
22
uuid = "bc96ca6e-b7c8-4bb6-888e-c93f838762c2"
3-
version = "0.8.4"
3+
version = "0.8.5"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[workspace]
@@ -45,7 +45,7 @@ LinearAlgebra = "1.10"
4545
MatrixAlgebraKit = "0.6"
4646
NamedDimsArrays = "0.15"
4747
Random = "1.10"
48-
SUNRepresentations = "0.3"
48+
SUNRepresentations = "0.3, 0.4"
4949
SparseArraysBase = "0.9"
5050
SplitApplyCombine = "1.2.3"
5151
TensorAlgebra = "0.8, 0.9"

ext/GradedArraysSUNRepresentationsExt/GradedArraysSUNRepresentationsExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using SUNRepresentations: SUNIrrep
55

66
function GradedArrays.SectorRange{SUNIrrep{N}}::NTuple{M, Int}) where {N, M}
77
M + 1 == N || throw(ArgumentError("Length of λ must be N-1 for SU(N) irreps"))
8-
return SectorRange(SUNIrrep((λ..., 0)))
8+
return SectorRange(SUNIrrep{N}((λ..., 0)))
99
end
1010
GradedArrays.sector_label(c::SUNIrrep) = Base.front(c.I)
1111

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LinearAlgebra = "1.10"
3232
MatrixAlgebraKit = "0.6"
3333
NamedDimsArrays = "0.15"
3434
Random = "1.10"
35-
SUNRepresentations = "0.3"
35+
SUNRepresentations = "0.3, 0.4"
3636
SafeTestsets = "0.1"
3737
SparseArraysBase = "0.9"
3838
Suppressor = "0.2.8"

0 commit comments

Comments
 (0)