qit.utils.orth

qit.utils.orth(A, tol=None, kernel=False, spectrum=False)

Construct an orthonormal basis for the range of A using SVD

Parameters
  • A (array[complex]) – a (M, N) matrix

  • tol (float) – numerical tolerance

  • kernel (bool) – iff True, return a basis for the kernel of A instead of the range of A

  • spectrum (bool) – iff True, also return the singular values of A

Returns

shape (M, K): orthonormal basis for the range of A

Return type

array[complex]

K is the effective rank of A, as determined by tol.

Adaptation of scipy.linalg.orth with optional absolute tolerance.