@@ -92,6 +92,22 @@ Return the unit element within this type of sector.
9292"""
9393Base. one(a:: Sector ) = one(typeof(a))
9494
95+ """
96+ leftone(a::Sector) -> Sector
97+
98+ Return the left unit element within this type of sector.
99+ See also [`rightone`](@ref) and [`Base.one`](@ref).
100+ """
101+ leftone(a:: Sector ) = one(a)
102+
103+ """
104+ rightone(a::Sector) -> Sector
105+
106+ Return the right unit element within this type of sector.
107+ See also [`leftone`](@ref) and [`Base.one`](@ref).
108+ """
109+ rightone(a:: Sector ) = one(a)
110+
95111"""
96112 dual(a::Sector) -> Sector
97113
@@ -235,9 +251,9 @@ function dim(a::Sector)
235251 if FusionStyle(a) isa UniqueFusion
236252 1
237253 elseif FusionStyle(a) isa SimpleFusion
238- abs(1 / Fsymbol(a, conj(a), a, a, one (a), one (a)))
254+ abs(1 / Fsymbol(a, conj(a), a, a, leftone (a), rightone (a)))
239255 else
240- abs(1 / Fsymbol(a, conj(a), a, a, one (a), one (a))[1 ])
256+ abs(1 / Fsymbol(a, conj(a), a, a, leftone (a), rightone (a))[1 ])
241257 end
242258end
243259sqrtdim(a:: Sector ) = (FusionStyle(a) isa UniqueFusion) ? 1 : sqrt(dim(a))
@@ -250,20 +266,20 @@ Return the Frobenius-Schur indicator of a sector `a`.
250266"""
251267function frobeniusschur(a:: Sector )
252268 if FusionStyle(a) isa UniqueFusion || FusionStyle(a) isa SimpleFusion
253- sign(Fsymbol(a, conj(a), a, a, one (a), one (a)))
269+ sign(Fsymbol(a, conj(a), a, a, leftone (a), rightone (a)))
254270 else
255- sign(Fsymbol(a, conj(a), a, a, one (a), one (a))[1 ])
271+ sign(Fsymbol(a, conj(a), a, a, leftone (a), rightone (a))[1 ])
256272 end
257273end
258274
259275# Not necessary
260276function Asymbol(a:: I , b:: I , c:: I ) where {I<: Sector }
261277 if FusionStyle(I) isa UniqueFusion || FusionStyle(I) isa SimpleFusion
262278 (sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
263- conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, one (a), c))
279+ conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, leftone (a), c))
264280 else
265281 reshape((sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
266- conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, one (a), c)),
282+ conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, leftone (a), c)),
267283 (Nsymbol(a, b, c), Nsymbol(dual(a), c, b)))
268284 end
269285end
@@ -284,10 +300,11 @@ number. Otherwise it is a square matrix with row and column size
284300"""
285301function Bsymbol(a:: I , b:: I , c:: I ) where {I<: Sector }
286302 if FusionStyle(I) isa UniqueFusion || FusionStyle(I) isa SimpleFusion
287- (sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) * Fsymbol(a, b, dual(b), a, c, one(a))
303+ (sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
304+ Fsymbol(a, b, dual(b), a, c, rightone(a))
288305 else
289306 reshape((sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
290- Fsymbol(a, b, dual(b), a, c, one (a)),
307+ Fsymbol(a, b, dual(b), a, c, rightone (a)),
291308 (Nsymbol(a, b, c), Nsymbol(c, dual(b), a)))
292309 end
293310end
0 commit comments