SpectrumLookup Class

SpectrumLookup

class scqubits.core.spec_lookup.SpectrumLookup(framework, dressed_specdata, bare_specdata_list)[source]

The SpectrumLookup is an integral building block of the HilbertSpace and ParameterSweep classes. In both cases it provides a convenient way to translate back and forth between labelling of eigenstates and eigenenergies via the indices of the dressed spectrum j = 0, 1, 2, … on one hand, and the bare product-state labels of the form (0,0,0), (0,0,1), (0,1,0),… (here for the example of three subsys_list). The lookup table stored in a SpectrumLookup instance should be generated by calling <HilbertSpace>.generate_lookup() in the case of a HilbertSpace object. For ParameterSweep objects, the lookup table is generated automatically upon init, or manually via <ParameterSweep>.run().

Parameters
bare_eigenenergies(subsys, param_index=0)[source]

Return list of bare eigenenergies for given subsystem.

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

  • param_index (int, optional) – position index of parameter value in question

Returns

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

Return type

ndarray

bare_eigenstates(subsys, param_index=0)[source]

Return ndarray of bare eigenstates for given subsystem and parameter index. Eigenstates are expressed in the basis internal to the subsystem.

Parameters
  • subsys (QuantumSystem) –

  • param_index (int, optional) –

Returns

Return type

ndarray

bare_index(dressed_index, param_index=0)[source]

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

Parameters
  • dressed_index (int) –

  • param_index (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.

Return type

tuple of int

bare_productstate(bare_index)[source]

Return the bare product state specified by bare_index.

Parameters

bare_index (tuple of int) –

Returns

ket in full Hilbert space

Return type

qutip.Qobj

classmethod create_from_file(filename)

Read initdata and spectral data from file, and use those to create a new SpectrumData object.

Parameters

filename (str) –

Returns

new SpectrumData object, initialized with data read from file

Return type

SpectrumData

classmethod deserialize(io_data)

Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.

Parameters

io_data (scqubits.io_utils.file_io_base.IOData) –

Returns

Return type

Serializable

dressed_eigenenergies(param_index=0)[source]

Return the array of dressed eigenenergies

Parameters

param_index (int, optional) – position index of parameter value in question

Returns

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

Return type

ndarray

dressed_eigenstates(param_index=0)[source]

Return the list of dressed eigenvectors

Parameters

param_index (int, optional) – position index of parameter value in question, if called from within ParameterSweep

Returns

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

Return type

list of qutip.qobj eigenvectors

dressed_index(bare_labels, param_index=0)[source]

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

Parameters
  • bare_labels (tuple(int)) – bare_labels = (index, index2, …)

  • param_index (int, optional) – index of parameter value of interest

Returns

dressed state index closest to the specified bare state

Return type

int

energy_bare_index(bare_tuple, param_index=0)[source]

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

Parameters
  • bare_tuple (tuple(int)) – bare state indices

  • param_index (int) – index specifying the position in the self.param_vals array

Returns

dressed energy, if lookup successful

Return type

float or None

energy_dressed_index(dressed_index, param_index=0)[source]

Look up the dressed eigenenergy belonging to the given dressed index.

Parameters
  • dressed_index (int) –

  • param_index (int) – relevant if used in the context of a ParameterSweep

Returns

dressed energy

Return type

float

filewrite(filename)

Convenience method bound to the class. Simply accesses the write function.

Parameters

filename (str) –

get_initdata()

Returns dict appropriate for creating/initializing a new Serializable object.

Returns

Return type

dict

serialize()

Convert the content of the current class instance into IOData format.

Returns

Return type

scqubits.io_utils.file_io_base.IOData