-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Hi,
I am new to MPSKit and Julia in general and I am having great fun with your package. Thanks for creating and maintaining it. I wanted to ask about an issue that I have not been able to resolve for some time and I am unsure if what I am doing is the right thing.
I want to apply an operator to a single site in a WindowMPS. This operator need not be unitary therefore it can mess with the gauge. Since we are not allowed to modify AL or AR, I move the center to the site where I want to apply the operator and apply it there as follows
# create a WindowMPS object from InfiniteMPS
ψ_window = WindowMPS(ψ_gs, L)
# apply the field operator
mid = L ÷ 2
@tensor excite_left[a, b; c] := ϕ[b, l] * ψ_window.AC[mid - offset][a, l; c]
@tensor excite_right[a, b; c] := ϕ[b, l] * ψ_window.AC[mid + offset][a, l; c]
ψ_window.AC[mid - offset] = excite_left
ψ_window.AC[mid + offset] = excite_right
# normalize after applying the excitations
normalize!(ψ_window)
Doing this is leading to different physics that I expect. For example the expectation value of ϕ is not the same at the two sites. Could you let me know if there is a better way to do this?
Thanks in advance.
I am using
Julia v1.12.1
MPSKit v0.13.8
TensorKit v0.15.3