Skip to content

laboneq_applications.analysis.spectroscopy_two_dimensional_plotting

This module defines the plotting analysis workflow for 2D spectroscopy experiments.

spectroscopy experiment workflows such as

  • laboneq_applications.experiments.resonator_spectroscopy_amplitude
  • laboneq_applications.experiments.qubit_spectroscopy_amplitude

In this analysis, we have the option to plot the raw data and the signal magnitude and phase.

Spectroscopy2DPlottingWorkflowOptions

Option class for the spectroscopy 2d plotting analysis workflows.

Attributes:

Name Type Description
do_raw_data_plotting bool

Whether to plot the raw data. Default: True.

do_plotting_magnitude_phase bool

Whether to plot the magnitude and phase. Default: True.

analysis_workflow(result, qubits, sweep_points_1d, sweep_points_2d, label_sweep_points_1d, label_sweep_points_2d, scaling_sweep_points_2d=1.0, options=None)

The analysis Workflow for plotting spectroscopy 2D data.

The workflow consists of the following steps:

Parameters:

Name Type Description Default
result RunExperimentResults

The experiment results returned by the run_experiment task.

required
qubits QuantumElements

The qubits on which to run the analysis. May be either a single qubit or a list of qubits. The UIDs of these qubits must exist in the result.

required
sweep_points_1d QubitSweepPoints

The sweep points corresponding to the innermost sweep. If qubits is a single qubit, sweep_points_1d must be a list of numbers or an array. Otherwise, it must be a list of lists of numbers or arrays.

required
sweep_points_2d QubitSweepPoints

The sweep points corresponding to the outermost sweep. If qubits is a single qubit, sweep_points_2d must be a list of numbers or an array. Otherwise, it must be a list of lists of numbers or arrays.

required
label_sweep_points_1d str

The label that will appear on the axis of the 1D sweep points. Passed to the label_sweep_points_1d parameter of plot_raw_complex_data_2d.

required
label_sweep_points_2d str

The label that will appear on the axis of the 2D sweep points. Passed to the label_sweep_points_2d parameter of plot_raw_complex_data_2d.

required
scaling_sweep_points_2d float

The scaling factor of the 2D sweep points. Passed to the scaling_sweep_points_2d parameter of plot_raw_complex_data_2d. Default: 1.0.

1.0
options Spectroscopy2DPlottingWorkflowOptions | None

The options for building the workflow, passed as an instance of Spectroscopy2DPlottingWorkflowOptions. See the docstring of this class for more details.

None

Returns:

Name Type Description
WorkflowBuilder None

The builder for the analysis workflow.

Example
analysis_result = analysis_workflow(
    result=result,
    qubits=[q0, q1],
    sweep_points_1d=[np.linspace(6.0, 6.3, 301), np.linspace(5.8, 6.1, 301)],
    sweep_points_2d=[np.linspace(0, 1, 11), np.linspace(0, 1, 11)],
    label_sweep_points_1d="Qubit Frequency (Hz)",
    label_sweep_points_2d="Spectroscopy-Drive Amplitude (a.u.)",
).run()