seemps.analysis.optimization.optimize_mps#

seemps.analysis.optimization.optimize_mps(mps, num_indices=100, make_canonical=True)[source]#

Returns the minimum and maximum values of a given MPS, together with their indices. Performs two full sweeps using optima_tt, one for the left-to-right and right-to-left directions respectively.

Parameters:
mpsMPS

The MPS to optimize.

num_indicesint, default=100

The maximum amount of indices to retain from each tensor. A larger number increases the probability of finding the global maxima, but has a larger cost.

make_canonicalbool, default=True

Whether to canonicalize the MPS prior to the search and orthogonalize its tensors.

Returns:
(i_1, y_1)tuple

A tuple with the index and minimum value in the MPS.

(i_2, y_2)tuple

A tuple with the index and maximum value in the MPS.