Hi Miles, thanks a lot for the answer. For the partial trace, I guess what you mean is something like
n = 10
s = siteinds("Qubit",n)
rho = randomMPS(s)
for i = 1:k #k is the site I stopped. or i = m:length(rho)
rho[i] = rho[i]*delta(s[i],s[i]')
end
right? But I am not sure how to transfer this into a smaller MPO. This MPO still has n sites. Can you give more hints?
Yes, the sites I want to trace out are either 1:n or m:length(rho). The question I am considering these days is calculate the Renyi entropy or entanglement negativity or a quantum circuit with both haar random evolution and quantum channels. Due to the existence of quantum channels, I need a mixed state in general. But basically I just want to trace out either left or right half of the sites.
Thanks