Skip to content

laboneq_applications.contrib.analysis.amplitude_rabi_chevron

This module defines the analysis for a amplitude Rabi chevron experiment.

The experiment is defined in laboneq_applications.contrib.experiments.

In this analysis, we first interpret the raw data into qubit populations using principal component analysis or rotation and project onto the measured calibration states. Then we plot the data.

CalculateQubitPopulation2DOptions

Options for the calculate_qubit_population_2d task.

Attributes:

Name Type Description
do_pca bool

Whether to perform principal component analysis on the raw data independent of whether there were calibration traces in the experiment. Default: False.

use_cal_traces bool

Whether to include calibration traces in the experiment. Default: True.

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

cal_states: str | tuple = option_field('ge', description='The states to prepare in the calibration traces.') class-attribute instance-attribute

do_pca: bool = option_field(False, description='Whether to perform principal component analysis on the raw data independent of whether there were calibration traces in the experiment.') class-attribute instance-attribute

use_cal_traces: bool = option_field(True, description='Whether to include calibration traces in the experiment.') class-attribute instance-attribute

PlotPopulationRabiChevronOptions

Options for the calculate_qubit_population_2d task.

Attributes:

Name Type Description
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

do_pca bool

Whether to perform principal component analysis on the raw data independent of whether there were calibration traces in the experiment. Default: False.

Additional attributes from BasePlottingOptions: save_figures: Whether to save the figures. Default: True. close_figures: Whether to close the figures. Default: True.

cal_states: str | tuple = option_field('ge', description='The states to prepare in the calibration traces.') class-attribute instance-attribute

do_pca: bool = option_field(False, description='Whether to perform principal component analysis on the raw data independent of whether there were calibration traces in the experiment.') class-attribute instance-attribute

analysis_workflow(result, qubits, frequencies, amplitudes, options=None)

The Time Rabi analysis Workflow.

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
frequencies QubitSweepPoints

The qubit frequencies to sweep over for the qubit drive pulse. If qubits is a single qubit, frequencies must be a list of numbers or an array. Otherwise, it must be a list of lists of numbers or arrays.

required
amplitudes QubitSweepPoints

The amplitudes to sweep over for each qubit drive pulse. amplitudes must be a list of numbers or an array. Otherwise it must be a list of lists of numbers or arrays.

required
options TuneUpAnalysisWorkflowOptions | None

The options for building the workflow, passed as an instance of [TuneUpAnalysisWorkflowOptions].

None

Returns:

Name Type Description
WorkflowBuilder None

The builder for the analysis workflow.

Example
options = TuneUpAnalysisWorkflowOptions()
result = analysis_workflow(
    results=results
    qubits=[q0, q1],
    lengths=[
        np.linspace(10e-9, 100e-9, 11),
        np.linspace(10e-9, 100e-9, 11),
    ],
    options=options,
).run()

calculate_qubit_population_2d(qubits, result, slow_axis, fast_axis, options=None)

Processes the raw data.

The data is processed in the following way:

  • If calibration traces were used in the experiment, the raw data is rotated based on the calibration traces. See [calibration_traces_rotation.py/rotate_data_to_cal_trace_results] for more details.
  • If no calibration traces were used in the experiment, or do_pca = True is passed in options, principal-component analysis is performed on the data. See [calibration_traces_rotation.py/principal_component_analysis] for more details.

Parameters:

Name Type Description Default
qubits QuantumElements

The qubits on which the amplitude-Rabi experiments was run. May be either a single qubit or a list of qubits.

required
result RunExperimentResults

the result of the experiment, returned by the run_experiment task.

required
slow_axis QubitSweepPoints

The slow_axis that was swept over in the experiment for each qubit. If qubits is a single qubit, slow_axis must be a list of numbers or an array. Otherwise, it must be a list of lists of numbers or arrays.

required
fast_axis QubitSweepPoints

The fast_axis that was swept over in the experiment for each qubit. If qubits is a single qubit, fast_axis must be a list of numbers or an array. Otherwise, it must be a list of lists of numbers or arrays.

required
options CalculateQubitPopulation2DOptions | None

The options for building the workflow as an instance of [CalculateQubitPopulation2DOptions]. See the docstrings of this class for more details.

None

Returns:

Type Description
dict[str, dict[str, ArrayLike]]

dict with qubit UIDs as keys and the dictionary of processed data for each qubit

dict[str, dict[str, ArrayLike]]

as values. See [calibration_traces_rotation.py/calculate_population_1d] for what

dict[str, dict[str, ArrayLike]]

this dictionary looks like.

Raises:

Type Description
TypeError

If result is not an instance of RunExperimentResults.

plot_population(qubits, processed_data_dict, options=None)

Create the time-Rabi plots.

Parameters:

Name Type Description Default
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 processed_data_dict, fit_results and qubit_parameters.

required
processed_data_dict dict[str, dict[str, ArrayLike]]

the processed data dictionary returned by process_raw_data

required
options PlotPopulationRabiChevronOptions | None

The options for this task as an instance of [PlotPopulationRabiChevronOptions]. See the docstring of this class for more details.

None

Returns:

Type Description
dict[str, Figure]

dict with qubit UIDs as keys and the figures for each qubit as values.