laboneq_applications.contrib.analysis.zz_coupling_strength
¶
This module defines the analysis for a residual ZZ coupling strength experiment.
The experiment is defined in laboneq_applications.contrib.experiments.
In this analysis, we first interpret the raw data into qubit population using principle-component analysis or rotation and projection on the measured calibration states. Finally, we plot the data and the fit.
FitDataZZCouplingStrengthOptions
¶
Options for the fit_data task of the ZZ coupling strength analysis.
See FitDataOptions for additional accepted options.
Attributes:
| Name | Type | Description |
|---|---|---|
transition |
Literal['ge', 'ef']
|
Transition to perform the experiment on. May be any
transition supported by the quantum operations.
Default: |
do_pca |
bool
|
Whether to perform principal component analysis on the raw data independent
of whether there were calibration traces in the experiment.
Default: |
use_cal_traces |
bool
|
Whether to include calibration traces in the experiment.
Default: |
analysis_workflow(result, qpu, qubit_pairs, biases, delays, options=None)
¶
The ZZ coupling strength analysis workflow.
The workflow consists of the following steps:
- extract_edges_from_qubit_pairs
- validate_flux_driven_edges
- extract_nodes_from_edges
- calculate_qubit_population_2d
- fit_data
- extract_edge_parameters
- plot_fitted_frequencies
- plot_raw_complex_data_2d
- plot_population
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
RunExperimentResults
|
The experiment results returned by the |
required |
qpu
|
QPU
|
The quantum processing unit. |
required |
qubit_pairs
|
ArrayLike[ArrayLike[str, str]]
|
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 |
biases
|
QubitSweepPoints
|
The coupler DC bias values swept over during the experiment. |
required |
delays
|
QubitSweepPoints
|
The time between the first pi/2 pulse and the pi pulse and the time between the pi pulse and the second pi/2 pulse which was swept over in the experiment. |
required |
options
|
TuneUpAnalysisWorkflowOptions | None
|
The options for building the workflow, passed as an instance of
TuneUpAnalysisWorkflowOptions.
In addition to options from
WorkflowOptions, the following
custom options are supported: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
WorkflowBuilder |
None
|
The builder for the analysis workflow. |
Example
qpu = QPU(
quantum_elements=TunableTransmonQubit.from_device_setup(setup),
quantum_operations=TunableTransmonOperations(),
)
analysis_result = analysis_workflow(
result=result,
qpu=qpu,
qubit_pairs=[["q0", "q1"]],
biases=[np.linspace(-0.1, 0.1, 21)],
delays=[np.linspace(0, 10e-6, 51)],
).run()
extract_edge_parameters(edges, processed_data_dict, fit_results, options=None)
¶
Extract the edge parameters from the fit results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edges
|
list[TopologyEdge]
|
The array of topology edges. |
required |
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary. |
required |
fit_results
|
dict[str, ModelResult]
|
The fit-results dictionary returned by |
required |
options
|
ExtractEdgeParametersOptions | None
|
The options for extracting the qubit parameters. See ExtractEdgeParametersOptions for accepted options. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, dict[str, int | float | Variable | None]]]
|
Dictionary with extracted tunable coupler parameters and the previous values for those tunable coupler parameters. The dictionary has the following form: If the |
fit_data(qubits, processed_data_dict, options=None)
¶
Fit a cosine oscillatory decay model to the qubit e-state population.
If this fit fails an exponential-decay model fit will be performed instead under the assumption that the residual zz coupling is near zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
QuantumElements
|
The qubits on which to run the task. The UIDs of these qubits must exist in
|
required |
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary containing the qubit population to be fitted and the sweep points of the experiment. |
required |
options
|
FitDataZZCouplingStrengthOptions | None
|
The options for building the workflow as an instance of FitDataZZCouplingStrengthOptions. See the docstrings of this class for more details. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, ArrayLike[ModelResult]]
|
Dictionary with qubit UIDs as keys and the fit results for each qubit as values. |
plot_fitted_frequencies(processed_data_dict, fit_results, frequency_scaling_factor=0.001, options=None)
¶
Plot the fitted frequencies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary. |
required |
fit_results
|
dict[str, ArrayLike[ModelResult]]
|
The fit-results dictionary returned by |
required |
frequency_scaling_factor
|
float
|
The multiplication factor for better visualization in the plot. |
0.001
|
options
|
PlotPopulationOptions | None
|
The options for extracting the qubit parameters. See PlotPopulationOptions for accepted options. |
None
|
plot_population(qubits, processed_data_dict, options=None)
¶
Create the ZZ coupling strength plots.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
QuantumElements
|
The qubits on which to run the task. May be either a single qubit or
a list of qubits. The UIDs of these qubits must exist in
|
required |
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary returned by |
required |
options
|
PlotPopulationOptions | None
|
The options for creating the plots. See PlotPopulationOptions for accepted options. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Figure]
|
Dictionary with qubit UIDs as keys and the figures for each qubit as values. If a qubit UID is not found in |