Hello,

The "DensityMatrix" algorithm is described here:

http://tensornetwork.org/mps/algorithms/denmat_mpo_mps/

It is a direct method (in that it only requires one sweep over the system), and is very reliable. However, it's accuracy may be limited to around 1e-8, because it relies on forming the density matrix which involves squaring the singular values, which can decrease the precision (but that is only an issue if you need very high precision).

The "Fit" algorithm involves variationally optimizing the overlap between an initial guess MPS and the MPO*MPS you are interesting in approximating with a sweeping algorithm similar to DMRG. It is known to get "stuck" (i.e. not find the correct MPS approximation) if the initial guess is not very good, or may take a lot of sweeps to converge (so you may want to try increasing the number of sweeps). This algorithm scales better with the bond dimensions of the input MPS/MPO compared to the "DensityMatrix" method.

If in your code applying the MPO to the MPS is not a performance bottleneck, and you do not need very high precision for your final MPS, then the "DensityMatrix" method is better to use. Otherwise, you will need to use the "Fit" method (and possibly play around with finding a better initial guess in order to get it to converge properly).

Cheers,

Matt