laboneq_applications.contrib.analysis.bosonic_qubits.memory_spectroscopy
¶
Analysis for the memory spectroscopy experiment.
When the spectroscopy tone is resonant with the memory cavity, the photons it
creates shift the transmon frequency, so the subsequent transmon pi pulse no
longer inverts the transmon. The resonance therefore appears as a dip in the
magnitude of the readout signal. A Lorentzian is fitted to the magnitude, and
its position gives memory_resonance_frequency.
MemorySpectroscopyAnalysisWorkflowOptions
¶
Options for the memory spectroscopy analysis workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
do_plotting |
bool
|
Whether to create plots. Default: True. |
MemorySpectroscopyFitDataOptions
¶
Options for the fit_data task of the memory spectroscopy analysis.
Attributes:
| Name | Type | Description |
|---|---|---|
spectral_feature |
Literal['peak', 'dip', 'auto']
|
Whether the resonance is fitted as a "dip" or a "peak" in the signal magnitude, or "auto" to work it out from the data. Default: "dip". |
num_fit_points |
int
|
Number of points for the fit curve. Default: 501. |
analysis_workflow(result, qubits, frequencies, options=None)
¶
The memory spectroscopy 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 memory drive frequencies that were swept for each qubit. |
required |
options
|
MemorySpectroscopyAnalysisWorkflowOptions | None
|
The options for building the workflow, passed as an instance of MemorySpectroscopyAnalysisWorkflowOptions. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
WorkflowBuilder |
None
|
The builder for the analysis workflow. |
Example
analysis_result = analysis_workflow(
result=result,
qubits=q0,
frequencies=np.linspace(5.9e9, 6.1e9, 1001),
).run()
extract_qubit_parameters(qubits, processed_data_dict)
¶
Extract memory_resonance_frequency from the fit results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
QuantumElements
|
The qubits on which to run the analysis. |
required |
processed_data_dict
|
dict[str, dict]
|
The processed data dictionary returned by fit_data. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, dict[str, float | None]]]
|
dict with the extracted qubit parameters and their previous values: If the fit failed for a qubit, or the fitted resonance lies outside the swept frequency range, its new_parameter_values entry is left empty. |
fit_data(qubits, result, frequencies, options=None)
¶
Fit a Lorentzian to the magnitude of the memory spectroscopy signal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
QuantumElements
|
The qubits on which to run the analysis. |
required |
result
|
RunExperimentResults
|
The experiment results returned by the run_experiment task. |
required |
frequencies
|
QubitSweepPoints
|
The memory drive frequencies that were swept for each qubit. |
required |
options
|
MemorySpectroscopyFitDataOptions | None
|
The options for this task as an instance of MemorySpectroscopyFitDataOptions. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dictionary keyed by qubit UID. Each entry contains:
|
plot_memory_spectroscopy(qubits, processed_data_dict, options=None)
¶
Plot the memory spectroscopy signal magnitude and the Lorentzian fit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
QuantumElements
|
The qubits on which to run the analysis. |
required |
processed_data_dict
|
dict[str, dict]
|
The processed data dictionary returned by fit_data. |
required |
options
|
BasePlottingOptions | None
|
The options for this task as an instance of BasePlottingOptions. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Figure]
|
dict with qubit UIDs as keys and the figures for each qubit as values. |