Skip to content

Commit 89061ad

Browse files
authored
Dihedral group representations (#24)
* Reorganize irreps into separate files * Add `D{N}` * Add `DNIrrep` * Add property accessors * Add Sector iterator * Add Sector product iterator * Add Nsymbol and dim * Add one * Reorganization * Add topological data * Add tests * Add `D3Irrep` and `D4Irrep` * small fixes * Add orthogonality tests * Change group type aliases * clearer error message * Explicit 3-argument indexing * Move sqrt(2)/2 * Change `iseven(N)` checks * Remove unparseable show method
1 parent 1a246a1 commit 89061ad

File tree

11 files changed

+791
-495
lines changed

11 files changed

+791
-495
lines changed

src/TensorKitSectors.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export rightone, leftone
1717

1818
export triangle_equation, pentagon_equation, hexagon_equation
1919

20-
export Trivial, Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep, SU2Irrep, CU1Irrep
20+
export Trivial
21+
export Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep
22+
export D3Irrep, D4Irrep, DNIrrep, CU1Irrep
23+
export SU2Irrep
2124
export ZNElement, Z2Element, Z3Element, Z4Element
2225
export ProductSector, TimeReversed
2326
export FermionParity, FermionNumber, FermionSpin
@@ -27,7 +30,7 @@ export IsingBimodule
2730
# unicode exports
2831
# ---------------
2932
export , , ×
30-
export ℤ, ℤ₂, ℤ₃, ℤ₄, U₁, SU, SU₂, CU₁
33+
export Cyclic, ℤ, ℤ₂, ℤ₃, ℤ₄, U₁, SU, SU₂, Dihedral, D₃, D₄, CU₁
3134
export fℤ₂, fU₁, fSU₂
3235

3336
# imports
@@ -48,7 +51,7 @@ include("auxiliary.jl")
4851
include("sectors.jl")
4952
include("trivial.jl")
5053
include("groups.jl")
51-
include("irreps.jl") # irreps of symmetry groups, with bosonic braiding
54+
include("irreps/irreps.jl") # irreps of symmetry groups, with bosonic braiding
5255
include("groupelements.jl") # group elements with cocycles, no braiding
5356
include("product.jl") # direct product of different sectors
5457
include("fermions.jl") # irreps with defined fermionparity and fermionic braiding

src/groups.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@
33
abstract type Group end
44
abstract type AbelianGroup <: Group end
55

6-
abstract type {N} <: AbelianGroup end
6+
abstract type Cyclic{N} <: AbelianGroup end
77
abstract type U₁ <: AbelianGroup end
88
abstract type SU{N} <: Group end
99
abstract type CU₁ <: Group end
10+
abstract type Dihedral{N} <: Group end
1011

12+
const ℤ{N} = Cyclic{N}
1113
const ℤ₂ = ℤ{2}
1214
const ℤ₃ = ℤ{3}
1315
const ℤ₄ = ℤ{4}
16+
const D₃ = Dihedral{3}
17+
const D₄ = Dihedral{4}
1418
const SU₂ = SU{2}
1519

1620
type_repr(::Type{ℤ₂}) = "ℤ₂"
1721
type_repr(::Type{ℤ₃}) = "ℤ₃"
1822
type_repr(::Type{ℤ₄}) = "ℤ₄"
23+
type_repr(::Type{D₃}) = "D₃"
24+
type_repr(::Type{D₄}) = "D₄"
1925
type_repr(::Type{SU₂}) = "SU₂"
2026
type_repr(T::Type) = repr(T)
2127

0 commit comments

Comments
 (0)