diff --git a/NDTensors/src/lib/Sectors/src/Sectors.jl b/NDTensors/src/lib/Sectors/src/Sectors.jl index cd0a7afb1b..f6c8bca92b 100644 --- a/NDTensors/src/lib/Sectors/src/Sectors.jl +++ b/NDTensors/src/lib/Sectors/src/Sectors.jl @@ -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") diff --git a/NDTensors/src/lib/Sectors/src/abstractcategory.jl b/NDTensors/src/lib/Sectors/src/abstractcategory.jl index 60443de5a7..f650ab22c8 100644 --- a/NDTensors/src/lib/Sectors/src/abstractcategory.jl +++ b/NDTensors/src/lib/Sectors/src/abstractcategory.jl @@ -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 ===================================== diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/fib.jl b/NDTensors/src/lib/Sectors/src/category_definitions/fib.jl index ff7f69795e..45b2180171 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/fib.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/fib.jl @@ -3,6 +3,7 @@ # # (same fusion rules as subcategory {0,1} of su2{3}) # +using ..GradedAxes: GradedAxes struct Fib <: AbstractCategory l::Int diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/ising.jl b/NDTensors/src/lib/Sectors/src/category_definitions/ising.jl index 1e7b51ab13..7ce3bcef7d 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/ising.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/ising.jl @@ -4,6 +4,9 @@ # (same fusion rules as su2{2}) # +using HalfIntegers: Half, twice +using ..GradedAxes: GradedAxes + struct Ising <: AbstractCategory l::Half{Int} end diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/o2.jl b/NDTensors/src/lib/Sectors/src/category_definitions/o2.jl index eb31227265..872f8cdd42 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/o2.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/o2.jl @@ -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 diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/su.jl b/NDTensors/src/lib/Sectors/src/category_definitions/su.jl index c83a13a48c..880a2780f0 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/su.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/su.jl @@ -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 diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/su2k.jl b/NDTensors/src/lib/Sectors/src/category_definitions/su2k.jl index 9570d7bcfa..ffcf4c5550 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/su2k.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/su2k.jl @@ -2,6 +2,9 @@ # Quantum 'group' su2ₖ # +using HalfIntegers: Half +using ...GradedAxes: GradedAxes + struct su2{k} <: AbstractCategory j::Half{Int} end diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/u1.jl b/NDTensors/src/lib/Sectors/src/category_definitions/u1.jl index 055b08f630..672fe0655d 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/u1.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/u1.jl @@ -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 diff --git a/NDTensors/src/lib/Sectors/src/category_definitions/zn.jl b/NDTensors/src/lib/Sectors/src/category_definitions/zn.jl index 665080b73d..25299703e3 100644 --- a/NDTensors/src/lib/Sectors/src/category_definitions/zn.jl +++ b/NDTensors/src/lib/Sectors/src/category_definitions/zn.jl @@ -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) diff --git a/NDTensors/src/lib/Sectors/src/category_product.jl b/NDTensors/src/lib/Sectors/src/category_product.jl index d34c7888e8..309f8a512f 100644 --- a/NDTensors/src/lib/Sectors/src/category_product.jl +++ b/NDTensors/src/lib/Sectors/src/category_product.jl @@ -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 diff --git a/NDTensors/src/lib/Sectors/src/symmetry_style.jl b/NDTensors/src/lib/Sectors/src/symmetry_style.jl index 417c506c6d..944fc0fe28 100644 --- a/NDTensors/src/lib/Sectors/src/symmetry_style.jl +++ b/NDTensors/src/lib/Sectors/src/symmetry_style.jl @@ -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