I have a density matrix MPO that generated by outer(psi,psi). Now I want to do some operation like(Z_1 Z_2 \rho Z_2 Z_1). How can i do this?
You can use the apply
function to apply gates to an MPO.
Please note also that in your example, the state both before and afterward will be pure. So the MPO representation of the density matrix will be much more expensive computationally than just using the pure state, MPS representation of |\psi\rangle and applying just Z_1 Z_2 onto |\psi\rangle.
Also, the documentation for the relevant version of the apply
function is under the synonym product
and you can find it at the link below, with details about how to use it for applying ITensors to either MPS or MPO:
thank you very much for your apply, so honorable!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.