qilisdk.experiments.experiment_result
Classes
Represents a labeled dimension in an experiment sweep. |
|
Base class for storing and visualizing experiment results. |
|
Result container for Rabi experiments. |
|
Result container for T1 relaxation experiments. |
|
Result container for T2 dephasing experiments. |
|
Result container for TwoTones experiments. |
Module Contents
- class Dimension(labels: list[str], values: list[numpy.ndarray])[source]
Represents a labeled dimension in an experiment sweep.
A Dimension defines one or more sweep parameters, such as drive amplitude, frequency, or delay time, together with their associated numerical values.
- labels[source]
Human-readable labels for the sweep parameters.
- Type:
list[str]
- values[source]
Numeric arrays representing the values corresponding to each label.
- Type:
list[np.ndarray]
Initialize a Dimension object.
- Parameters:
labels (
list[str]) – Labels describing each dimension (e.g.["Drive amplitude"]).values (
list[np.ndarray]) – Numerical arrays for the corresponding parameter values.
- labels[source]
- values[source]
- class ExperimentResult(qubit: int, data: numpy.ndarray, dims: list[Dimension])[source]
Bases:
qilisdk.functionals.functional_result.FunctionalResultBase class for storing and visualizing experiment results.
This class defines common utilities for handling experimental data, including computation of S21 parameters and automatic 1D or 2D plotting. Subclasses provide specific sweep parameters and plot titles.
Initialize an experiment result.
- Parameters:
qubit (
int) – The qubit index on which the experiment was performed.data (
np.ndarray) – Raw experimental data array.dims (
list[Dimension]) – Sweep dimensions of the experiment.
- plot_title: ClassVar[str][source]
Default plot title; subclasses provide the concrete label.
- qubit[source]
- data[source]
- dims[source]
- property s21: numpy.ndarray[source]
Complex S21 transmission parameter.
- Returns:
The complex-valued S21 response computed as
Re + i * Im.- Return type:
np.ndarray
- property s21_modulus: numpy.ndarray[source]
Magnitude of the S21 parameter.
- Returns:
The absolute value of the S21 parameter.
- Return type:
np.ndarray
- property s21_db: numpy.ndarray[source]
Magnitude of S21 in decibels (dB).
- Returns:
20 * log10(abs(S21))expressed in dB.- Return type:
np.ndarray
- plot(save_to: str | None = None) None[source]
Plot the S21 parameter from experiment results.
Automatically detects whether the dataset is 1D or 2D and creates the appropriate figure. Optionally saves the figure to disk.
- Parameters:
save_to (
str | None) – Optional path or directory to save the generated plot. If a directory is provided, the filename is automatically generated as{plot_title}_qubit{qubit}.png.- Raises:
NotImplementedError – If the experiment data has more than 2 dimensions.
- class RabiExperimentResult(qubit: int, data: numpy.ndarray, dims: list[Dimension])[source]
Bases:
ExperimentResultResult container for Rabi experiments.
Initialize an experiment result.
- Parameters:
qubit (
int) – The qubit index on which the experiment was performed.data (
np.ndarray) – Raw experimental data array.dims (
list[Dimension]) – Sweep dimensions of the experiment.
- plot_title: ClassVar[str] = 'Rabi'[source]
Default title for Rabi experiment plots.
- class T1ExperimentResult(qubit: int, data: numpy.ndarray, dims: list[Dimension])[source]
Bases:
ExperimentResultResult container for T1 relaxation experiments.
Initialize an experiment result.
- Parameters:
qubit (
int) – The qubit index on which the experiment was performed.data (
np.ndarray) – Raw experimental data array.dims (
list[Dimension]) – Sweep dimensions of the experiment.
- plot_title: ClassVar[str] = 'T1'[source]
Default title for T1 experiment plots.
- class T2ExperimentResult(qubit: int, data: numpy.ndarray, dims: list[Dimension])[source]
Bases:
ExperimentResultResult container for T2 dephasing experiments.
Initialize an experiment result.
- Parameters:
qubit (
int) – The qubit index on which the experiment was performed.data (
np.ndarray) – Raw experimental data array.dims (
list[Dimension]) – Sweep dimensions of the experiment.
- plot_title: ClassVar[str] = 'T2'[source]
Default title for T2 experiment plots.
- class TwoTonesExperimentResult(qubit: int, data: numpy.ndarray, dims: list[Dimension])[source]
Bases:
ExperimentResultResult container for TwoTones experiments.
Initialize an experiment result.
- Parameters:
qubit (
int) – The qubit index on which the experiment was performed.data (
np.ndarray) – Raw experimental data array.dims (
list[Dimension]) – Sweep dimensions of the experiment.
- plot_title: ClassVar[str] = 'TwoTones'[source]
Default title for TwoTones experiment plots.