qblox_scheduler.analysis.single_qubit_timedomain#

Module containing analyses for common single qubit timedomain experiments.

Classes#

SingleQubitTimedomainAnalysis

Base Analysis class for single-qubit timedomain experiments.

_DecayFigMixin

A mixin for common analysis logic.

T1Analysis

Analysis class for a qubit T1 experiment,

EchoAnalysis

Analysis class for a qubit spin-echo experiment,

RamseyAnalysis

Fits a decaying cosine curve to Ramsey data (possibly with artificial detuning)

AllXYAnalysis

Normalizes the data from an AllXY experiment and plots against an ideal curve.

RabiAnalysis

Fits a cosine curve to Rabi oscillation data and finds the qubit drive

Module Contents#

class SingleQubitTimedomainAnalysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: qblox_scheduler.analysis.base_analysis.BaseAnalysis

Base Analysis class for single-qubit timedomain experiments.

run(calibration_points: bool | Literal['auto'] = 'auto')[source]#
Parameters:

calibration_points – Indicates if the data analyzed includes calibration points. If set to True, will interpret the last two data points in the dataset as \(|0\rangle\) and \(|1\rangle\) respectively. If "auto", will use has_calibration_points() to determine if the data contains calibration points.

Returns:

SingleQubitTimedomainAnalysis: The instance of this analysis.

process_data()[source]#

Processes the data so that the analysis can make assumptions on the format.

Populates self.dataset_processed.S21 with the complex (I,Q) valued transmission, and if calibration points are present for the 0 and 1 state, populates self.dataset_processed.pop_exc with the excited state population.

_rotate_to_calibrated_axis(ref_idx_0: int = -2, ref_idx_1: int = -1)[source]#
_choose_data_for_fit()[source]#
class _DecayFigMixin[source]#

A mixin for common analysis logic.

_create_decay_figure(fig_id: str)[source]#

Creates a figure ready for plotting a fit.

class T1Analysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: SingleQubitTimedomainAnalysis, _DecayFigMixin

Analysis class for a qubit T1 experiment, which fits an exponential decay and extracts the T1 time.

run_fitting()[source]#

Fit the data to ExpDecayModel.

analyze_fit_results()[source]#

Checks fit success and populates .quantities_of_interest.

create_figures()[source]#

Create a figure showing the exponential decay and fit.

class EchoAnalysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: SingleQubitTimedomainAnalysis, _DecayFigMixin

Analysis class for a qubit spin-echo experiment, which fits an exponential decay and extracts the T2_echo time.

run_fitting()[source]#

Fit the data to ExpDecayModel.

analyze_fit_results()[source]#

Checks fit success and populates .quantities_of_interest.

create_figures()[source]#

Create a figure showing the exponential decay and fit.

class RamseyAnalysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: SingleQubitTimedomainAnalysis, _DecayFigMixin

Fits a decaying cosine curve to Ramsey data (possibly with artificial detuning) and finds the true detuning, qubit frequency and T2* time.

run(artificial_detuning: float = 0, qubit_frequency: float = None, calibration_points: bool | Literal['auto'] = 'auto')[source]#
Parameters:
  • artificial_detuning – The detuning in Hz that will be emulated by adding an extra phase in software.

  • qubit_frequency – The initial recorded value of the qubit frequency (before accurate fitting is done) in Hz.

  • calibration_points – Indicates if the data analyzed includes calibration points. If set to True, will interpret the last two data points in the dataset as \(|0\rangle\) and \(|1\rangle\) respectively. If "auto", will use has_calibration_points() to determine if the data contains calibration points.

Returns:

RamseyAnalysis: The instance of this analysis.

run_fitting()[source]#

Fits a DecayOscillationModel to the data.

analyze_fit_results()[source]#

Extract the real detuning and qubit frequency based on the artificial detuning and fitted detuning.

create_figures()[source]#

Plot Ramsey decay figure.

class AllXYAnalysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: SingleQubitTimedomainAnalysis

Normalizes the data from an AllXY experiment and plots against an ideal curve.

See section 2.3.2 of :cite:t:`reed_entanglement_2013` for an explanation of the AllXY experiment and it’s applications in diagnosing errors in single-qubit control pulses.

run()[source]#

Executes the analysis using specific datapoints as calibration points.

Returns:

AllXYAnalysis: The instance of this analysis.

_rotate_to_calibrated_axis()[source]#
process_data()[source]#

Processes the data so that the analysis can make assumptions on the format.

Populates self.dataset_processed.S21 with the complex (I,Q) valued transmission, and if calibration points are present for the 0 and 1 state, populates self.dataset_processed.pop_exc with the excited state population.

create_figures()[source]#

To be implemented by subclasses.

Should generate figures of interest. matplolib figures and axes objects should be added to the .figs_mpl and axs_mpl dictionaries., respectively.

class RabiAnalysis(dataset: xarray.Dataset | None = None, tuid: quantify_core.data.types.TUID | str | None = None, label: str = '', settings_overwrite: dict | None = None, plot_figures: bool = True)[source]#

Bases: SingleQubitTimedomainAnalysis

Fits a cosine curve to Rabi oscillation data and finds the qubit drive amplitude required to implement a pi-pulse.

The analysis will automatically rotate the data so that the data lies along the axis with the best SNR.

run(calibration_points: bool = True)[source]#
Parameters:

calibration_points – Specifies if the data should be rotated so that it lies along the axis with the best SNR.

Returns:

RabiAnalysis: The instance of this analysis.

_rotate_to_calibrated_axis()[source]#

If calibration points are True, automatically determine the point farthest from the 0 point to use as a reference to rotate the data.

This will ensure the data lies along the axis with the best SNR.

_choose_data_for_fit()[source]#
run_fitting()[source]#

Fits a RabiModel to the data.

analyze_fit_results()[source]#

Checks fit success and populates .quantities_of_interest.

create_figures()[source]#

Creates Rabi oscillation figure