qm_sim.eigensolvers.scipy_eigen.scipy_get_eigen

qm_sim.eigensolvers.scipy_eigen.scipy_get_eigen(mat: dia_matrix, n: int, shape: tuple[int], **kwargs) tuple[ndarray, ndarray][source]

Calculate n eigenvalues of mat. Reshape output to shape

Parameters:
  • mat (sp.dia_matrix) – Matrix to calculate eigenvectors and -values for

  • n (int) – Amount of eigenvectors and -values to calculate

  • shape (tuple[int]) – Output shape for eigenvectors

Returns:

eigenvalues, eigenvectors

Return type:

tuple[np.ndarray(shape = (n)), np.ndarray(shape = (n, shape)]