WaveFunction#

class scqubits.core.storage.WaveFunction(basis_labels, amplitudes, energy=None)[source]#

Container for wave function amplitudes defined for a specific basis. Optionally, a corresponding energy is saved as well.

Parameters:
  • basis_labels (ndarray) – labels of basis states; for example, in position basis: values of position variable

  • amplitudes (ndarray) – wave function amplitudes for each basis label value

  • energy (Optional[float]) – energy of the wave function

Methods

WaveFunction.__init__(basis_labels, amplitudes)

WaveFunction.amplitude_scale_factor(...)

Returnn scale factor that converts the dimensionless amplitude to a (pseudo-)energy that allows us to plot wavefunctions and potential energies in the same plot.

WaveFunction.rescale(scale_factor)

Rescale the wavefunction amplitudes by a given factor

WaveFunction.rescale_to_potential(potential_vals)

Rescale the dimensionless amplitude to a (pseudo-)energy that allows us to plot wavefunctions and potential energies in the same plot.

amplitude_scale_factor(potential_vals)[source]#

Returnn scale factor that converts the dimensionless amplitude to a (pseudo-)energy that allows us to plot wavefunctions and potential energies in the same plot.

Parameters:

potential_vals (ndarray) – array of potential energy values (that determine the energy range on the y axis

Return type:

float

Returns:

scale factor

rescale(scale_factor)[source]#

Rescale the wavefunction amplitudes by a given factor

Return type:

None

Parameters:

scale_factor (float) –

rescale_to_potential(potential_vals)[source]#

Rescale the dimensionless amplitude to a (pseudo-)energy that allows us to plot wavefunctions and potential energies in the same plot.

Parameters:

potential_vals (ndarray) – array of potential energy values (that determine the energy range on the y axis