Skip to content

Commit 6178240

Browse files
authored
Frobenius-Schur disambiguation (#28)
* `frobenius_schur_indicator` and `frobenius_schur_phase` * deprecate `frobeniusschur` * Bump coverage slightly
1 parent bbebdda commit 6178240

File tree

9 files changed

+41
-16
lines changed

9 files changed

+41
-16
lines changed

src/TensorKitSectors.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export Irrep, GroupElement
77

88
export Nsymbol, Fsymbol, Rsymbol, Asymbol, Bsymbol
99
export sectorscalartype
10-
export dim, sqrtdim, invsqrtdim, frobeniusschur, twist, fusiontensor, dual
10+
export dim, sqrtdim, invsqrtdim, frobenius_schur_indicator, frobenius_schur_phase, twist, fusiontensor, dual
1111
export otimes, deligneproduct, times
1212
export FusionStyle, UniqueFusion, MultipleFusion, SimpleFusion, GenericFusion,
1313
MultiplicityFreeFusion
@@ -74,4 +74,8 @@ function __precompile__()
7474
return
7575
end
7676

77+
# deprecate
78+
# ---------
79+
@deprecate frobeniusschur(a::Sector) frobenius_schur_phase(a)
80+
7781
end # module TensorKitSectors

src/groupelements.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Base.inv(c::GroupElement) -> GroupElement
2424
TensorKitSectors.cocycle(c1::GroupElement, c2::GroupElement, c3::GroupElement) -> Number
2525
```
2626
The methods `conj`, `dual`, `⊗`, `Nsymbol`, `Fsymbol`, `dim`, `Asymbol`, `Bsymbol` and
27-
`frobeniusschur` will then be automatically defined. If no `cocycle` method is defined,
27+
`frobenius_schur_phase` will then be automatically defined. If no `cocycle` method is defined,
2828
the cocycle will be assumed to be trivial, i.e. equal to `1`.
2929
3030
"""
@@ -46,9 +46,9 @@ function Fsymbol(a::I, b::I, c::I, d::I, e::I, f::I) where {I <: AbstractGroupEl
4646
end
4747
end
4848
dim(c::AbstractGroupElement) = 1
49-
frobeniusschur(c::AbstractGroupElement) = cocycle(c, inv(c), c)
49+
frobenius_schur_phase(c::AbstractGroupElement) = cocycle(c, inv(c), c)
5050
function Asymbol(a::I, b::I, c::I) where {I <: AbstractGroupElement}
51-
A = frobeniusschur(dual(a)) * cocycle(inv(a), a, b)
51+
A = frobenius_schur_phase(dual(a)) * cocycle(inv(a), a, b)
5252
return c == a * b ? A : zero(A)
5353
end
5454
function Bsymbol(a::I, b::I, c::I) where {I <: AbstractGroupElement}

src/irreps/cu1irrep.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@ function fusiontensor(a::CU1Irrep, b::CU1Irrep, c::CU1Irrep)
251251
end
252252
return C
253253
end
254-
frobeniusschur(::CU1Irrep) = 1
254+
frobenius_schur_phase(::CU1Irrep) = 1

src/irreps/irreps.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Nsymbol(a::I, b::I, c::I) where {I <: AbelianIrrep} = c == first(a ⊗ b)
5454
function Fsymbol(a::I, b::I, c::I, d::I, e::I, f::I) where {I <: AbelianIrrep}
5555
return Int(Nsymbol(a, b, e) * Nsymbol(e, c, d) * Nsymbol(b, c, f) * Nsymbol(a, f, d))
5656
end
57-
frobeniusschur(a::AbelianIrrep) = 1
57+
frobenius_schur_phase(a::AbelianIrrep) = 1
5858
Asymbol(a::I, b::I, c::I) where {I <: AbelianIrrep} = Int(Nsymbol(a, b, c))
5959
Bsymbol(a::I, b::I, c::I) where {I <: AbelianIrrep} = Int(Nsymbol(a, b, c))
6060
Rsymbol(a::I, b::I, c::I) where {I <: AbelianIrrep} = Int(Nsymbol(a, b, c))

src/precompile.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ function precompile_sector(::Type{I}) where {I <: Sector}
2525
precompile(unit, (I,))
2626
precompile(allunits, (I,))
2727
precompile(twist, (I,))
28-
precompile(frobeniusschur, (I,))
28+
precompile(frobenius_schur_phase, (I,))
29+
precompile(frobenius_schur_indicator, (I,))
2930
precompile(fusiontensor, (I, I, I))
3031

3132
return nothing

src/product.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ function Asymbol(a::P, b::P, c::P) where {P <: ProductSector{<:Tuple{Sector}}}
191191
return Asymbol(map(_firstsector, (a, b, c))...)
192192
end
193193

194-
frobeniusschur(p::ProductSector) = prod(map(frobeniusschur, p.sectors))
194+
frobenius_schur_phase(p::ProductSector) = prod(frobenius_schur_phase, p.sectors)
195+
frobenius_schur_indicator(p::ProductSector) = prod(frobenius_schur_indicator, p.sectors)
195196

196197
function fusiontensor(a::P, b::P, c::P) where {P <: ProductSector}
197198
return _kron(

src/sectors.jl

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Every new `I<:Sector` should implement the following methods:
2222
`UniqueFusion`/`SimpleFusion`) or matrix (in case of `GenericFusion`)
2323
and optionally
2424
* `dim(a::I)`: quantum dimension of sector `a`
25-
* `frobeniusschur(a::I)`: Frobenius-Schur indicator of `a`
25+
* `frobenius_schur_indicator(a::I)`: Frobenius-Schur indicator of `a` (1, 0, -1)
26+
* `frobenius_schur_phase(a::I)`: Frobenius-Schur phase of `a` (±1)
2627
* `Bsymbol(a::I, b::I, c::I)`: B-symbol: scalar (in case of
2728
`UniqueFusion`/`SimpleFusion`) or matrix (in case of `GenericFusion`)
2829
* `twist(a::I)` -> twist of sector `a`
@@ -316,27 +317,43 @@ sqrtdim(a::Sector) = (FusionStyle(a) isa UniqueFusion) ? 1 : sqrt(dim(a))
316317
invsqrtdim(a::Sector) = (FusionStyle(a) isa UniqueFusion) ? 1 : inv(sqrt(dim(a)))
317318

318319
"""
319-
frobeniusschur(a::Sector)
320+
frobenius_schur_phase(a::Sector)
320321
321-
Return the Frobenius-Schur indicator of a sector `a`.
322+
Return the Frobenius-Schur phase of a sector ``\\kappa_a ∈ {1, -1}``, which coincides with
323+
the Frobenius-Schur indicator if `a == dual(a)`, and can otherwise be gauged to be `1`.
324+
325+
See also [`frobenius_schur_indicator`](@ref) for the group-theoretic version.
322326
"""
323-
function frobeniusschur(a::Sector)
327+
function frobenius_schur_phase(a::Sector)
324328
return if FusionStyle(a) isa UniqueFusion || FusionStyle(a) isa SimpleFusion
325329
sign(Fsymbol(a, dual(a), a, a, leftunit(a), rightunit(a)))
326330
else
327331
sign(Fsymbol(a, dual(a), a, a, leftunit(a), rightunit(a))[1])
328332
end
329333
end
330334

335+
"""
336+
frobenius_schur_indicator(a::Sector)
337+
338+
Return the Frobenius-Schur indicator of a sector ``\\nu_a ∈ {1, 0, -1}``, which distinguishes
339+
between real, complex and quaternionic representations.
340+
341+
See also [`frobenius_schur_phase`](@ref) for the category-theoretic version.
342+
"""
343+
function frobenius_schur_indicator(a::Sector)
344+
ν = frobenius_schur_phase(a)
345+
return a == conj(a) ? zero(ν) : ν
346+
end
347+
331348
# Not necessary
332349
function Asymbol(a::I, b::I, c::I) where {I <: Sector}
333350
return if FusionStyle(I) isa UniqueFusion || FusionStyle(I) isa SimpleFusion
334351
(sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
335-
conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, leftunit(a), c))
352+
conj(frobenius_schur_phase(a) * Fsymbol(dual(a), a, b, b, leftunit(a), c))
336353
else
337354
reshape(
338355
(sqrtdim(a) * sqrtdim(b) * invsqrtdim(c)) *
339-
conj(frobeniusschur(a) * Fsymbol(dual(a), a, b, b, leftunit(a), c)),
356+
conj(frobenius_schur_phase(a) * Fsymbol(dual(a), a, b, b, leftunit(a), c)),
340357
(Nsymbol(a, b, c), Nsymbol(dual(a), c, b))
341358
)
342359
end

test/multifusion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Istr = TensorKitSectors.type_repr(I)
4141
@constinferred dual(s)
4242
@test dual(dual(s)) == s
4343
@constinferred dim(s)
44-
@constinferred frobeniusschur(s)
44+
@constinferred frobenius_schur_phase(s)
4545
@constinferred convert(IsingAnyon, s)
4646

4747
@constinferred Bsymbol(C, C, C)

test/sectors.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ Istr = TKS.type_repr(I)
88
@test @constinferred(unit(s[1])) == @constinferred(unit(I))
99
@constinferred dual(s[1])
1010
@constinferred dim(s[1])
11-
@constinferred frobeniusschur(s[1])
11+
@constinferred frobenius_schur_phase(s[1])
12+
@constinferred frobenius_schur_indicator(s[1])
1213
@constinferred Nsymbol(s...)
14+
@constinferred Asymbol(s...)
1315
B = @constinferred Bsymbol(s...)
1416
F = @constinferred Fsymbol(s..., s...)
1517
if BraidingStyle(I) isa HasBraiding

0 commit comments

Comments
 (0)