laboneq_applications.contrib.analysis.two_qubit.chevron
¶
This module defines the analysis for a CZ chevron experiment.
The experiment is defined in
laboneq_applications.contrib.experiments.two_qubit.chevron.
In this analysis, we first interpret the raw data into qubit population using principal-component analysis, or rotation and projection onto the measured calibration states. We then locate the population extremum of the resulting two-dimensional map to obtain the flux-pulse duration and amplitude that implement the CZ gate, and plot the chevron pattern.
analysis_workflow(result, qpu, qubit_pairs, durations, amplitudes, options=None)
¶
The CZ chevron 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_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 |
amplitudes
|
QubitSweepPoints
|
The coupler or qubit amplitude values. |
required |
durations
|
QubitSweepPoints
|
length of the pulse on the coupler or qubit. |
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
options = TuneUpAnalysisWorkflowOptions()
result = analysis_workflow(
results=results
qubits=[q0, q1],
amplitudes=[
np.linspace(0, 1, 11),
np.linspace(0, 0.75, 11),
],
options=options,
).run()
extract_edge_parameters(edges, processed_data_dict, fit_results, options=None)
¶
Extract the edge parameters from the fit results.
The (duration, amplitude) point of maximum interaction found by fit_data
becomes the starting point for the subsequent fine calibration of the CZ
gate. The duration goes into coupler_pulse, because the gate takes its
length from there, and the amplitude into the pulse that drives the gate.
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, dict[str, float]]
|
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[tuple[str, str, str], dict[str, int | float | None]]]
|
Dictionary with extracted edge parameters and the previous values for
those edge parameters. The keys of the inner dictionaries are the edge
keys If the |
fit_data(qubit_pairs, processed_data_dict, options=None)
¶
Extract the point of maximum interaction from the chevron pattern.
Finds the (duration, amplitude) sweep point at which the target-qubit population is maximal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit_pairs
|
list[list[str]]
|
The (source, target) qubit-UID pairs on which to run the task.
The target UIDs must exist in |
required |
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary containing the qubit population and the sweep points of the experiment. |
required |
options
|
FitData2QOptions | None
|
The options for building the workflow as an instance of FitData2QOptions. See the docstrings of this class for more details. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, float]]
|
Dictionary with edge signatures as keys and dictionaries with the "duration" and "amplitude" values of the maximum-population point as values. |
plot_population(qubits, processed_data_dict, options=None)
¶
Create the chevron population 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 class for this task as an instance of PlotPopulationOptions. See the docstring of this class 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 |