Skip to content

Commit 5e57667

Browse files
authored
fix sectorscalartype for product sectors (#72)
1 parent b2aa8bc commit 5e57667

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/product.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ function braidingscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple}
228228
return typeof(prod(zero braidingscalartype, _sectors(T)))
229229
end
230230
function sectorscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple}
231-
return typeof(prod(zero sectorscalartype, _sectors(T)))
231+
return if BraidingStyle(ProductSector{T}) == NoBraiding()
232+
typeof(prod(zero fusionscalartype, _sectors(T)))
233+
else
234+
typeof(prod(zero sectorscalartype, _sectors(T)))
235+
end
232236
end
233237
function dimscalartype(::Type{<:ProductSector{T}}) where {T <: SectorTuple}
234238
return typeof(prod(zero dimscalartype, _sectors(T)))

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const sectorlist = (
1111
DNIrrep{3}, DNIrrep{4}, DNIrrep{5}, CU1Irrep,
1212
A4Irrep, SU2Irrep, NewSU2Irrep,
1313
FibonacciAnyon, IsingAnyon, FermionParity,
14-
FermionParity FermionParity,
14+
FermionParity FermionParity, FibonacciAnyon PlanarTrivial,
1515
Z3Irrep Z4Irrep, FermionParity U1Irrep SU2Irrep,
1616
FermionParity SU2Irrep SU2Irrep, NewSU2Irrep NewSU2Irrep,
1717
NewSU2Irrep SU2Irrep, FermionParity SU2Irrep NewSU2Irrep,

0 commit comments

Comments
 (0)