Skip to content

analysis

tergite_autocalibration.lib.base.analysis

Classes:

Name Description
BaseAllCouplersAnalysis

Base class for the analysis of all couplers in a node

BaseAllQubitsAnalysis

Base class for the analysis of all qubits in a node

BaseAnalysis

Base class for the analysis

BaseCouplerAnalysis

Base class for the analysis of a single coupler

BaseNodeAnalysis

Base class for the analysis

BaseQubitAnalysis

Base class for the analysis of a single qubit

BaseAllCouplersAnalysis

BaseAllCouplersAnalysis(name, redis_fields)

Bases: BaseNodeAnalysis, ABC

Base class for the analysis of all couplers in a node

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

BaseAllQubitsAnalysis

BaseAllQubitsAnalysis(name: str, redis_fields)

Bases: BaseNodeAnalysis, ABC

Base class for the analysis of all qubits in a node

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:

Name Type Description
analysis_results QOI

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

BaseAnalysis

BaseAnalysis()

Bases: ABC

Base class for the analysis

Methods:

Name Description
plotter

Plot the fitted values from the analysis

rotate_to_probability_axis

Rotates the S21 IQ points to the real - normalized axis

plotter abstractmethod

plotter(ax: Axes) -> None

Plot the fitted values from the analysis

Parameters:

Name Type Description Default
ax Axes

The axis object from matplotlib to be plotted

required

Returns:

Name Type Description
None None

This will just plot the fitted values

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>

BaseCouplerAnalysis

BaseCouplerAnalysis(name, redis_fields)

Bases: BaseAnalysis, ABC

Base class for the analysis of a single coupler

Methods:

Name Description
analyze_coupler

Run the actual analysis function

plot

Plot the fitted values from the analysis

plotter

Plot the fitted values from the analysis

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 abstractmethod

analyze_coupler() -> QOI

Run the actual analysis function Returns: The quantity of interest as QOI wrapped object

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

plotter abstractmethod

plotter(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

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>

BaseNodeAnalysis

BaseNodeAnalysis()

Bases: ABC

Base class for the analysis

Methods:

Name Description
analyze_node

Run the fitting of the analysis function

open_dataset

Open the dataset for the analysis.

analyze_node abstractmethod

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

Run the fitting of the analysis function

Returns:

Type Description
QOI

The quantity of interest as QOI wrapped object

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

BaseQubitAnalysis

BaseQubitAnalysis(name, redis_fields)

Bases: BaseAnalysis, ABC

Base class for the analysis of a single qubit

Methods:

Name Description
analyse_qubit

Run the actual analysis function

plot

Plot the fitted values from the analysis

plotter

Plot the fitted values from the analysis

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 abstractmethod

analyse_qubit() -> QOI

Run the actual analysis function

Returns:

Type Description
QOI

The quantity of interest as QOI wrapped object

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 abstractmethod

plotter(ax: Axes) -> None

Plot the fitted values from the analysis

Parameters:

Name Type Description Default
ax Axes

The axis object from matplotlib to be plotted

required

Returns:

Name Type Description
None None

This will just plot the fitted values

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>