@@ -41,7 +41,7 @@ function LeftGaugedQP(datfun, left_gs, right_gs=left_gs;
4141 Xs = map (enumerate (VLs)) do (loc, vl)
4242 x = similar (vl,
4343 right_virtualspace (vl) ←
44- excitation_space' ⊗ right_virtualspace (right_gs, loc))
44+ excitation_space ⊗ right_virtualspace (right_gs, loc))
4545 fill_data! (x, datfun)
4646 return x
4747 end
6363
6464function RightGaugedQP (datfun, left_gs, right_gs= left_gs;
6565 sector= one (sectortype (left_gs)), momentum= 0.0 )
66- # find the left null spaces for the TNS
66+ # find the left null spaces for the TNS
6767 excitation_space = Vect[typeof (sector)](sector => 1 )
68- VRs = [adjoint (leftnull (adjoint (v))) for v in _transpose_tail .(right_gs. AR)]
69- Xs = [TensorMap {scalartype(left_gs)} (undef, left_virtualspace (right_gs, loc)' ,
70- excitation_space' * _firstspace (VRs[loc]))
71- for loc in 1 : length (left_gs)]
72- fill_data! .(Xs, datfun)
68+ VRs = convert (Vector, map (rightnull! ∘ _transpose_tail, right_gs. AR))
69+ Xs = map (enumerate (VRs)) do (i, vr)
70+ x = similar (vr,
71+ left_virtualspace (left_gs, i)' ←
72+ excitation_space ⊗ _firstspace (vr))
73+ return fill_data! (x, datfun)
74+ end
7375 left_gs isa InfiniteMPS ||
7476 momentum == zero (momentum) ||
7577 @warn " momentum is ignored for finite quasiparticles"
@@ -84,10 +86,10 @@ function Base.similar(v::RightGaugedQP, ::Type{T}=scalartype(v)) where {T<:Numbe
8486 return RightGaugedQP (v. left_gs, v. right_gs, similar .(v. Xs, T), v. VRs, v. momentum)
8587end
8688
87- Base. getindex (v:: LeftGaugedQP , i:: Int ) = v. VLs[mod1 (i, end )] * v. Xs[mod1 (i, end )];
89+ Base. getindex (v:: LeftGaugedQP , i:: Int ) = v. VLs[mod1 (i, end )] * v. Xs[mod1 (i, end )]
8890function Base. getindex (v:: RightGaugedQP , i:: Int )
8991 @plansor t[- 1 - 2 ; - 3 - 4 ] := v. Xs[mod1 (i, end )][- 1 ; - 3 1 ] * v. VRs[mod1 (i, end )][1 ; - 4 - 2 ]
90- end ;
92+ end
9193
9294function Base. setindex! (v:: LeftGaugedQP , B, i:: Int )
9395 v. Xs[mod1 (i, end )] = v. VLs[mod1 (i, end )]' * B
0 commit comments