Skip to content

Commit

Permalink
explicit variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Oct 10, 2024
1 parent 7461b11 commit 20acb54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sector_label(u::U1) = u.n
trivial(::Type{U1}) = trivial(U1{Int})
trivial(::Type{U1{T}}) where {T} = U1(T(0))

abelian_label_fusion_rule(T::Type{<:U1}, n1, n2) = T(n1 + n2)
abelian_label_fusion_rule(sector_type::Type{<:U1}, n1, n2) = sector_type(n1 + n2)

# hide label type in printing
function Base.show(io::IO, u::U1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ modulus(::Type{Z{N}}) where {N} = N

modulus(c::Z) = modulus(typeof(c))

trivial(category_type::Type{<:Z}) = category_type(0)
trivial(sector_type::Type{<:Z}) = sector_type(0)

function abelian_label_fusion_rule(category_type::Type{<:Z}, n1, n2)
return category_type((n1 + n2) % modulus(category_type))
function abelian_label_fusion_rule(sector_type::Type{<:Z}, n1, n2)
return sector_type((n1 + n2) % modulus(sector_type))
end

GradedAxes.dual(c::Z) = typeof(c)(mod(-sector_label(c), modulus(c)))

0 comments on commit 20acb54

Please sign in to comment.