laboneq_applications.contrib.analysis.resonator_photons_time_resolved
¶
This module defines the analysis for a resonator photon number time resolution experiment.
The experiment is defined in laboneq_applications.contrib.experiments.
In this analysis, we determine the time resolved resonator photon number during readout. The photon number is determined by tracking the qubits frequency during readout.
analysis_workflow(result, qubits, times, frequencies, options=None)
¶
The photon number time resolution 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 |
times
|
QubitSweepPoints
|
The array of times that were swept over the measurement pulse in the
experiment. If |
required |
frequencies
|
QubitSweepPoints
|
The array of frequencies that were swept over in the experiment. If
|
required |
options
|
TuneUpAnalysisWorkflowOptions | None
|
The options for building the workflow, passed as an instance of TuneUpAnalysisWorkflowOptions. 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"],
times=[np.linspace(0, 3e-6, 21), np.linspace(0, 3e-6, 21)],
frequencies=[
np.linspace(6.0e9, 6.3e9, 201),
np.linspace(5.8e9, 6.1e9, 201),
],
).run()
calculate_signal_magnitudes_and_phases(qubits, result, frequencies, times)
¶
Calculates the magnitude and phase of the spectroscopy signal in result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
RunExperimentResults
|
The experiment results returned by the |
required |
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 the result. |
required |
frequencies
|
ArrayLike
|
The array of frequencies that were swept over in the experiment. |
required |
times
|
ArrayLike
|
The array of times that were swept over in the experiment. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, ArrayLike]]
|
Dictionary with the qubit UIDs as keys and a processed data dict as values, containing the following data:
|
fit_data(qubits, processed_data_dict)
¶
Perform a qubit spectroscopy fit for every time.
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
|
required |
processed_data_dict
|
dict
|
The processed data dictionary returned by
|
required |
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, list[ModelResult | None]]]
|
Dictionary with qubit UIDs as keys and the fit results for each qubit as keys.
An entry of |
plot_resonator_photon_number(qubits, processed_data_dict, fit_results, options=None)
¶
Create the time-resolved photon number plot and the 2D qubit spectroscopy plot.
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
|
required |
processed_data_dict
|
dict[str, dict[str, ArrayLike]]
|
The processed data dictionary returned by
|
required |
fit_results
|
dict[str, dict[str, list[ModelResult | None]]]
|
The fit-results dictionary returned by |
required |
options
|
BasePlottingOptions | None
|
The options for this task as an instance of BasePlottingOptions. See the docstring of this class for more details. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, Figure]]
|
Dictionary with qubit UIDs as keys and the dictionary of "1D" and "2D" figures as values. |