SpectrumLookup Class

SpectrumLookup

class scqubits.core.spec_lookup.SpectrumLookupMixin(hilbertspace)[source]

SpectrumLookupMixin is used as a mix-in class by ParameterSweep. It makes various spectrum and spectrum lookup related methods directly available at the ParameterSweep level.

bare_eigenstates(subsys, param_indices=None)[source]

Return ndarray of bare eigenstates for given subsystems and parameter index. Eigenstates are expressed in the basis internal to the subsystems. Usually to be with pre-slicing.

Return type

NamedSlotsNdarray

bare_eigenvals(subsys, param_indices=None)[source]

Return NamedSlotsNdarray of bare eigenenergies for given subsystem, usually to be used with preslicing.

Parameters
  • subsys (QuantumSystem) – Hilbert space subsystem for which bare eigendata is to be looked up

  • param_indices (Optional[Tuple[int, ...]]) – position indices of parameter values in question

Return type

NamedSlotsNdarray

Returns

bare eigenenergies for the specified subsystem and the external parameter fixed to the value indicated by its index

bare_index(dressed_index, param_indices=None)[source]

For given dressed index, look up the corresponding bare index.

Return type

Optional[Tuple[int, ...]]

Returns

Bare state specification in tuple form. Example: (1,0,3) means subsystem 1 is in bare state 1, subsystem 2 in bare state 0, and subsystem 3 in bare state 3.

bare_productstate(bare_index)[source]

Return the bare product state specified by bare_index. Note: no parameter dependence here, since the Hamiltonian is always represented in the bare product eigenbasis.

Parameters

bare_index (Tuple[int, ...]) –

Return type

Qobj

Returns

ket in full Hilbert space

dressed_index(bare_labels, param_indices=None)[source]

For given bare product state return the corresponding dressed-state index.

Parameters
  • bare_labels (Tuple[int, ...]) – bare_labels = (index, index2, …)

  • param_indices (Union[int, slice, Tuple[int], List[int], Tuple[Union[int, slice, Tuple[int], List[int]], ...], None]) – indices of parameter values of interest

Return type

Union[ndarray, int, None]

Returns

dressed state index closest to the specified bare state

eigensys(param_indices=None)[source]

Return the list of dressed eigenvectors

Parameters

param_indices (Optional[Tuple[int, ...]]) – position indices of parameter values in question

Return type

ndarray

Returns

dressed eigensystem for the external parameter fixed to the value indicated by the provided index

eigenvals(param_indices=None)[source]

Return the array of dressed eigenenergies - primarily for running the sweep

Parameters

question (position indices of parameter values in) –

Return type

ndarray

Returns

dressed eigenenergies for the external parameters fixed to the values indicated by the provided indices

energy_by_bare_index(bare_tuple, subtract_ground=False, param_indices=None)[source]

Look up dressed energy most closely corresponding to the given bare-state labels

Parameters
  • bare_tuple (Tuple[int, ...]) – bare state indices

  • subtract_ground (bool) – whether to subtract the ground state energy

  • param_indices (Union[int, slice, Tuple[int], List[int], Tuple[Union[int, slice, Tuple[int], List[int]], ...], None]) – indices specifying the set of parameters

Return type

NamedSlotsNdarray

Returns

dressed energies, if lookup successful, otherwise nan;

energy_by_dressed_index(dressed_index, subtract_ground=False, param_indices=None)[source]

Look up the dressed eigenenergy belonging to the given dressed index, usually to be used with pre-slicing

Parameters
  • dressed_index (int) – index of dressed state of interest

  • subtract_ground (bool) – whether to subtract the ground state energy

  • param_indices (Optional[Tuple[int, ...]]) – specifies the desired choice of parameter values

Return type

float

Returns

dressed energy

generate_lookup()[source]

For each parameter value of the parameter sweep, generate the map between bare states and dressed states.

Return type

NamedSlotsNdarray

Returns

each list item is a list of dressed indices whose order corresponds to the ordering of bare indices (as stored in .canonical_bare_labels, thus establishing the mapping)