qimpy.math.ortho_matrix

ortho_matrix(O, use_cholesky=True)

Return orthonormalization matrix of a basis. The basis is specified by its overlap matrix or metric, O.

Parameters:
  • O (Tensor) – Overlap matrix / metric (Hermitian, positive definite) in last two dimensions, and batched over any preceding dimensions

  • use_cholesky (bool) – If True, use Cholesky decomposition followed by a triangular solve, essentially amounting to Gram-Schmidt orthonormalization. If False, return the symmetric orthonormalization matrix calculated by diagonalizing O, which may be more stable, but may be an order of magnitude slower than the default Cholesky method

Return type:

Tensor