scqubits.utils.spectrum_utils

Functions

absorption_spectrum(spectrum_data)

Takes spectral data of energy eigenvalues and returns the absorption spectrum relative to a state of given index.

closest_dressed_energy(bare_energy, ...)

For a given bare energy value, this returns the closest lying dressed energy value from an array.

convert_evecs_to_ndarray(evecs_qutip)

Takes a qutip eigenstates array, as obtained with .eigenstates(), and converts it into a pure numpy array.

convert_matrix_to_qobj(operator, subsystem, ...)

convert_operator_to_qobj(operator, ...)

convert_opstring_to_qobj(operator, ...)

eigsh_safe(*args, **kwargs)

Wrapper method for scipy.sparse.linalg.eigsh which ensures the following.

emission_spectrum(spectrum_data)

Takes spectral data of energy eigenvalues and returns the emission spectrum relative to a state of given index.

extract_phase(complex_array[, position])

Extracts global phase from complex_array at given position.

generate_target_states_list(sweep, ...)

Based on a bare state label (i1, i2, ...) with i1 being the excitation level of subsystem 1, i2 the excitation level of subsystem 2 etc., generate a list of new bare state labels.

get_eigenstate_index_maxoverlap(...[, ...])

For given list of qutip states, find index of the state that has largest overlap with the qutip ket reference_state_qobj.

get_matrixelement_table(operator, state_table)

Calculates a table of matrix elements.

has_degeneracy(evals)

identity_wrap(operator, subsystem, subsys_list)

Takes the operator belonging to subsystem and "wraps" it in identities.

matrix_element(state1, operator, state2)

Calculate the matrix element <state1|operator|state2>.

order_eigensystem(evals, evecs[, ...])

Takes eigenvalues and corresponding eigenvectors and orders them (in place) according to the eigenvalues (from smallest to largest; real valued eigenvalues are assumed).

recast_esys_mapdata(esys_mapdata)

Takes data generated by a map of eigensystem calls and returns the eigenvalue and eigenstate tables

standardize_phases(complex_array)

Uses extract_phase to obtain global phase from array and returns standardized array with global phase factor standardized.

standardize_sign(real_array)

Standardizes the sign of a real-valued wavefunction by calculating the sign of the sum of all amplitudes up to the wavefunctions mid-position and making it positive.