Skip to content

analysis

tergite_autocalibration.lib.nodes.coupler.spectroscopy.analysis

Classes:

Name Description
QubitSpectroscopyVsCurrentCouplerAnalysis

This class analyzes the qubit spectroscopy data as a function of the current for a coupler.

QubitSpectroscopyVsCurrentNodeAnalysis

This class analyzes the qubit spectroscopy data as a function of the current for all coupler.

QubitSpectroscopyVsCurrentQubitAnalysis

This class analyzes the qubit frequencies as obtained from the scpescroscopies

ResonatorSpectroscopyVsCurrentCouplerAnalysis

This class analyzes the resonator spectroscopy data as a function of the current for a coupler.

ResonatorSpectroscopyVsCurrentNodeAnalysis

This class analyzes the resonator spectroscopy data as a function of the current for all coupler.

ResonatorSpectroscopyVsCurrentQubitAnalysis

This class analyzes the resonator spectroscopy fitted frequencies to find crossing currents.

QubitSpectroscopyVsCurrentCouplerAnalysis

QubitSpectroscopyVsCurrentCouplerAnalysis(name, redis_fields)

Bases: BaseCouplerAnalysis

This class analyzes the qubit spectroscopy data as a function of the current for a coupler.

Methods:

Name Description
plot

Plot the fitted values from the analysis

plot_spectroscopies

Plot all the spectroscopy analyses for both qubits and save the figures.

plotter

Plot the results of the analysis on the provided axes.

process_coupler

Setup the coupler data and analyze it.

rotate_to_probability_axis

Rotates the S21 IQ points to the real - normalized axis

plot

plot(primary_axis, secondary_axis)

Plot the fitted values from the analysis Args: primary_axis: The axis object from matplotlib to be plotted secondary_axis: The axis object from matplotlib to be plotted Returns: None, will just plot the fitted values

plot_spectroscopies

plot_spectroscopies(data_path: Path)

Plot all the spectroscopy analyses for both qubits and save the figures.

plotter

plotter(primary_axis, secondary_axis)

Plot the results of the analysis on the provided axes. Args: primary_axis (plt.Axes): The primary axis for the first qubit. secondary_axis (plt.Axes): The secondary axis for the second qubit.

process_coupler

process_coupler(dataset, coupler_element) -> QOI

Setup the coupler data and analyze it. Args: dataset: xarray dataset with the coupler data coupler_element: name of the coupler element Returns: QOI: Quantity of interest as QOI wrapped object

rotate_to_probability_axis

rotate_to_probability_axis(complex_measurement_data)

Rotates the S21 IQ points to the real - normalized axis that describes the |0> - |1> axis. !!! It Assumes that complex_measurement_data[-2] corresponds to the |0> and complex_measurement_data[-1] corresponds to the |1>

QubitSpectroscopyVsCurrentNodeAnalysis

QubitSpectroscopyVsCurrentNodeAnalysis(name, redis_fields)

Bases: BaseAllCouplersAnalysis

This class analyzes the qubit spectroscopy data as a function of the current for all coupler.

Methods:

Name Description
analyze_node

Analyze the node and save the results to redis.

open_dataset

Open the dataset for the analysis.

analyze_node

analyze_node(data_path: Path, index: int = 0) -> QOI

Analyze the node and save the results to redis. Args: data_path: Path to the dataset index: Index of the dataset to be analyzed Returns: analysis_results: Dictionary with the analysis results for each qubit

open_dataset

open_dataset(index: int = 0) -> Dataset

Open the dataset for the analysis.

Parameters:

Name Type Description Default
index int

By default 0 for most of the measurements, can be set to load multiple datasets.

0

Returns:

Type Description
Dataset

xarray.Dataset with measurement results

QubitSpectroscopyVsCurrentQubitAnalysis

QubitSpectroscopyVsCurrentQubitAnalysis(name, redis_fields)

Bases: BaseQubitAnalysis

This class analyzes the qubit frequencies as obtained from the scpescroscopies to find crossing currents.

Methods:

Name Description
analyse_qubit

This function analyzes the qubit spectroscopy data to find crossing currents.

plot

Plot the fitted values from the analysis

plotter

Plot the detected frequencies and currents, along with crossing currents.

process_qubit

Setup the qubit data and analyze it.

rotate_to_probability_axis

Rotates the S21 IQ points to the real - normalized axis

analyse_qubit

analyse_qubit() -> list[float, float]

This function analyzes the qubit spectroscopy data to find crossing currents. It processes the dataset, identifies the frequencies and currents, and applies a threshold to find the crossing points.

Returns:

Name Type Description
list list[float, float]

A list of crossing currents.

plot

plot(primary_axis)

Plot the fitted values from the analysis Args: primary_axis: The axis object from matplotlib to be plotted Returns: None, will just plot the fitted values

plotter

plotter(ax: Axes)

Plot the detected frequencies and currents, along with crossing currents. Args: ax (plt.Axes): The axes to plot on.

process_qubit

process_qubit(dataset, qubit_element) -> QOI

Setup the qubit data and analyze it. Args: dataset: xarray dataset with the qubit data qubit_element: name of the qubit element Returns: QOI: Quantity of interest as QOI wrapped object

rotate_to_probability_axis

rotate_to_probability_axis(complex_measurement_data)

Rotates the S21 IQ points to the real - normalized axis that describes the |0> - |1> axis. !!! It Assumes that complex_measurement_data[-2] corresponds to the |0> and complex_measurement_data[-1] corresponds to the |1>

ResonatorSpectroscopyVsCurrentCouplerAnalysis

ResonatorSpectroscopyVsCurrentCouplerAnalysis(name, redis_fields)

Bases: BaseCouplerAnalysis

This class analyzes the resonator spectroscopy data as a function of the current for a coupler.

Methods:

Name Description
analyze_coupler

This function analyzes the coupler data to find crossing currents for both qubits.

plot

Plot the fitted values from the analysis

plot_spectroscopies

Plot all the spectroscopy analyses for both qubits and save the figures.

process_coupler

Setup the coupler data and analyze it.

rotate_to_probability_axis

Rotates the S21 IQ points to the real - normalized axis

analyze_coupler

analyze_coupler()

This function analyzes the coupler data to find crossing currents for both qubits.

plot

plot(primary_axis, secondary_axis)

Plot the fitted values from the analysis Args: primary_axis: The axis object from matplotlib to be plotted secondary_axis: The axis object from matplotlib to be plotted Returns: None, will just plot the fitted values

plot_spectroscopies

plot_spectroscopies(data_path: Path)

Plot all the spectroscopy analyses for both qubits and save the figures.

process_coupler

process_coupler(dataset, coupler_element) -> QOI

Setup the coupler data and analyze it. Args: dataset: xarray dataset with the coupler data coupler_element: name of the coupler element Returns: QOI: Quantity of interest as QOI wrapped object

rotate_to_probability_axis

rotate_to_probability_axis(complex_measurement_data)

Rotates the S21 IQ points to the real - normalized axis that describes the |0> - |1> axis. !!! It Assumes that complex_measurement_data[-2] corresponds to the |0> and complex_measurement_data[-1] corresponds to the |1>

ResonatorSpectroscopyVsCurrentNodeAnalysis

ResonatorSpectroscopyVsCurrentNodeAnalysis(name, redis_fields)

Bases: BaseAllCouplersAnalysis

This class analyzes the resonator spectroscopy data as a function of the current for all coupler.

Methods:

Name Description
analyze_node

Analyze the node and save the results to redis.

open_dataset

Open the dataset for the analysis.

analyze_node

analyze_node(data_path: Path, index: int = 0) -> QOI

Analyze the node and save the results to redis. Args: data_path: Path to the dataset index: Index of the dataset to be analyzed Returns: analysis_results: Dictionary with the analysis results for each qubit

open_dataset

open_dataset(index: int = 0) -> Dataset

Open the dataset for the analysis.

Parameters:

Name Type Description Default
index int

By default 0 for most of the measurements, can be set to load multiple datasets.

0

Returns:

Type Description
Dataset

xarray.Dataset with measurement results

ResonatorSpectroscopyVsCurrentQubitAnalysis

ResonatorSpectroscopyVsCurrentQubitAnalysis(name, redis_fields)

Bases: BaseQubitAnalysis

This class analyzes the resonator spectroscopy fitted frequencies to find crossing currents.

Methods:

Name Description
analyse_qubit

This function analyzes the resonator spectroscopy data to find crossing currents.

plot

Plot the fitted values from the analysis

plotter

Plot the detected frequencies and currents, along with crossing currents.

process_qubit

Setup the qubit data and analyze it.

rotate_to_probability_axis

Rotates the S21 IQ points to the real - normalized axis

analyse_qubit

analyse_qubit() -> list[float, float]

This function analyzes the resonator spectroscopy data to find crossing currents. It processes the dataset, identifies the frequencies and currents, and applies a threshold to find the crossing points.

Returns:

Name Type Description
list list[float, float]

A list of crossing currents.

plot

plot(primary_axis)

Plot the fitted values from the analysis Args: primary_axis: The axis object from matplotlib to be plotted Returns: None, will just plot the fitted values

plotter

plotter(ax: Axes)

Plot the detected frequencies and currents, along with crossing currents. Args: ax (plt.Axes): The axes to plot on.

process_qubit

process_qubit(dataset, qubit_element) -> QOI

Setup the qubit data and analyze it. Args: dataset: xarray dataset with the qubit data qubit_element: name of the qubit element Returns: QOI: Quantity of interest as QOI wrapped object

rotate_to_probability_axis

rotate_to_probability_axis(complex_measurement_data)

Rotates the S21 IQ points to the real - normalized axis that describes the |0> - |1> axis. !!! It Assumes that complex_measurement_data[-2] corresponds to the |0> and complex_measurement_data[-1] corresponds to the |1>