scqubits.utils.spectrum_utils.get_eigenstate_index_maxoverlap#
- scqubits.utils.spectrum_utils.get_eigenstate_index_maxoverlap(eigenstates_qobj, reference_state_qobj, return_overlap=False)[source]#
For given list of qutip states, find index of the state that has largest overlap with the qutip ket reference_state_qobj. If |overlap| is smaller than 0.5, return None.
- Parameters:
eigenstates_qobj (
QutipEigenstates
) – as obtained from qutip .eigenstates()reference_state_qobj (
Qobj
) – specific reference statereturn_overlap (
bool
) – set to true if the value of largest overlap should be also returned (default value = False)
- Return type:
Union
[int
,Tuple
[int
,float
],None
]- Returns:
index of eigenstate from eigenstates_Qobj with the largest overlap with the reference_state_qobj, None if |overlap|<0.5