pinv

tenpy.linalg.np_conserved.pinv(a, cutoff=1e-15)[source]

Compute the (Moore-Penrose) pseudo-inverse of a matrix.

Equivalent to the following procedure: Perform a SVD, U, S, VH = svd(a, cutoff=cutoff) with a cutoff > 0, calculate P = U * diag(1/S) * VH (with * denoting tensordot) and return P.conj.transpose().

Parameters:
  • a ((M, N) Array) – Matrix to be pseudo-inverted.

  • cutoff (float) – Cutoff for small singular values, as given to svd(). (Note: different convention than numpy.)

Returns:

B – The pseudo-inverse of a.

Return type:

(N, M) Array