qimpy.math.eighg

eighg(H, O, use_cholesky=True)

Solve Hermitian generalized eigenvalue problem. Specifically, find E and V that satisfy H @ V = O @ V @ E.

Parameters:
  • H (Waitable[Tensor]) – Set of complex Hermitian (in last two dimensions) matrices to diagonalize, all dimensions before last two are batched over. Pending communication on H may be overlapped with orthogonalization of O, and is hence taken as a Waitable Tensor to facilitate this.

  • O (Tensor) – Corresponding overlap (metric) matrices, with same size as H. Must additionally be positive-definite.

  • use_cholesky (bool) – See qimpy.mpi.ortho_matrix()

Returns:

  • E (torch.Tensor) – Real eigenvalues (shape = H.shape[:-1])

  • V (torch.Tensor) – Eigenvectors (same shape as H and O)

Return type:

tuple[Tensor, Tensor]