Skip to content

Commit

Permalink
import at begining of file
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Sep 27, 2024
1 parent 6ea394c commit b94f4e8
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 14 deletions.
14 changes: 0 additions & 14 deletions NDTensors/src/lib/Sectors/src/Sectors.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
module Sectors

using BlockArrays: blocklengths
using HalfIntegers: Half, HalfInteger, half, twice

using NDTensors.LabelledNumbers:
LabelledInteger, label, label_type, labelled, unlabel, unlabel_type
using NDTensors.GradedAxes:
GradedAxes,
blocklabels,
dual,
fuse_blocklengths,
fusion_product,
gradedrange,
tensor_product

include("symmetry_style.jl")
include("abstractcategory.jl")
include("category_definitions/fib.jl")
Expand Down
4 changes: 4 additions & 0 deletions NDTensors/src/lib/Sectors/src/abstractcategory.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# This file defines the abstract type AbstractCategory
# all fusion categories (Z{2}, SU2, Ising...) are subtypes of AbstractCategory

using BlockArrays: blocklengths
using ..LabelledNumbers: LabelledInteger, label, label_type, labelled, unlabel, unlabel_type
using ..GradedAxes: GradedAxes, blocklabels, fuse_blocklengths, gradedrange, tensor_product

abstract type AbstractCategory end

# =================================== Base interface =====================================
Expand Down
1 change: 1 addition & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/fib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# (same fusion rules as subcategory {0,1} of su2{3})
#
using ..GradedAxes: GradedAxes

struct Fib <: AbstractCategory
l::Int
Expand Down
3 changes: 3 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/ising.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# (same fusion rules as su2{2})
#

using HalfIntegers: Half, twice
using ..GradedAxes: GradedAxes

struct Ising <: AbstractCategory
l::Half{Int}
end
Expand Down
3 changes: 3 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/o2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# - 2-dimensional Sz=±|m| irrep, with m a half integer
#

using HalfIntegers: Half, HalfInteger
using ..GradedAxes: GradedAxes

# here we use only one half-integer as label:
# - l=0 for trivial
# - l=-1 for zero odd
Expand Down
3 changes: 3 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/su.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Special unitary group SU(N)
#

using HalfIntegers: HalfInteger, half, twice
using ...GradedAxes: GradedAxes

struct SU{N,M} <: AbstractCategory
# l is the first row of the
# Gelfand-Tsetlin (GT) pattern describing
Expand Down
3 changes: 3 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/su2k.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Quantum 'group' su2ₖ
#

using HalfIntegers: Half
using ...GradedAxes: GradedAxes

struct su2{k} <: AbstractCategory
j::Half{Int}
end
Expand Down
2 changes: 2 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/u1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# U₁ group (circle group, or particle number, total Sz etc.)
#

using ...GradedAxes: GradedAxes

# Parametric type to allow both integer label as well as
# HalfInteger for easy conversion to/from SU(2)
struct U1{T} <: AbstractCategory
Expand Down
2 changes: 2 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_definitions/zn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Cyclic group Zₙ
#

using ...GradedAxes: GradedAxes

struct Z{N} <: AbstractCategory
m::Int
Z{N}(m) where {N} = new{N}(m % N)
Expand Down
4 changes: 4 additions & 0 deletions NDTensors/src/lib/Sectors/src/category_product.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# This files defines a structure for Cartesian product of 2 or more fusion categories
# e.g. U(1)×U(1), U(1)×SU2(2)×SU(3)

using BlockArrays: blocklengths
using ..LabelledNumbers: LabelledInteger, label, labelled, unlabel
using ..GradedAxes: GradedAxes, dual

# ===================================== Definition =======================================
struct CategoryProduct{Categories} <: AbstractCategory
cats::Categories
Expand Down
2 changes: 2 additions & 0 deletions NDTensors/src/lib/Sectors/src/symmetry_style.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This file defines SymmetryStyle, a trait to distinguish abelian groups, non-abelian groups
# and non-group fusion categories.

using ..LabelledNumbers: LabelledInteger, label

abstract type SymmetryStyle end

struct AbelianGroup <: SymmetryStyle end
Expand Down

0 comments on commit b94f4e8

Please sign in to comment.