Skip to content

Commit 03ad9ed

Browse files
authored
fix frobenius_schur_indicator (#42)
* fix frobenius_schur_indicator * add tests
1 parent 5a2083c commit 03ad9ed

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/sectors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ context of line bending.
417417
"""
418418
function frobenius_schur_indicator(a::Sector)
419419
ν = frobenius_schur_phase(a)
420-
return a == conj(a) ? zero(ν) : ν
420+
return a == conj(a) ? ν : zero(ν)
421421
end
422422

423423
# Not necessary

test/runtests.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ end
9090
@test size(Rsymbol(a, b, c)) == (0, 0)
9191
end
9292

93+
@testset "Frobenius-Schur" begin
94+
@test frobenius_schur_phase(SU2Irrep(0)) == 1.0
95+
@test frobenius_schur_phase(SU2Irrep(1 // 2)) == -1.0
96+
@test frobenius_schur_phase(Z2Irrep(0)) == 1.0
97+
@test frobenius_schur_phase(Z2Irrep(1)) == 1.0
98+
@test frobenius_schur_phase(Z3Irrep(0)) == 1.0
99+
@test frobenius_schur_phase(Z3Irrep(1)) == 1.0
100+
@test frobenius_schur_phase(U1Irrep(0)) == 1.0
101+
@test frobenius_schur_phase(U1Irrep(1)) == 1.0
102+
103+
@test frobenius_schur_indicator(SU2Irrep(0)) == 1.0
104+
@test frobenius_schur_indicator(SU2Irrep(1 // 2)) == -1.0
105+
@test frobenius_schur_indicator(Z2Irrep(0)) == 1.0
106+
@test frobenius_schur_indicator(Z2Irrep(1)) == 1.0
107+
@test frobenius_schur_indicator(Z3Irrep(0)) == 1.0
108+
@test frobenius_schur_indicator(Z3Irrep(1)) == 0.0
109+
@test frobenius_schur_indicator(U1Irrep(0)) == 1.0
110+
@test frobenius_schur_indicator(U1Irrep(1)) == 0.0
111+
end
112+
93113
@testset "SectorProduct printing" begin
94114
a = SU2Irrep(1)
95115
@test repr(a a) == "Irrep[SU₂](1) ⊗ Irrep[SU₂](1)"

0 commit comments

Comments
 (0)