GUI#

class scqubits.ui.gui.GUI[source]#

Methods

GUI.__init__()

GUI.common_params_dropdown_link_refresh(change)

GUI.common_params_dropdown_params_refresh(change)

GUI.common_params_dropdown_value_refresh(change)

GUI.common_qubit_params_layout()

GUI.energy_scan_layout()

Returns a tuple for the evals_vs_paramvals layout

GUI.evals_vs_paramvals_plot(scan_value, ...)

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_evals_vs_paramvals().

GUI.evals_vs_paramvals_plot_refresh(change)

rtype

None

GUI.get_current_values()

rtype

Dict[str, Union[int, float]]

GUI.get_operators()

Returns a list of operators for the active_qubit.

GUI.get_plot_option_refresh()

rtype

Callable

GUI.initialize_display()

rtype

None

GUI.initialize_manual_update_and_save_widgets_dict()

GUI.initialize_observe()

rtype

None

GUI.initialize_qubit(qubit_name)

Initializes self.active_qubit to the user's choice using the chosen qubit's default parameters.

GUI.initialize_qubit_and_plot_ToggleButtons()

Creates all the ToggleButtons that controls which qubit or plot the user can choose from.

GUI.initialize_qubit_params_dicts()

Initializes qubit_params and qubit_scan_params.

GUI.initialize_qubit_params_widgets_dict()

Creates all the widgets that will be used for changing the parameter values for the specified qubit.

GUI.initialize_qubit_plot_options_widgets_dict()

Creates all the widgets that will be used for general plotting options.

GUI.initialize_ranges_widgets_dict()

rtype

None

GUI.initialize_tab_widget()

rtype

None

GUI.manual_scale_tf(change)

rtype

None

GUI.manual_update_and_save_layout()

rtype

HBox

GUI.manual_update_button_onclick(change)

rtype

None

GUI.manual_update_checkbox(change)

rtype

None

GUI.matelem_layout()

Returns an interactive for the matrix elements plot.

GUI.matelem_scan_layout()

Returns an interactive for the matelem_vs_paramvals plot

GUI.matelem_vs_paramvals_plot(...)

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_matelem_vs_paramvals().

GUI.matelem_vs_paramvals_plot_refresh(change)

rtype

None

GUI.matrixelements_plot(operator_value, ...)

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_matrixelements().

GUI.matrixelements_plot_refresh(change)

GUI.observe_plot()

GUI.observe_ranges()

GUI.plot_option_layout()

rtype

VBox

GUI.plot_option_layout_refresh(change)

rtype

None

GUI.qubit_and_plot_ToggleButtons_layout()

rtype

VBox

GUI.qubit_change(change)

rtype

None

GUI.qubit_info_layout()

rtype

Box

GUI.qubit_params_grid_layout()

rtype

HBox

GUI.qubit_plot_layout()

rtype

HBox

GUI.ranges_layout()

rtype

HBox

GUI.ranges_update(change)

rtype

None

GUI.save_button_clicked_action(change)

GUI.scan_dropdown_refresh(change)

rtype

None

GUI.set_qubit(qubit_name)

Sets up the chosen qubit to be the active qubit and updates the defaults and widgets accordingly.

GUI.unobserve_plot()

GUI.unobserve_ranges()

GUI.wavefunctions_layout()

Returns an interactive for the wavefunction plot

GUI.wavefunctions_plot(eigenvalue_states, ...)

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_wavefunction().

GUI.wavefunctions_plot_refresh(change)

rtype

None

Attributes

fig_ax

energy_scan_layout()[source]#

Returns a tuple for the evals_vs_paramvals layout

Return type

Tuple

evals_vs_paramvals_plot(scan_value, scan_range, eigenvalue_state_value, subtract_ground_tf, **params)[source]#

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_evals_vs_paramvals().

Parameters
  • scan_value (str) – Current value of the scan parameter dropdown.

  • scan_range (Tuple[float, float]) – Sets the interval [ min, max ] through which plot_evals_vs_paramvals() will plot over.

  • eigenvalue_state_value (int) – The number of states/eigenvalues that will be plotted.

  • subtract_ground_tf (bool) – Determines whether we subtract away the ground energy or not. Initially set to False.

  • **params (Union[Tuple[float, float], float, int]) – Dictionary of current qubit parameter values (taken from the sliders)

Return type

None

get_operators()[source]#

Returns a list of operators for the active_qubit. Note that this list omits any operators that start with “_”.

Return type

List[ str ]

initialize_qubit(qubit_name)[source]#

Initializes self.active_qubit to the user’s choice using the chosen qubit’s default parameters.

Parameters

qubit_name (str) –

Return type

None

initialize_qubit_and_plot_ToggleButtons()[source]#

Creates all the ToggleButtons that controls which qubit or plot the user can choose from.

Return type

None

initialize_qubit_params_dicts()[source]#

Initializes qubit_params and qubit_scan_params. Note that qubit_scan_params will be used to create the dropdown options.

Return type

None

initialize_qubit_params_widgets_dict()[source]#

Creates all the widgets that will be used for changing the parameter values for the specified qubit.

Return type

None

initialize_qubit_plot_options_widgets_dict()[source]#

Creates all the widgets that will be used for general plotting options.

Return type

None

matelem_layout()[source]#

Returns an interactive for the matrix elements plot.

Return type

widgets.interactive

matelem_scan_layout()[source]#

Returns an interactive for the matelem_vs_paramvals plot

Return type

widgets.interactive

matelem_vs_paramvals_plot(operator_value, scan_value, scan_range, matrix_element_state_value, mode_value, **params)[source]#

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_matelem_vs_paramvals().

Parameters
  • operator_value (str) – Current value of the operator dropdown.

  • scan_value (str) – Current value of the scan parameter dropdown.

  • scan_range (Tuple[float, float]) – Sets the interval [ min, max ] through which plot_matelem_vs_paramvals() will plot over.

  • matrix_element_state_value (int) – The number of states/elements that will be shown.

  • mode_value (str) – Current value of the mode (e.g. real, imaginary, etc.)

  • **params (Union[Tuple[float, float], float, int]) – Dictionary of current qubit parameter values (taken from the sliders)

Return type

None

matrixelements_plot(operator_value, eigenvalue_state_value, mode_value, show_numbers_tf, show3d_tf, **params)[source]#

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_matrixelements().

Parameters
  • operator_value (str) – Current value of the operator dropdown.

  • eigenvalue_state_value (int) – The number of states/eigenvalues that will be plotted

  • mode_value (str) – Current value of the mode (e.g. real, imaginary, etc.)

  • show_numbers_tf (bool) – Determines whether the numerical values will be shown in the 2D plot. Initially set to False.

  • show3d_tf (bool) – Determines whether a 3D version of the 2D plot will be shown. Initially set to True.

  • **params (Union[Tuple[float, float], float, int]) – Dictionary of current qubit parameter values (taken from the sliders)

set_qubit(qubit_name)[source]#

Sets up the chosen qubit to be the active qubit and updates the defaults and widgets accordingly.

Parameters

qubit_name (str) –

Return type

None

wavefunctions_layout()[source]#

Returns an interactive for the wavefunction plot

Return type

widgets.interactive

wavefunctions_plot(eigenvalue_states, mode_value, scale_value, phi_grid, **params)[source]#

This is the method associated with qubit_plot_interactive that allows for us to interact with plot_wavefunction(). Namely, this method is for the qubits that have an option for scaling the wavefunction amplitudes.

Parameters
  • eigenvalue_states (Union[List[int], int]) – The number of states to be plotted

  • mode_value (str) – Current value of the mode (e.g. ‘real’, ‘imaginary’, etc.)

  • scale_value (Optional[float]) –

  • phi_grid (Optional[Grid1d]) –

  • **params (Union[Tuple[float, float], float, int]) – Dictionary of current qubit parameter values (taken from the sliders)

Return type

None