File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ useful for testing.
1111"""
1212struct PlanarTrivial <: Sector end
1313
14+ type_repr (:: Type{PlanarTrivial} ) = " PlanarTrivial"
15+
1416Base. IteratorSize (:: Type{SectorValues{PlanarTrivial}} ) = HasLength ()
1517Base. length (:: SectorValues{PlanarTrivial} ) = 1
1618Base. iterate (:: SectorValues{PlanarTrivial} , i = 0 ) = i == 0 ? (PlanarTrivial (), 1 ) : nothing
@@ -54,6 +56,8 @@ struct FibonacciAnyon <: Sector
5456 end
5557end
5658
59+ type_repr (:: Type{FibonacciAnyon} ) = " FibonacciAnyon"
60+
5761Base. IteratorSize (:: Type{SectorValues{FibonacciAnyon}} ) = HasLength ()
5862Base. length (:: SectorValues{FibonacciAnyon} ) = 2
5963function Base. iterate (:: SectorValues{FibonacciAnyon} , i = 0 )
@@ -172,6 +176,8 @@ struct IsingAnyon <: Sector
172176 end
173177end
174178
179+ type_repr (:: Type{IsingAnyon} ) = " IsingAnyon"
180+
175181const all_isinganyons = (IsingAnyon (:I ), IsingAnyon (:σ ), IsingAnyon (:ψ ))
176182
177183Base. IteratorSize (:: Type{SectorValues{IsingAnyon}} ) = HasLength ()
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ const SU₂ = SU{2}
7777type_repr (:: Type{ℤ₂} ) = " ℤ₂"
7878type_repr (:: Type{ℤ₃} ) = " ℤ₃"
7979type_repr (:: Type{ℤ₄} ) = " ℤ₄"
80+ type_repr (:: Type{ℤ{N}} ) where {N} = " ℤ{$N }"
8081type_repr (:: Type{D₃} ) = " D₃"
8182type_repr (:: Type{D₄} ) = " D₄"
8283type_repr (:: Type{SU₂} ) = " SU₂"
You can’t perform that action at this time.
0 commit comments