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.

options = TuneUpAnalysisWorkflowOptions module-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 Qubits

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

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 TuneupAnalysisOptions | None

The options for processing the raw data. See [TuneupAnalysisOptions], [TuneupExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [TuneupAnalysisOptions], [TuneupExperimentOptions] and [BaseExperimentOptions].

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 Qubits

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 TuneupAnalysisOptions | None

The options for processing the raw data. See [TuneupAnalysisOptions], [TuneupExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [TuneupAnalysisOptions], [TuneupExperimentOptions] and [BaseExperimentOptions].

None

Returns:

Type Description
dict[str, Figure]

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