Generate a MPO from MPS

Hi,

Suppose I have a pure state \ket{\psi}, I can use a MPS to represent it. But I also want to act some non-unitary operators on the density operator \rho_0 = \ket{\psi}\bra{\psi} so later it will become a mixed state and I want to generate a MPO to represent the initial state \rho_0. How to convert my MPS state to a MPO?

Specifically, the state \ket{\psi} which I want is just the product state \ket{\uparrow,\dots,\uparrow}.

Thanks.

You can use:

rho = outer(psi', psi)
1 Like

Yes it works. Thanks, Matt!

1 Like