Hi Miles,
thank you for the heads up. I did what you suggested already for the full Renyi entropy, however I encounter some problems when focusing on a given QN sector.
Usually I built the reduced density matrix in a given sector with the following function:
function RDMq(ψ, N, sites, site1,site2, QNlist)
orthogonalize!(ψ,site1,svd_alg="qr_iteration")
ψdag = dag(ψ)
r1=linkind(ψ,1)
ρA = prime(ψ[site1],r1)*prime(ψdag[site1],"Site")
for j in site1+1:site2-1
lj = linkind(ψ,j-1)
rj = linkind(ψ,j)
ρA *= prime(prime(ψ[j],lj),rj)
ρA *= prime(ψdag[j],"Site")
end
l2 = linkind(ψ,site2-1)
r2 = prime(linkind(ψ,site2))
r2p = linkind(ψdag,site2)
ρA *= prime(ψ[site2],l2)
ρA *= prime(prime(ψdag[site2],"Site"),r2p)
deltaTensor=deltaQ(r2,r2p,QNlist)
ρA *= deltaTensor
C=calc_trace(ρA,site1,site2)
return ρA*(1/real(C))
end
where @@ \psi @@ is an MPS and deltaTensor is obtained as explained in the previous question I asked
http://itensor.org/support/2879/extract-project-iqtensor-on-a-qn-subspace?show=2879#q2879.
As you see it starts from an MPS. I don't know how to generalise it for an MPO or how to perform a projection of the MPO in a given sector in alternative ways. This is also the reason why I asked if I could perform an SVD or something different.
Best,
Vittorio
EDIT: It seems I can't write in LaTeX properly.
EDIT2: A problem aside from the one discussed here is that constructing the density matrices of different trajectories of the dynamics, according to what I wrote above, and summing them gives me a "getindex" error. Otherwise this last approach might be feasible. Nonetheless it is not efficient since the complexity of the construction I wrote above should be exponential in the dimension of the subsystem (site2-site1).