Jupyter¶
Jupyter interface.
Usage, inside a Jupyter notebook:
from qibocal_widgets import Executor
from qibocal_widgets.jupyter import Jupyter
executor = Executor.create(platform=platform, path="var/report", frontends=[Jupyter()])
with executor:
acquired = executor.acquire(bound, targets=[0, 1])
acquired # rendered: raw data tables
completed = executor(bound)
completed # rendered: raw data tables and per-target reports
Rendering relies on ipywidgets.
The show_data() and show_reports() helpers remain available for
explicit, finer-grained control, and wrap() makes any execution
displayable.
- class qibocal_widgets.jupyter.Jupyter¶
Bases:
qibocal_widgets.frontend.FrontendDisplay executions in Jupyter, with
display().Compatible with
Marimo: each frontend uses its own view.- protocol: ClassVar[str] = '_repr_mimebundle_'¶
Display protocol implemented, i.e. the key of the view.
- render(completed)¶
Displayable object for an execution.
- Parameters:
completed (Completed)
- Return type:
- qibocal_widgets.jupyter.display(completed, actions=())¶
Full rendering of an execution: data and, when available, reports.
Above them, buttons: the given
actions, and the platform update of a fitted execution, if not applied automatically (seeCompleted.update).- Parameters:
completed (Completed)
actions (Sequence[Widget])
- Return type:
Widget
- qibocal_widgets.jupyter.show_data(data)¶
Accordion of raw data tables, one entry per target.
- Parameters:
data (Any) – a Qibocal
Datainstance, or an execution (Completed), in which case its acquired data is used.- Return type:
Widget
- qibocal_widgets.jupyter.show_reports(reports_, updates=None)¶
Accordion of reports (figures and fit tables), one entry per target.
- Parameters:
reports – the
reportsattribute of an execution, or the execution itself.updates (Updates | None) – the platform update of the execution, if any: each target gets an Update button, when the update applies per target.
reports_ (Any)
- Return type:
widgets.Widget