# Truncated SVD¶

linalg.custom_svd.truncated_svd_arnoldi(M, chi, abs_tol=1e-14, rel_tol=None, keep_multiplets=False, eps_multiplet=1e-12, verbosity=0)[source]
Parameters
• M (torch.tensor) – square matrix of dimensions $$N \times N$$

• chi (int) – desired maximal rank $$\chi$$

• abs_tol (float) – absolute tolerance on minimal singular value

• rel_tol (float) – relative tolerance on minimal singular value

• keep_multiplets (bool) – truncate spectrum down to last complete multiplet

• eps_multiplet (float) – allowed splitting within multiplet

• verbosity (int) – logging verbosity

Returns

leading $$\chi$$ left singular vectors U, right singular vectors V, and singular values S

Return type

torch.tensor, torch.tensor, torch.tensor

Note: depends on scipy

Returns leading $$\chi$$-singular triples of a matrix M, by computing the partial symmetric decomposition of $$H=M^TM$$ as $$H= UDU^T$$ up to rank $$\chi$$. Returned tensors have dimensions

$dim(U)=(N,\chi),\ dim(S)=(\chi,\chi),\ \textrm{and}\ dim(V)=(N,\chi)$

Note

This function does not support autograd.

linalg.custom_svd.truncated_svd_gesdd(M, chi, abs_tol=1e-14, rel_tol=None, ad_decomp_reg=1e-12, keep_multiplets=False, eps_multiplet=1e-12, verbosity=0, diagnostics=None)[source]
Parameters
• M (torch.tensor) – matrix of dimensions $$N \times L$$

• chi (int) – desired maximal rank $$\chi$$

• abs_tol (float) – absolute tolerance on minimal singular value

• rel_tol (float) – relative tolerance on minimal singular value

• keep_multiplets (bool) – truncate spectrum down to last complete multiplet

• eps_multiplet (float) – allowed splitting within multiplet

• verbosity (int) – logging verbosity

Returns

leading $$\chi$$ left singular vectors U, right singular vectors V, and singular values S

Return type

torch.tensor, torch.tensor, torch.tensor

Returns leading $$\chi$$-singular triples of a matrix M by computing the full SVD $$M= USV^T$$. Returned tensors have dimensions

$dim(U)=(N,\chi),\ dim(S)=(\chi,\chi),\ \textrm{and}\ dim(V)=(L,\chi)$
linalg.custom_svd.truncated_svd_symarnoldi(M, chi, abs_tol=1e-14, rel_tol=None, keep_multiplets=False, eps_multiplet=1e-12, verbosity=0)[source]
Parameters
• M (torch.tensor) – square matrix of dimensions $$N \times N$$

• chi (int) – desired maximal rank $$\chi$$

• abs_tol (float) – absolute tolerance on minimal singular value

• rel_tol (float) – relative tolerance on minimal singular value

• keep_multiplets (bool) – truncate spectrum down to last complete multiplet

• eps_multiplet (float) – allowed splitting within multiplet

• verbosity (int) – logging verbosity

Returns

leading $$\chi$$ left singular vectors U, right singular vectors V, and singular values S

Return type

torch.tensor, torch.tensor, torch.tensor

Note: depends on scipy

Returns leading $$\chi$$-singular triples of a matrix M, where M is a symmetric matrix $$M=M^T$$, by computing the partial symmetric decomposition $$M= UDU^T$$ up to rank $$\chi$$. Returned tensors have dimensions

$dim(U)=(N,\chi),\ dim(S)=(\chi,\chi),\ \textrm{and}\ dim(V)=(N,\chi)$

Note

This function does not support autograd.

linalg.custom_svd.truncated_svd_symeig(M, chi, abs_tol=1e-14, rel_tol=None, keep_multiplets=False, eps_multiplet=1e-12, verbosity=0)[source]
Parameters
• M (torch.tensor) – square matrix of dimensions $$N \times N$$

• chi (int) – desired maximal rank $$\chi$$

• abs_tol (float) – absolute tolerance on minimal singular value

• rel_tol (float) – relative tolerance on minimal singular value

• keep_multiplets (bool) – truncate spectrum down to last complete multiplet

• eps_multiplet (float) – allowed splitting within multiplet

• verbosity (int) – logging verbosity

Returns

leading $$\chi$$ left singular vectors U, right singular vectors V, and singular values S

Return type

torch.tensor, torch.tensor, torch.tensor

Returns leading $$\chi$$-singular triples of a matrix M, where M is a symmetric matrix $$M=M^T$$, by computing the full symmetric decomposition $$M= UDU^T$$. Returned tensors have dimensions

$dim(U)=(N,\chi),\ dim(S)=(\chi,\chi),\ \textrm{and}\ dim(V)=(N,\chi)$

Note

This function does not support autograd.