@@ -81,17 +81,12 @@ FusionStyle(::Type{FibonacciAnyon}) = SimpleFusion()
8181BraidingStyle (:: Type{FibonacciAnyon} ) = Anyonic ()
8282Base. isreal (:: Type{FibonacciAnyon} ) = false
8383
84- ⊗ (a :: FibonacciAnyon , b :: FibonacciAnyon ) = FibonacciIterator (a, b)
84+ const FibonacciAnyonProdIterator = SectorProductIterator{FibonacciAnyon}
8585
86- struct FibonacciIterator
87- a:: FibonacciAnyon
88- b:: FibonacciAnyon
89- end
90- Base. IteratorSize (:: Type{FibonacciIterator} ) = Base. HasLength ()
91- Base. IteratorEltype (:: Type{FibonacciIterator} ) = Base. HasEltype ()
92- Base. length (iter:: FibonacciIterator ) = (isunit (iter. a) || isunit (iter. b)) ? 1 : 2
93- Base. eltype (:: Type{FibonacciIterator} ) = FibonacciAnyon
94- function Base. iterate (iter:: FibonacciIterator , state = 1 )
86+ Base. IteratorSize (:: Type{FibonacciAnyonProdIterator} ) = Base. HasLength ()
87+ Base. length (iter:: FibonacciAnyonProdIterator ) = (isunit (iter. a) || isunit (iter. b)) ? 1 : 2
88+
89+ function Base. iterate (iter:: FibonacciAnyonProdIterator , state = 1 )
9590 I = FibonacciAnyon (:I )
9691 τ = FibonacciAnyon (:τ )
9792 if state == 1 # first iteration
@@ -200,23 +195,15 @@ FusionStyle(::Type{IsingAnyon}) = SimpleFusion()
200195BraidingStyle (:: Type{IsingAnyon} ) = Anyonic ()
201196Base. isreal (:: Type{IsingAnyon} ) = false
202197
203- ⊗ (a:: IsingAnyon , b:: IsingAnyon ) = IsingIterator (a, b)
204-
205- struct IsingIterator
206- a:: IsingAnyon
207- b:: IsingAnyon
208- end
209-
210- Base. IteratorSize (:: Type{IsingIterator} ) = Base. HasLength ()
211- Base. IteratorEltype (:: Type{IsingIterator} ) = Base. HasEltype ()
212- Base. eltype (:: Type{IsingIterator} ) = IsingAnyon
198+ const IsingAnyonProdIterator = SectorProductIterator{IsingAnyon}
213199
214- function Base. length (iter:: IsingIterator )
200+ Base. IteratorSize (:: Type{IsingAnyonProdIterator} ) = Base. HasLength ()
201+ function Base. length (iter:: IsingAnyonProdIterator )
215202 σ = IsingAnyon (:σ )
216203 return (iter. a == σ && iter. b == σ) ? 2 : 1
217204end
218205
219- function Base. iterate (iter:: IsingIterator , state = 1 )
206+ function Base. iterate (iter:: IsingAnyonProdIterator , state = 1 )
220207 I, σ, ψ = all_isinganyons
221208 if state == 1 # first iteration
222209 iter. a == I && return (iter. b, 2 )
0 commit comments