@@ -147,19 +147,19 @@ function S_y(elt::Type{<:Complex}, ::Type{U1Irrep}; spin=1 // 2, side=:L)
147147 for (f1, f2) in fusiontrees (Y)
148148 c₁, c₂ = f1. uncoupled[1 ], f2. uncoupled[1 ]
149149 if c₁. charge == c₂. charge + 1
150- Y[f1, f2] .= _pauliterm (spin, c₁, c₂)im
151- elseif c₁. charge + 1 == c₂. charge
152150 Y[f1, f2] .= - _pauliterm (spin, c₁, c₂)im
151+ elseif c₁. charge + 1 == c₂. charge
152+ Y[f1, f2] .= + _pauliterm (spin, c₁, c₂)im
153153 end
154154 end
155155 elseif side == :R
156156 Y = TensorMap (zeros, elt, vspace ⊗ pspace ← pspace)
157157 for (f1, f2) in fusiontrees (Y)
158158 c₁, c₂ = f1. uncoupled[2 ], f2. uncoupled[1 ]
159159 if c₁. charge == c₂. charge + 1
160- Y[f1, f2] .= _pauliterm (spin, c₁, c₂)im
161- elseif c₁. charge + 1 == c₂. charge
162160 Y[f1, f2] .= - _pauliterm (spin, c₁, c₂)im
161+ elseif c₁. charge + 1 == c₂. charge
162+ Y[f1, f2] .= _pauliterm (spin, c₁, c₂)im
163163 end
164164 end
165165 else
@@ -215,8 +215,8 @@ function S_z(elt::Type{<:Number}, ::Type{U1Irrep}; spin=1 // 2)
215215 charges = U1Irrep .((- spin): spin)
216216 pspace = U1Space ((v => 1 for v in charges))
217217 Z = TensorMap (zeros, elt, pspace ← pspace)
218- for (i, c ) in enumerate (charges )
219- blocks (Z)[c] .= spin + 1 - i
218+ for (c, b ) in blocks (Z )
219+ b .= c . charge
220220 end
221221 return Z
222222end
@@ -265,16 +265,16 @@ end
265265function S_plus (elt:: Type{<:Number} , :: Type{U1Irrep} ; spin= 1 // 2 , side= :L )
266266 pspace = U1Space (i => 1 for i in (- spin): spin)
267267 if side == :L
268- vspace = U1Space (- 1 => 1 )
268+ vspace = U1Space (1 => 1 )
269269 S⁺ = TensorMap (zeros, elt, pspace ← pspace ⊗ vspace)
270270 for (c, b) in blocks (S⁺)
271- b .= 2 * _pauliterm (spin, c, only (c ⊗ U1Irrep (+ 1 )))
271+ b .= 2 * _pauliterm (spin, c, only (c ⊗ U1Irrep (- 1 )))
272272 end
273273 elseif side == :R
274- vspace = U1Space (1 => 1 )
274+ vspace = U1Space (- 1 => 1 )
275275 S⁺ = TensorMap (zeros, elt, vspace ⊗ pspace ← pspace)
276276 for (c, b) in blocks (S⁺)
277- b .= 2 * _pauliterm (spin, only (c ⊗ U1Irrep (- 1 )), c)
277+ b .= 2 * _pauliterm (spin, only (c ⊗ U1Irrep (+ 1 )), c)
278278 end
279279 else
280280 throw (ArgumentError (" invalid side `:$side `" ))
@@ -326,16 +326,16 @@ end
326326function S_min (elt:: Type{<:Number} , :: Type{U1Irrep} ; spin= 1 // 2 , side= :L )
327327 pspace = U1Space (i => 1 for i in (- spin): spin)
328328 if side == :L
329- vspace = U1Space (1 => 1 )
329+ vspace = U1Space (- 1 => 1 )
330330 S⁻ = TensorMap (zeros, elt, pspace ← pspace ⊗ vspace)
331331 for (c, b) in blocks (S⁻)
332- b .= 2 * _pauliterm (spin, only (c ⊗ U1Irrep (- 1 )), c)
332+ b .= 2 * _pauliterm (spin, only (c ⊗ U1Irrep (+ 1 )), c)
333333 end
334334 elseif side == :R
335- vspace = U1Space (- 1 => 1 )
335+ vspace = U1Space (+ 1 => 1 )
336336 S⁻ = TensorMap (zeros, elt, vspace ⊗ pspace ← pspace)
337337 for (c, b) in blocks (S⁻)
338- b .= 2 * _pauliterm (spin, c, only (c ⊗ U1Irrep (+ 1 )))
338+ b .= 2 * _pauliterm (spin, c, only (c ⊗ U1Irrep (- 1 )))
339339 end
340340 else
341341 throw (ArgumentError (" invalid side `:$side `" ))
0 commit comments