scqubits.core.diag.evals_scipy_sparse#
- scqubits.core.diag.evals_scipy_sparse(matrix, evals_count, **kwargs)[source]#
Diagonalization based on scipy’s (sparse) eigsh function. Only evals are returned.
Note the convoluted convention when it comes to ordering and how it is related to the presence of return_eigenvectors parameter. See here for details: https://github.com/scipy/scipy/issues/9082
- Parameters:
matrix (
Union
[ndarray
,csc_matrix
,Qobj
]) – ndarray or qutip.Qobj to be diagonalizedevals_count (
int
) – how many eigenvalues should be returnedkwargs – optional settings that are passed onto the diagonalization routine
- Return type:
ndarray
- Returns:
eigenvalues of matrix