Hello all,

I'd like to ask a follow-up on the question posted here

http://itensor.org/support/2641/construction-of-matrix-product-density-operator?show=2641#q2641

since I do not fully understand the reply to that post.

Suppose I have a set of states obtained with a procedure like the one exemplified here:

https://itensor.org/docs.cgi?vers=cppv3&page=formulas/excited_dmrg

so I would have a number of excited states. Now, how would I go about writing a thermal density matrix where these states are added together with a thermal weight?

It seems to me we have a set of wave functions and that the density matrices for each of them should be written as a tensor product and then summed over, but it's not clear to me how that would be done with the MPS set resulting from the excited state search. Is there a straightforward way to create an MPO from an MPS? I checked the pages on manipulation of MPOs but could not find an answer.

Bonus question: assuming I have such an MPO describing a mixed state, how to get the expected value of an operator?

Best wishes,

Rafael