laboneq_applications.analysis.plotting_helpers
¶
This module contains helper function for experiment analyses.
PlotRawDataOptions
¶
Bases: TaskOptions
Options for the plot_raw_complex_data_1d task.
Attributes:
Name | Type | Description |
---|---|---|
use_cal_traces |
bool
|
Whether to include calibration traces in the experiment.
Default: |
cal_states |
str | tuple
|
The states to prepare in the calibration traces. Can be any string or tuple made from combining the characters 'g', 'e', 'f'. Default: same as transition |
save_figures |
bool
|
Whether to save the figures.
Default: |
close_figures |
bool
|
Whether to close the figures.
Default: |
cal_states: str | tuple = workflow.option_field('ge', description="The states to prepare in the calibration traces.Can be any string or tuple made from combining the characters 'g', 'e', 'f'.")
class-attribute
instance-attribute
¶
close_figures: bool = workflow.option_field(True, description='Whether to close the figures.')
class-attribute
instance-attribute
¶
save_figures: bool = workflow.option_field(True, description='Whether to save the figures.')
class-attribute
instance-attribute
¶
use_cal_traces: bool = workflow.option_field(True, description='Whether to include calibration traces in the experiment.')
class-attribute
instance-attribute
¶
plot_raw_complex_data_1d(qubits, result, sweep_points, xlabel, xscaling=1.0, options=None)
¶
Creates plots of raw complex data acquired in integration mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qubits |
Qubits
|
The qubits on which the amplitude-Rabi experiments was run. May be either a single qubit or a list of qubits. |
required |
result |
RunExperimentResults | tuple[RunExperimentResults, Results]
|
the result of the experiment, returned by the run_experiment task. |
required |
sweep_points |
QubitSweepPoints
|
The sweep points used in the experiment for each qubit.
If |
required |
xlabel |
str
|
x-axis label |
required |
xscaling |
float
|
value by which to scale the sweep_points |
1.0
|
options |
PlotRawDataOptions | None
|
The options for processing the raw data as an instance of [PlotRawDataOptions]. |
None
|
Returns:
Type | Description |
---|---|
dict[str, dict[str, ArrayLike]]
|
dict with qubit UIDs as keys and the figures for each qubit as keys. |
timestamped_title(title, dt=None)
¶
Return a plot title with a timestamp in the local timezone.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
str
|
The title of the plot without a timestamp. |
required |
dt |
datetime | None
|
The time to use to create the timestamp. If None, the workflow start time is used. If there is no active workflow, the current time is used. |
None
|
Note
The timestamp is generated using the function local_timestamp
and thus has the same format as the timestamps used by the
FolderStore
in the logbook folders it creates.
Returns:
Type | Description |
---|---|
str
|
The title with a timestamp, formatted as "TIMESTAMP - TITLE". |