visualization#

Qblox Visualization Module.

This module, part of the Qblox backend system, is dedicated to creating and managing visual and User Interface (UI) elements essential for representing compiled instructions and other relevant data.

Module Contents#

Functions#

_display_dict(→ None)

_display_compiled_instructions(→ ipywidgets.Tab | None)

Display compiled instructions in a tabulated format.

_display_dict(settings: dict[str, Any]) None[source]#
_display_compiled_instructions(data: dict[Any, Any], parent_tab_name: str | None = None) ipywidgets.Tab | None[source]#

Display compiled instructions in a tabulated format.

This function creates an interactive table, rendering and displaying compiled instructions along with other relevant data, allowing for a structured and user-friendly representation.

In addition, it provides formatting specific for Qblox-specific sequencer programs, waveforms, and settings.

Note

This function is tailored for compiled_instructions but works with any nested dictionary.

Example

schedule = Schedule("demo compiled instructions")
schedule.add(Reset("q0", "q4"))
schedule.add(X("q0"))
schedule.add(Y("q4"))
schedule.add(Measure("q0", acq_channel=0, acq_protocol='ThresholdedAcquisition'))
schedule.add(Measure("q4", acq_channel=1, acq_protocol='ThresholdedAcquisition'))

comp_schedule = compiler.compile(schedule)
comp_schedule.compiled_instructions
Parameters:
  • data (dict) – A dictionary containing the compiled instructions and related data. The keys are strings representing tab names and the values are dictionaries containing the respective instruction data.

  • parent_tab_name (str, optional) – A string representing the name of the parent tab in the user interface. If not specified, the function will use a default parent tab name.

Returns:

A Tab widget containing the structured representation of compiled instructions if the input data is not empty, otherwise None.

Return type:

widgets.Tab or None