scqubits.utils.spectrum_utils.order_eigensystem¶
- scqubits.utils.spectrum_utils.order_eigensystem(evals, evecs, standardize_phase=False)[source]¶
Takes eigenvalues and corresponding eigenvectors and orders them (in place) according to the eigenvalues (from smallest to largest; real valued eigenvalues are assumed). Compare http://stackoverflow.com/questions/22806398.
- Parameters:
evals (
ndarray
) – array of eigenvaluesevecs (
ndarray
) – array containing eigenvectors; evecs[:, 0] is the first eigenvector etc.standardize_phase (
bool
) – if True, standardize the phase of the eigenvectors (default value = False)
- Return type:
Tuple
[ndarray
,ndarray
]