squadds.interpolations package#

Submodules#

squadds.interpolations.interpolator module#

class squadds.interpolations.interpolator.Interpolator(analyzer, target_params)[source]#

Bases: ABC

Abstract class for interpolators.

abstract get_design()[source]#

Interpolate based on the target parameters. :returns: DataFrame with interpolated design options. :rtype: pd.DataFrame

Return type:

DataFrame

squadds.interpolations.physics module#

class squadds.interpolations.physics.ScalingInterpolator(analyzer, target_params)[source]#

Bases: Interpolator

Class for scaling-based interpolation.

get_design()[source]#

Retrieves the design options for qubit and cavity based on target parameters.

Returns:

A DataFrame containing the design options for qubit and cavity.

Return type:

pd.DataFrame

squadds.interpolations.utils module#

squadds.interpolations.utils.generate_qubit_cavity_training_data(analyzer, target_params_df, path_to_file)[source]#

Generates training data for qubit and cavity designs based on target parameters.

Parameters:
  • analyzer (Analyzer) – An instance of the Analyzer class.

  • target_params_df (pd.DataFrame) – A dataframe containing target parameters.

  • path_to_file (str) – The file path where the processed dataframe will be saved.

squadds.interpolations.utils.get_design_from_ml_predictions(analyzer, test_data, y_pred_dnn)[source]#

Generate design options DataFrame using ML predictions.

Parameters:
  • analyzer (Analyzer) – An instance of the Analyzer class.

  • test_data (pd.DataFrame) – DataFrame with target parameters.

  • y_pred_dnn (numpy.ndarray) – Array with predicted design parameters.

Returns:

DataFrame with design options similar to interpolated_designs_df.

Return type:

pd.DataFrame

squadds.interpolations.utils.process_dataframe(analyzer, target_params_df, index, path_to_file)[source]#

Processes the dataframe by merging, filtering columns, and converting specific string columns to floats.

Parameters:
  • analyzer (Analyzer) – An instance of the Analyzer class.

  • target_params_df (pd.DataFrame) – A dataframe containing target parameters.

  • path_to_file (str) – The file path where the processed dataframe will be saved.

Returns:

The processed dataframe.

Return type:

pd.DataFrame

Module contents#