scqubits.core.diag.evals_jax_dense#
- scqubits.core.diag.evals_jax_dense(matrix, evals_count, **kwargs)[source]#
Diagonalization based on jax’s (dense) jax.scipy.linalg.eigh function. Only eigenvalues are returned.
If available, different backends/devics (e.g., particular GPUs) can be set though jax’s interface, see https://jax.readthedocs.io/en/latest/user_guides.html
Note, that jax’s documentation is inconsistent, and eigvals and/or subset_by_index seems not to be implemented. Hence, here we calculate all the eigenvalues, but then only return the requested subset.
- Parameters:
matrix – ndarray or qutip.Qobj to be diagonalized
evals_count – how many eigenvalues should be returned
kwargs – optional settings that are passed onto the diagonalization routine
- Return type:
Union
[Tuple
[ndarray
,ndarray
],Tuple
[ndarray
,QutipEigenstates
]]- Returns:
eigenvalues of matrix