MPS/MPO to State vector/DM


I am trying to convert an MPS (MPO) to a state vector (DM) โ€“ I want to get all the coefficients in the computational basis. Is there an easy way of doing this?

Thank you!
Luis M.

You can contract it into a single ITensor with the contract function.

1 Like