@@ -77,13 +77,25 @@ function e_plusmin_up(T, ::Type{Trivial}, ::Type{Trivial})
7777 return t
7878end
7979function e_plusmin_up (T, :: Type{Trivial} , :: Type{U1Irrep} )
80- return error (" Not implemented" )
80+ t = two_site_operator (T, Trivial, U1Irrep)
81+ I = sectortype (t)
82+ t[(I (1 , 1 // 2 ), I (0 , 0 ), dual (I (0 , 0 )), dual (I (1 , 1 // 2 )))][1 , 1 , 1 , 1 ] = 1
83+ t[(I (1 , 1 // 2 ), I (1 , - 1 // 2 ), dual (I (0 , 0 )), dual (I (0 , 0 )))][1 , 1 , 1 , 2 ] = 1
84+ t[(I (0 , 0 ), I (0 , 0 ), dual (I (1 , - 1 // 2 )), dual (I (1 , 1 // 2 )))][2 , 1 , 1 , 1 ] = - 1
85+ t[(I (0 , 0 ), I (1 , - 1 // 2 ), dual (I (1 , - 1 // 2 )), dual (I (0 , 0 )))][2 , 1 , 1 , 2 ] = - 1
86+ return t
8187end
8288function e_plusmin_up (T, :: Type{Trivial} , :: Type{SU2Irrep} )
8389 return error (" Not implemented" )
8490end
8591function e_plusmin_up (T, :: Type{U1Irrep} , :: Type{Trivial} )
86- return error (" Not implemented" )
92+ t = two_site_operator (T, U1Irrep, Trivial)
93+ I = sectortype (t)
94+ t[(I (1 , 1 ), I (0 , 0 ), dual (I (0 , 0 )), dual (I (1 , 1 )))][1 , 1 , 1 , 1 ] = 1
95+ t[(I (1 , 1 ), I (1 , 1 ), dual (I (0 , 0 )), dual (I (0 , 2 )))][1 , 2 , 1 , 1 ] = 1
96+ t[(I (0 , 2 ), I (0 , 0 ), dual (I (1 , 1 )), dual (I (1 , 1 )))][1 , 1 , 2 , 1 ] = - 1
97+ t[(I (0 , 2 ), I (1 , 1 ), dual (I (1 , 1 )), dual (I (0 , 2 )))][1 , 2 , 2 , 1 ] = - 1
98+ return t
8799end
88100function e_plusmin_up (T, :: Type{U1Irrep} , :: Type{U1Irrep} )
89101 t = two_site_operator (T, U1Irrep, U1Irrep)
@@ -124,13 +136,25 @@ function e_plusmin_down(T, ::Type{Trivial}, ::Type{Trivial})
124136 return t
125137end
126138function e_plusmin_down (T, :: Type{Trivial} , :: Type{U1Irrep} )
127- return error (" Not implemented" )
139+ t = two_site_operator (T, Trivial, U1Irrep)
140+ I = sectortype (t)
141+ t[(I (1 , - 1 // 2 ), I (0 , 0 ), dual (I (0 , 0 )), dual (I (1 , - 1 // 2 )))][1 , 1 , 1 , 1 ] = 1
142+ t[(I (1 , - 1 // 2 ), I (1 , 1 // 2 ), dual (I (0 , 0 )), dual (I (0 , 0 )))][1 , 1 , 1 , 2 ] = - 1
143+ t[(I (0 , 0 ), I (0 , 0 ), dual (I (1 , 1 // 2 )), dual (I (1 , - 1 // 2 )))][2 , 1 , 1 , 1 ] = 1
144+ t[(I (0 , 0 ), I (1 , 1 // 2 ), dual (I (1 , 1 // 2 )), dual (I (0 , 0 )))][2 , 1 , 1 , 2 ] = - 1
145+ return t
128146end
129147function e_plusmin_down (T, :: Type{Trivial} , :: Type{SU2Irrep} )
130148 return error (" Not implemented" )
131149end
132150function e_plusmin_down (T, :: Type{U1Irrep} , :: Type{Trivial} )
133- return error (" Not implemented" )
151+ t = two_site_operator (T, U1Irrep, Trivial)
152+ I = sectortype (t)
153+ t[(I (1 , 1 ), I (0 , 0 ), dual (I (0 , 0 )), dual (I (1 , 1 )))][2 , 1 , 1 , 2 ] = 1
154+ t[(I (1 , 1 ), I (1 , 1 ), dual (I (0 , 0 )), dual (I (0 , 2 )))][2 , 1 , 1 , 1 ] = - 1
155+ t[(I (0 , 2 ), I (0 , 0 ), dual (I (1 , 1 )), dual (I (1 , 1 )))][1 , 1 , 1 , 2 ] = 1
156+ t[(I (0 , 2 ), I (1 , 1 ), dual (I (1 , 1 )), dual (I (0 , 2 )))][1 , 1 , 1 , 1 ] = - 1
157+ return t
134158end
135159function e_plusmin_down (T, :: Type{U1Irrep} , :: Type{U1Irrep} )
136160 t = two_site_operator (T, U1Irrep, U1Irrep)
@@ -192,6 +216,23 @@ function e_plusmin(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:S
192216 return e_plusmin_up (T, particle_symmetry, spin_symmetry) +
193217 e_plusmin_down (T, particle_symmetry, spin_symmetry)
194218end
219+ function e_plusmin (T, :: Type{Trivial} , :: Type{SU2Irrep} )
220+ t = two_site_operator (T, Trivial, SU2Irrep)
221+ I = sectortype (t)
222+ f1 = only (fusiontrees ((I (0 , 0 ), I (1 , 1 // 2 )), I (1 , 1 // 2 )))
223+ f2 = only (fusiontrees ((I (1 , 1 // 2 ), I (0 , 0 )), I (1 , 1 // 2 )))
224+ t[f1, f2][1 , 1 , 1 , 1 ] = 1
225+ f3 = only (fusiontrees ((I (1 , 1 // 2 ), I (0 , 0 )), I (1 , 1 // 2 )))
226+ f4 = only (fusiontrees ((I (0 , 0 ), I (1 , 1 // 2 )), I (1 , 1 // 2 )))
227+ t[f3, f4][1 , 2 , 2 , 1 ] = - 1
228+ f5 = only (fusiontrees ((I (0 , 0 ), I (0 , 0 )), I (0 , 0 )))
229+ f6 = only (fusiontrees ((I (1 , 1 // 2 ), I (1 , 1 // 2 )), I (0 , 0 )))
230+ t[f5, f6][1 , 2 , 1 , 1 ] = sqrt (2 )
231+ f7 = only (fusiontrees ((I (1 , 1 // 2 ), I (1 , 1 // 2 )), I (0 , 0 )))
232+ f8 = only (fusiontrees ((I (0 , 0 ), I (0 , 0 )), I (0 , 0 )))
233+ t[f7, f8][1 , 1 , 2 , 1 ] = sqrt (2 )
234+ return t
235+ end
195236function e_plusmin (T, :: Type{U1Irrep} , :: Type{SU2Irrep} )
196237 t = two_site_operator (T, U1Irrep, SU2Irrep)
197238 I = sectortype (t)
@@ -237,13 +278,21 @@ function e_number_up(T::Type{<:Number}, ::Type{Trivial}=Trivial, ::Type{Trivial}
237278 return t
238279end
239280function e_number_up (T, :: Type{Trivial} , :: Type{U1Irrep} )
240- return error (" Not implemented" )
281+ t = single_site_operator (T, Trivial, U1Irrep)
282+ I = sectortype (t)
283+ t[(I (1 , 1 // 2 ), dual (I (1 , 1 // 2 )))][1 , 1 ] = 1
284+ t[(I (0 , 0 ), dual (I (0 , 0 )))][2 , 2 ] = 1
285+ return t
241286end
242287function e_number_up (T, :: Type{Trivial} , :: Type{SU2Irrep} )
243288 throw (ArgumentError (" `e_number_up` is not symmetric under `SU2Irrep` spin symmetry" ))
244289end
245290function e_number_up (T, :: Type{U1Irrep} , :: Type{Trivial} )
246- return error (" Not implemented" )
291+ t = single_site_operator (T, U1Irrep, Trivial)
292+ I = sectortype (t)
293+ block (t, I (1 , 1 ))[1 , 1 ] = 1
294+ block (t, I (0 , 2 ))[1 , 1 ] = 1
295+ return t
247296end
248297function e_number_up (T, :: Type{U1Irrep} , :: Type{U1Irrep} )
249298 t = single_site_operator (T, U1Irrep, U1Irrep)
@@ -280,13 +329,21 @@ function e_number_down(T::Type{<:Number}, ::Type{Trivial}=Trivial, ::Type{Trivia
280329 return t
281330end
282331function e_number_down (T, :: Type{Trivial} , :: Type{U1Irrep} )
283- return error (" Not implemented" )
332+ t = single_site_operator (T, Trivial, U1Irrep)
333+ I = sectortype (t)
334+ t[(I (1 , - 1 // 2 ), dual (I (1 , - 1 // 2 )))][1 , 1 ] = 1
335+ t[(I (0 , 0 ), I (0 , 0 ))][2 , 2 ] = 1
336+ return t
284337end
285338function e_number_down (T, :: Type{Trivial} , :: Type{SU2Irrep} )
286339 throw (ArgumentError (" `e_number_down` is not symmetric under `SU2Irrep` spin symmetry" ))
287340end
288341function e_number_down (T, :: Type{U1Irrep} , :: Type{Trivial} )
289- return error (" Not implemented" )
342+ t = single_site_operator (T, U1Irrep, Trivial)
343+ I = sectortype (t)
344+ block (t, I (1 , 1 ))[2 , 2 ] = 1 # expected to be [1,2]
345+ block (t, I (0 , 2 ))[1 , 1 ] = 1
346+ return t
290347end
291348function e_number_down (T, :: Type{U1Irrep} , :: Type{U1Irrep} )
292349 t = single_site_operator (T, U1Irrep, U1Irrep)
@@ -319,6 +376,13 @@ function e_number(T, particle_symmetry::Type{<:Sector}, spin_symmetry::Type{<:Se
319376 return e_number_up (T, particle_symmetry, spin_symmetry) +
320377 e_number_down (T, particle_symmetry, spin_symmetry)
321378end
379+ function e_number (T, :: Type{Trivial} , :: Type{SU2Irrep} )
380+ t = single_site_operator (T, Trivial, SU2Irrep)
381+ I = sectortype (t)
382+ block (t, I (1 , 1 // 2 ))[1 , 1 ] = 1
383+ block (t, I (0 , 0 ))[2 , 2 ] = 2
384+ return t
385+ end
322386function e_number (T, :: Type{U1Irrep} , :: Type{SU2Irrep} )
323387 t = single_site_operator (T, U1Irrep, SU2Irrep)
324388 I = sectortype (t)
@@ -339,6 +403,12 @@ function e_number_updown(T, particle_symmetry::Type{<:Sector},
339403 return e_number_up (T, particle_symmetry, spin_symmetry) *
340404 e_number_down (T, particle_symmetry, spin_symmetry)
341405end
406+ function e_number_updown (T, :: Type{Trivial} , :: Type{SU2Irrep} )
407+ t = single_site_operator (T, Trivial, SU2Irrep)
408+ I = sectortype (t)
409+ block (t, I (0 , 0 ))[2 , 2 ] = 1
410+ return t
411+ end
342412function e_number_updown (T, :: Type{U1Irrep} , :: Type{SU2Irrep} )
343413 t = single_site_operator (T, U1Irrep, SU2Irrep)
344414 I = sectortype (t)
0 commit comments