SVD helpers (varipeps.utils.svd)

varipeps.utils.svd.gauge_fixed_svd(matrix: Array) Tuple[Array, Array, Array]

Calculate the gauge-fixed (also called sign-fixed) SVD. To this end, each singular vector are rotate in the way that the first element bigger than some numerical stability threshold (config parameter eps) is ensured to be along the positive real axis.

Parameters:

matrix (jnp.ndarray) – Matrix to calculate SVD for.

Returns:

Tuple with sign-fixed U, S and Vh of the SVD.

Return type:

tuple(jnp.ndarray, jnp.ndarray, jnp.ndarray)