From 9c17a77f76eb93ac3ea746c9518aa7db0f516146 Mon Sep 17 00:00:00 2001 From: Boris De Vos Date: Mon, 2 Mar 2026 17:50:43 +0100 Subject: [PATCH] fix sectorscalartype for product sectors --- src/product.jl | 6 +++++- test/runtests.jl | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/product.jl b/src/product.jl index 456252a1..41d90905 100644 --- a/src/product.jl +++ b/src/product.jl @@ -228,7 +228,11 @@ function braidingscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple} return typeof(prod(zero ∘ braidingscalartype, _sectors(T))) end function sectorscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple} - return typeof(prod(zero ∘ sectorscalartype, _sectors(T))) + return if BraidingStyle(ProductSector{T}) == NoBraiding() + typeof(prod(zero ∘ fusionscalartype, _sectors(T))) + else + typeof(prod(zero ∘ sectorscalartype, _sectors(T))) + end end function dimscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple} return typeof(prod(zero ∘ dimscalartype, _sectors(T))) diff --git a/test/runtests.jl b/test/runtests.jl index f450c8b8..31a0b173 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,7 +11,7 @@ const sectorlist = ( DNIrrep{3}, DNIrrep{4}, DNIrrep{5}, CU1Irrep, A4Irrep, SU2Irrep, NewSU2Irrep, FibonacciAnyon, IsingAnyon, FermionParity, - FermionParity ⊠ FermionParity, + FermionParity ⊠ FermionParity, FibonacciAnyon ⊠ PlanarTrivial, Z3Irrep ⊠ Z4Irrep, FermionParity ⊠ U1Irrep ⊠ SU2Irrep, FermionParity ⊠ SU2Irrep ⊠ SU2Irrep, NewSU2Irrep ⊠ NewSU2Irrep, NewSU2Irrep ⊠ SU2Irrep, FermionParity ⊠ SU2Irrep ⊠ NewSU2Irrep,