squadds package#
Subpackages#
- squadds.calcs package
- Submodules
- squadds.calcs.qubit module
QubitHamiltonianQubitHamiltonian.E01()QubitHamiltonian.E01_and_anharmonicity()QubitHamiltonian.EC()QubitHamiltonian.EJ()QubitHamiltonian.EJ_and_LJ()QubitHamiltonian.add_cavity_coupled_H_params()QubitHamiltonian.add_qubit_H_params()QubitHamiltonian.calculate_target_quantities()QubitHamiltonian.chi()QubitHamiltonian.g_alpha_freq()QubitHamiltonian.g_and_alpha()QubitHamiltonian.g_from_cap_matrix()QubitHamiltonian.get_freq_alpha_fixed_LJ()QubitHamiltonian.plot_data()
- squadds.calcs.transmon_cross module
EC_numba()EC_numba_vectorized()Ec_from_Cs()TransmonCrossHamiltonianTransmonCrossHamiltonian.E01()TransmonCrossHamiltonian.E01_and_anharmonicity()TransmonCrossHamiltonian.EC()TransmonCrossHamiltonian.EJ()TransmonCrossHamiltonian.EJ_and_LJ()TransmonCrossHamiltonian.add_cavity_coupled_H_params()TransmonCrossHamiltonian.add_cavity_coupled_H_params_chunk()TransmonCrossHamiltonian.add_qubit_H_params()TransmonCrossHamiltonian.add_qubit_H_params_chunk()TransmonCrossHamiltonian.calculate_target_quantities()TransmonCrossHamiltonian.chi()TransmonCrossHamiltonian.g_alpha_freq()TransmonCrossHamiltonian.g_and_alpha()TransmonCrossHamiltonian.g_from_cap_matrix()TransmonCrossHamiltonian.get_freq_alpha_fixed_LJ()TransmonCrossHamiltonian.parallel_process_dataframe()TransmonCrossHamiltonian.parallel_process_g_only()TransmonCrossHamiltonian.plot_data()
clear_transmon_cache()g_from_cap_matrix_numba()get_transmon_E01_alpha()get_transmon_cache_info()
- Module contents
- squadds.components package
- squadds.core package
- Submodules
- squadds.core.analysis module
AnalyzerAnalyzer._add_target_params_columns()Analyzer._fix_cavity_claw_df()Analyzer._get_H_param_keys()Analyzer.target_param_keys()Analyzer.get_design()Analyzer.closest_design_in_H_space()Analyzer.compute_metric_distances()Analyzer.find_closest()Analyzer.get_Ljs()Analyzer.get_closest_cavity()Analyzer.get_complete_df()Analyzer.get_coupler_options()Analyzer.get_cpw_options()Analyzer.get_design()Analyzer.get_interpolated_design()Analyzer.get_param()Analyzer.get_qubit_options()Analyzer.reload_db()Analyzer.set_metric_strategy()Analyzer.target_param_keys()
scale_value()
- squadds.core.db module
SQuADDS_DBSQuADDS_DB.supported_components()SQuADDS_DB.supported_component_names()SQuADDS_DB.supported_data_types()SQuADDS_DB._delete_cache()SQuADDS_DB.supported_config_names()SQuADDS_DB.get_configs()SQuADDS_DB.get_component_names()SQuADDS_DB.view_component_names()SQuADDS_DB.view_datasets()SQuADDS_DB.get_dataset_info()SQuADDS_DB.view_all_contributors()SQuADDS_DB.view_contributors_of_config()SQuADDS_DB.view_contributors_of()SQuADDS_DB.select_components()SQuADDS_DB.select_system()SQuADDS_DB.select_qubit()SQuADDS_DB.select_cavity_claw()SQuADDS_DB.repo_nameSQuADDS_DB.configsSQuADDS_DB.selected_component_nameSQuADDS_DB.selected_componentSQuADDS_DB.selected_data_typeSQuADDS_DB.selected_confgSQuADDS_DB.selected_qubitSQuADDS_DB.selected_cavitySQuADDS_DB.selected_couplerSQuADDS_DB.selected_resonator_typeSQuADDS_DB.selected_systemSQuADDS_DB.selected_dfSQuADDS_DB.target_param_keysSQuADDS_DB.unitsSQuADDS_DB._internal_callSQuADDS_DB.check_login()SQuADDS_DB.create_qubit_cavity_df()SQuADDS_DB.create_system_df()SQuADDS_DB.find_parquet_files()SQuADDS_DB.generate_qubit_half_wave_cavity_df()SQuADDS_DB.generate_updated_half_wave_cavity_df()SQuADDS_DB.get_component_names()SQuADDS_DB.get_configs()SQuADDS_DB.get_dataset()SQuADDS_DB.get_dataset_info()SQuADDS_DB.get_device_contributors_of()SQuADDS_DB.get_existing_files()SQuADDS_DB.get_measured_devices()SQuADDS_DB.read_parquet_file()SQuADDS_DB.see_dataset()SQuADDS_DB.select_cavity()SQuADDS_DB.select_cavity_claw()SQuADDS_DB.select_components()SQuADDS_DB.select_coupler()SQuADDS_DB.select_qubit()SQuADDS_DB.select_resonator_type()SQuADDS_DB.select_system()SQuADDS_DB.show_selected_system()SQuADDS_DB.show_selections()SQuADDS_DB.supported_component_names()SQuADDS_DB.supported_components()SQuADDS_DB.supported_config_names()SQuADDS_DB.supported_data_types()SQuADDS_DB.unselect()SQuADDS_DB.unselect_all()SQuADDS_DB.upload_dataset()SQuADDS_DB.view_all_contributors()SQuADDS_DB.view_all_simulation_contributors()SQuADDS_DB.view_component_names()SQuADDS_DB.view_contributors_of()SQuADDS_DB.view_contributors_of_config()SQuADDS_DB.view_datasets()SQuADDS_DB.view_device_contributors_of()SQuADDS_DB.view_measured_devices()SQuADDS_DB.view_recipe_of()SQuADDS_DB.view_reference_device_of()SQuADDS_DB.view_reference_devices()SQuADDS_DB.view_sim_contributors_of()SQuADDS_DB.view_simulation_results()
- squadds.core.design_patterns module
- squadds.core.globals module
- squadds.core.metrics module
- squadds.core.processing module
- squadds.core.utils module
can_be_categorical()columns_memory_usage()compare_schemas()compute_memory_usage()convert_list_to_str()convert_numpy()convert_to_numeric()convert_to_str()create_mailto_link()create_unified_design_options()delete_HF_cache()delete_categorical_columns()delete_object_columns()filter_df_by_conditions()flatten_df_second_level()float_to_string()get_config_schema()get_entire_schema()get_schema()get_sim_results_keys()get_type()is_float()optimize_dataframe()print_column_types()process_design_options()save_intermediate_df()send_email_via_client()set_github_token()set_huggingface_api_key()string_to_float()validate_types()view_contributors_from_rst()
- Module contents
- squadds.database package
- Submodules
- squadds.database.HuggingFace module
add_column_to_dataset()add_row_to_dataset()create_PR()filter_dataset()fork_dataset()load_hf_dataset()login_to_huggingface()merge_datasets()remove_column_from_dataset()remove_row_from_dataset()save_dataset_to_hf()update_column_in_dataset()update_row_in_dataset()view_column_in_dataset()view_row_in_dataset()
- squadds.database.abstract_upload_data module
AbstractUploadDataAbstractUploadData.add_design()AbstractUploadData.add_notes()AbstractUploadData.add_sim_result()AbstractUploadData.add_sim_setup()AbstractUploadData.clear()AbstractUploadData.create_PR()AbstractUploadData.get_config_schema()AbstractUploadData.show()AbstractUploadData.show_config_schema()AbstractUploadData.submit()AbstractUploadData.to_dict()AbstractUploadData.validate()
- squadds.database.checker module
- squadds.database.config module
- squadds.database.contributor module
ExistingConfigDataExistingConfigData.configExistingConfigData.sim_resultsExistingConfigData.designExistingConfigData.sim_optionsExistingConfigData.unitsExistingConfigData.notesExistingConfigData.ref_entryExistingConfigData.contributorExistingConfigData.entryExistingConfigData.local_repo_pathExistingConfigData.sweep_dataExistingConfigData._validate_config_name()ExistingConfigData.get_config_schema()ExistingConfigData.show_config_schema()ExistingConfigData._supported_config_names()ExistingConfigData.show()ExistingConfigData.__set_contributor_info()ExistingConfigData.get_contributor_info()ExistingConfigData.add_sim_result()ExistingConfigData.add_sim_setup()ExistingConfigData.add_design()ExistingConfigData.add_design_v0()ExistingConfigData.to_dict()ExistingConfigData.clear()ExistingConfigData.add_notes()ExistingConfigData.validate_structure()ExistingConfigData._validate_structure()ExistingConfigData.validate_types()ExistingConfigData._validate_types()ExistingConfigData._validate_content_v0()ExistingConfigData.add_design()ExistingConfigData.add_design_v0()ExistingConfigData.add_notes()ExistingConfigData.add_sim_result()ExistingConfigData.add_sim_setup()ExistingConfigData.clear()ExistingConfigData.contribute()ExistingConfigData.from_json()ExistingConfigData.get_config_schema()ExistingConfigData.get_contributor_info()ExistingConfigData.invalidateExistingConfigData.is_validatedExistingConfigData.show()ExistingConfigData.show_config_schema()ExistingConfigData.submit()ExistingConfigData.to_dict()ExistingConfigData.update_db()ExistingConfigData.update_repo()ExistingConfigData.upload_to_HF()ExistingConfigData.validate()ExistingConfigData.validate_content()ExistingConfigData.validate_structure()ExistingConfigData.validate_sweep()ExistingConfigData.validate_types()
- squadds.database.contributor_HF module
ContributeContribute.dataset_filesContribute.instituteContribute.pi_nameContribute.apiContribute.tokenContribute.dataset_nameContribute.dataset_filesContribute.dataset_linkContribute.check_for_api_key()Contribute.create_dataset_name()Contribute.get_dataset_link()Contribute.upload_dataset()Contribute.create_dataset_repository()Contribute.upload_dataset_no_validation()Contribute.check_for_api_key()Contribute.create_dataset_name()Contribute.create_dataset_repository()Contribute.get_dataset_link()Contribute.upload_dataset()Contribute.upload_dataset_no_validation()
- squadds.database.github module
- squadds.database.new_contribution module
- squadds.database.utils module
- Module contents
- squadds.gds package
- squadds.interpolations package
- squadds.simulations package
- Submodules
- squadds.simulations.ansys_simulator module
AnsysSimulatorAnsysSimulator.analyzerAnsysSimulator.design_optionsAnsysSimulator.lom_analysis_objAnsysSimulator.epr_analysis_objAnsysSimulator.designAnsysSimulator.guiAnsysSimulator.get_design_screenshot()AnsysSimulator.get_renderer_screenshot()AnsysSimulator.get_xmon_info()AnsysSimulator.plot_device()AnsysSimulator.simulate()AnsysSimulator.sweep()AnsysSimulator.sweep_qubit_cavity()
- squadds.simulations.objects module
- squadds.simulations.simulator module
- squadds.simulations.sweeper_helperfunctions module
- squadds.simulations.utils module
- This file contains utility functions for the simulation.
add_ground_strip_and_mesh()calculate_center_and_dimensions()chunk_sweep_options()convert_str_to_float()create_claw()create_clt_coupler()create_cpw()create_ncap_coupler()create_qubitcavity()delete_old_setups()extract_number()extract_value()find_a_fq()find_chi()find_g_a_fq()find_kappa()flatten_dict()generate_bbox()getMeshScreenshot()get_cavity_claw_options_keys()get_freq()get_freq_Q_kappa()make_table()mesh_objects()read_json_files()save_simulation_data_to_json()setMaterialProperties()string_to_float()ultra_cold_silicon()unpack()
- Module contents
- squadds.ui package
Module contents#
- class squadds.Analyzer(db=None)[source]#
Bases:
objectThe Analyzer class is responsible for analyzing designs and finding the closest designs based on target parameters.
- _add_target_params_columns()[source]#
Adds target parameter columns to the dataframe based on the selected system.
- _fix_cavity_claw_df()[source]#
Fixes the cavity claw DataFrame by renaming columns and updating values.
- _get_H_param_keys()[source]#
Gets the parameter keys for the Hamiltonian based on the selected system.
- set_metric_strategy(strategy
MetricStrategy): Sets the metric strategy to use for calculating the distance metric.
- _outside_bounds(df
pd.DataFrame, params: dict, display=True) -> bool: Checks if entered parameters are outside the bounds of a dataframe.
- find_closest(target_params
dict, num_top: int, metric: str = ‘Euclidean’, display: bool = True): Finds the closest designs in the library based on the target parameters.
- get_interpolated_design(target_params
dict, metric: str = ‘Euclidean’, display: bool = True): Gets the interpolated design based on the target parameters.
Initializes an instance of the Analysis class.
- Parameters:
db (-) – The database object.
- - db
The database object.
- - selected_component_name
The name of the selected component.
- - selected_component
The selected component.
- - selected_data_type
The selected data type.
- - selected_confg
The selected configuration.
- - selected_qubit
The selected qubit.
- - selected_cavity
The selected cavity.
- - selected_coupler
The selected coupler.
- - selected_system
The selected system.
- - df
The selected dataframe.
- - closest_df_entry
The closest dataframe entry.
- - closest_design
The closest design.
- - presimmed_closest_cpw_design
The presimmed closest CPW design.
- - presimmed_closest_qubit_design
The presimmed closest qubit design.
- - presimmed_closest_coupler_design
The presimmed closest coupler design.
- - interpolated_design
The interpolated design.
- - metric_strategy
The metric strategy (will be set dynamically).
- - custom_metric_func
The custom metric function.
- - metric_weights
The metric weights.
- - target_params
The target parameters.
- - H_param_keys
The H parameter keys.
- closest_design_in_H_space()[source]#
Plots a scatter plot of the closest design in the H-space.
This method creates a scatter plot with two subplots. The first subplot shows the relationship between ‘cavity_frequency_GHz’ and ‘kappa_kHz’, while the second subplot shows the relationship between ‘anharmonicity_MHz’ and ‘g_MHz’. The scatter plot includes pre-simulated data, target data, and the closest design entry from the database.
- Returns:
None
- find_closest(target_params, num_top, metric='Euclidean', display=True, parallel=False, num_cpu='auto', skip_df_gen=False)[source]#
Find the closest designs in the library based on the target parameters.
- Parameters:
target_params (-) – A dictionary containing the target parameters.
num_top (-) – The number of closest designs to retrieve.
metric (-) – The distance metric to use for calculating distances. Defaults to ‘Euclidean’.
display (-) – Whether to display warnings for parameters outside of the library bounds. Defaults to True.
parallell (-) – Whether to run metric calculation in a parallelized way
num_cpu (-) – The number of CPUs to run a job over
skip_df_gen (-) – Whether to generate the df or run from memory
- Returns:
A DataFrame containing the closest designs.
- Return type:
closest_df (DataFrame)
- Raises:
- ValueError – If the specified metric is not supported or if num_top is bigger than the size of the library.
- ValueError – If the metric is invalid.
- get_Ljs(df)[source]#
Extracts the EJ values from the dataframe. Converts them to Josephson inductance values using pyEPR
Parameters: df (pd.DataFrame): The dataframe containing design options.
Returns: np.array: An array of Josephson inductance values.
- get_closest_cavity()[source]#
Returns the closest cavity design.
- Returns:
The closest cavity design.
- Return type:
pd.Series
- get_complete_df(target_params, metric='Euclidean', display=True)[source]#
Returns the complete DataFrame (design + Hamiltonian parameters) sourced using the target parameters.
- Parameters:
target_params (-) – A dictionary containing the target parameters.
metric (-) – The distance metric to use for calculating distances. Defaults to ‘Euclidean’.
display (-) – Whether to display warnings for parameters outside of the library bounds. Defaults to True.
- Returns:
A DataFrame containing all designs and Hamiltonian parameters.
- Return type:
complete_df (DataFrame)
- Raises:
- ValueError – If the specified metric is not supported or if num_top is bigger than the size of the library.
- ValueError – If the metric is invalid.
- get_coupler_options(df)[source]#
Extracts coupler options from the dataframe.
Parameters: df (pd.DataFrame): The dataframe containing design options.
Returns: Dict[str, List[Any]]: A dictionary containing lists of the extracted coupler options.
- Return type:
dict[str, list[Any]]
- get_cpw_options(df)[source]#
Extracts CPW options from the dataframe.
Parameters: df (pd.DataFrame): The dataframe containing design options.
Returns: Dict[str, List[Any]]: A dictionary containing lists of the extracted CPW options.
- Return type:
dict[str, list[Any]]
- get_design(df)[source]#
Extracts the design parameters from the dataframe and returns a dict.
- Returns:
A dict containing the design parameters.
- Return type:
dict
- get_qubit_options(df)[source]#
Extracts qubit design options from the dataframe.
Parameters: df (pd.DataFrame): The dataframe containing design options.
Returns: Dict[str, List[Any]]: A dictionary containing lists of the extracted qubit options.
- Return type:
dict[str, list[Any]]
- set_metric_strategy(strategy)[source]#
Sets the metric strategy to use for calculating the distance metric.
- Parameters:
strategy (MetricStrategy) – The strategy to use for calculating the distance metric.
- Raises:
ValueError – If the specified metric is not supported.
- class squadds.SQuADDS_DB(*args, **kwargs)[source]#
Bases:
objectA class representing the SQuADDS database.
- _delete_cache()#
Delete the dataset cache directory.
- get_dataset_info(component, component_name, data_type)[source]#
Print information about a specific dataset.
- view_contributors_of_config(config)[source]#
Print a table of contributors for a specific configuration.
- view_contributors_of(component, component_name, data_type)[source]#
Print a table of contributors for a specific component, component name, and data type.
- select_components(component_dict)[source]#
Select a configuration based on a component dictionary or string.
- select_system(components)[source]#
Select a system based on a list of components or a single component.
Constructor for the SQuADDS_DB class.
- repo_name#
The name of the repository.
- Type:
str
- configs#
List of supported configuration names.
- Type:
list
- selected_component_name#
The name of the selected component.
- Type:
str
- selected_component#
The selected component.
- Type:
str
- selected_data_type#
The selected data type.
- Type:
str
- selected_confg#
The selected configuration.
- Type:
str
- selected_qubit#
The selected qubit.
- Type:
str
- selected_cavity#
The selected cavity.
- Type:
str
- selected_coupler#
The selected coupler.
- Type:
str
- selected_resonator_type#
The selected resonator type.
- Type:
str
- selected_system#
The selected system.
- Type:
str
- selected_df#
The selected dataframe.
- Type:
str
- target_param_keys#
The target parameter keys.
- Type:
str
- units#
The units.
- Type:
str
- _internal_call#
Flag to track internal calls.
- Type:
bool
- create_qubit_cavity_df(qubit_df, cavity_df, merger_terms=None, parallelize=False, num_cpu=None)[source]#
Creates a merged DataFrame by merging the qubit and cavity DataFrames based on the specified merger terms.
- Parameters:
qubit_df (pandas.DataFrame) – The DataFrame containing qubit data.
cavity_df (pandas.DataFrame) – The DataFrame containing cavity data.
merger_terms (list) – A list of column names to be used for merging the DataFrames. Defaults to None.
parallelize (bool) – Whether to use multiprocessing to speed up the merging. Defaults to False.
num_cpu (int) – The number of CPU cores to use for multiprocessing. If not specified, the function will use the maximum number of available cores.
- Returns:
The merged DataFrame.
- Return type:
pandas.DataFrame
- Raises:
None –
- create_system_df(parallelize=False, num_cpu=None)[source]#
Creates and returns a DataFrame based on the selected system.
- Parameters:
parallelize (bool) – Whether to use multiprocessing to speed up the merging. Defaults to False.
num_cpu (int) – The number of CPU cores to use for multiprocessing. If not specified, the function will use the maximum number of available cores.
If the selected system is a single component, it retrieves the dataset based on the selected data type, component, and component name. If a coupler is selected, the DataFrame is filtered by the coupler. The resulting DataFrame is stored in the selected_df attribute.
If the selected system is a list of components (qubit and cavity), it retrieves the qubit and cavity DataFrames. The qubit DataFrame is obtained based on the selected qubit component name and data type “cap_matrix”. The cavity DataFrame is obtained based on the selected cavity component name and data type “eigenmode”. The qubit and cavity DataFrames are merged into a single DataFrame using the merger terms [‘claw_width’, ‘claw_length’, ‘claw_gap’]. The resulting DataFrame is stored in the selected_df attribute.
- Raises:
UserWarning – If the selected system is either not specified or does not contain a cavity.
- Returns:
The created DataFrame based on the selected system.
- Return type:
pandas.DataFrame
- find_parquet_files()[source]#
Searches for parquet files in the repository and returns their paths/filenames.
- Returns:
A list of paths/filenames of parquet files in the repository.
- Return type:
list
- generate_qubit_half_wave_cavity_df(parallelize=False, num_cpu=None, save_data=False)[source]#
Generates a DataFrame that combines the qubit and half-wave cavity data.
- Parameters:
parallelize (bool, optional) – Flag indicating whether to parallelize the computation. Defaults to False.
num_cpu (int, optional) – Number of CPUs to use for parallelization. Defaults to None.
save_data (bool, optional) – Flag indicating whether to save the generated data. Defaults to False.
- Returns:
The generated DataFrame.
- Return type:
pandas.DataFrame
- Raises:
None –
Notes
This method generates a DataFrame by combining the qubit and half-wave cavity data.
The qubit and cavity data are obtained from the get_dataset and generate_updated_half_wave_cavity_df methods, respectively.
The generated DataFrame is optimized to reduce memory usage using various optimization techniques.
If save_data is True, the generated DataFrames are saved in the “data” directory.
- generate_updated_half_wave_cavity_df(parallelize=False, num_cpu=None)[source]#
!TODO: speed this up!
- get_component_names(component=None)[source]#
Get the names of the components associated with a specific component.
- Parameters:
component (str) – The specific component to retrieve names for.
- Returns:
A list of component names associated with the specified component.
- Return type:
list
- get_configs()[source]#
Returns the configurations stored in the database.
- Returns:
A list of configuration names.
- Return type:
list
- get_dataset(data_type=None, component=None, component_name=None)[source]#
Retrieves a dataset based on the specified data type, component, and component name.
- Parameters:
data_type (str) – The type of data to retrieve.
component (str) – The component to retrieve the data from.
component_name (str) – The name of the component to retrieve the data from.
- Returns:
The retrieved dataset.
- Return type:
pandas.DataFrame
- Raises:
ValueError – If the system and component name are not defined.
ValueError – If the data type is not specified.
ValueError – If the component is not supported.
ValueError – If the component name is not supported.
ValueError – If the data type is not supported.
Exception – If an error occurs while loading the dataset.
- get_dataset_info(component=None, component_name=None, data_type=None)[source]#
Retrieves and prints information about a dataset.
- Parameters:
component (str) – The component of the dataset.
component_name (str) – The name of the component.
data_type (str) – The type of data.
- Returns:
None
- get_device_contributors_of(component=None, component_name=None, data_type=None)[source]#
View the reference/source experimental device that was used to validate a specific simulation configuration.
- Parameters:
component (str) – The component of interest.
component_name (str) – The name of the component.
data_type (str) – The type of data.
- Returns:
The relevant contributor information.
- Return type:
dict
- get_existing_files()[source]#
Retrieves the list of existing files in the repository.
- Returns:
A list of existing file names in the repository.
- Return type:
list
- get_measured_devices()[source]#
Retrieve all measured devices with their corresponding design codes, paper links, images, foundries, and fabrication recipes.
- Returns:
A DataFrame containing the name, design code, paper link, image, foundry, and fabrication recipe for each device.
- Return type:
pd.DataFrame
- read_parquet_file(file_name)[source]#
Takes in the filename and returns the object to be read as a pandas dataframe.
- Parameters:
file_name (str) – The name of the parquet file to read.
- Returns:
The dataframe read from the parquet file.
- Return type:
pandas.DataFrame
- see_dataset(data_type=None, component=None, component_name=None)[source]#
View a dataset based on the provided data type, component, and component name.
- Parameters:
data_type (str) – The type of data to view.
component (str) – The component to use. If not provided, the selected system will be used.
component_name (str) – The name of the component. If not provided, the selected component name will be used.
- Returns:
The flattened dataset.
- Return type:
pandas.DataFrame
- Raises:
ValueError – If both system and component name are not defined.
ValueError – If data type is not specified.
ValueError – If the component is not supported.
ValueError – If the component name is not supported.
ValueError – If the data type is not supported.
Exception – If an error occurs while loading the dataset.
- select_cavity(cavity=None)[source]#
Selects a cavity and sets the necessary attributes for further operations.
- Parameters:
cavity (str) – The name of the cavity to be selected.
- Raises:
UserWarning – If the selected system is either not specified or does not contain a cavity.
- Returns:
None
- select_cavity_claw(cavity=None)[source]#
Selects a cavity claw component.
- Parameters:
cavity (str) – The name of the cavity to select.
- Raises:
UserWarning – If the selected system is not specified or does not contain a cavity.
- Returns:
None
- select_components(component_dict=None)[source]#
Selects components based on the provided component dictionary or string.
- Parameters:
component_dict (dict or str) – A dictionary containing the component details (component, component_name, data_type) or a string representing the component.
- Returns:
None
- select_coupler(coupler=None)[source]#
Selects a coupler for the database.
- Parameters:
coupler (str, optional) – The name of the coupler to select. Defaults to None.
- Returns:
None
- select_qubit(qubit=None)[source]#
Selects a qubit and sets the necessary attributes for the selected qubit.
- Parameters:
qubit (str) – The name of the qubit to be selected.
- Raises:
UserWarning – If the selected system is not specified or does not contain a qubit.
- Returns:
None
- select_resonator_type(resonator_type)[source]#
Select the coupler based on the resonator type.
- Parameters:
resonator_type (str) – The type of resonator, e.g., “quarter” or “half”.
- select_system(components=None)[source]#
Selects the system and component(s) to be used.
- Parameters:
components (list or str) – The component(s) to be selected. If a list is provided, each component will be checked against the supported components. If a string is provided, it will be checked against the supported components.
- Returns:
None
- Raises:
None –
- show_selections()[source]#
Prints the selected system, component, and data type.
If the selected system is a list, it prints the selected qubit, cavity, coupler, and system. If the selected system is a string, it prints the selected component, component name, data type, system, and coupler.
- supported_component_names()[source]#
Returns a list of supported component names extracted from the configs.
- Returns:
A list of supported component names.
- Return type:
list
- supported_components()[source]#
Returns a list of supported components based on the configurations.
- Returns:
A list of supported components.
- Return type:
list
- supported_config_names()[source]#
Retrieves the supported configuration names from the repository.
- Returns:
A list of supported configuration names.
- supported_data_types()[source]#
Returns a list of supported data types.
- Returns:
A list of supported data types.
- Return type:
list
- unselect(param)[source]#
Unselects the specified parameter.
Parameters: param (str): The parameter to unselect. Valid options are:
“component”
“component_name”
“data_type”
“qubit”
“cavity_claw”
“coupler”
“system”
Returns: None
- unselect_all()[source]#
Clears the selected component, data type, qubit, cavity, coupler, and system.
- upload_dataset(file_paths, repo_file_names, overwrite=False)[source]#
Uploads a dataset to the repository.
- Parameters:
file_paths (list) – A list of file paths to upload.
repo_file_names (list) – A list of file names to use in the repository.
overwrite (bool) – Whether to overwrite an existing dataset. Defaults to False.
- view_all_contributors()[source]#
View all unique contributors and their relevant information from simulation configurations.
This method iterates through the simulation configurations and extracts the relevant information of each contributor. It checks if the combination of uploader, PI, group, and institution is already in the list of unique contributors. If not, it adds the relevant information to the list. Finally, it prints the list of unique contributors in a tabular format with a banner.
- view_all_simulation_contributors()[source]#
View all unique simulation contributors and their relevant information.
- view_component_names(component=None)[source]#
Prints the names of the components available in the database.
- Parameters:
component (str) – The specific component to view names for. If None, all component names will be printed.
- Returns:
None
- view_contributors_of(component=None, component_name=None, data_type=None, measured_device_name=None)[source]#
View contributors of a specific component, component name, and data type.
- Parameters:
component (str) – The component of interest.
component_name (str) – The name of the component.
data_type (str) – The type of data.
measured_device_name (str) – The name of the measured device.
- Returns:
None
- view_contributors_of_config(config)[source]#
View the contributors of a specific configuration.
- Parameters:
config (str) – The name of the configuration.
- Returns:
None
- view_datasets()[source]#
View the datasets available in the database.
This method retrieves the supported components, component names, and data types from the database and displays them in a tabular format.
- view_device_contributors_of(component=None, component_name=None, data_type=None)[source]#
View the reference/source experimental device that was used to validate a specific simulation configuration.
- Parameters:
component (str) – The component of interest.
component_name (str) – The name of the component.
data_type (str) – The type of data.
- Returns:
The name of the experimentally validated reference device, or an error message if not found.
- Return type:
str
- view_measured_devices()[source]#
View all measured devices with their corresponding design codes, paper links, images, foundries, and fabrication recipes.
This method retrieves and displays the relevant information for each device in the dataset in a well-formatted table.
- view_recipe_of(device_name)[source]#
Retrieve the foundry and fabrication recipe information for a specified device.
- Parameters:
device_name (str) – The name of the device to retrieve information for.
- Returns:
A dictionary containing foundry and fabrication recipe information.
- Return type:
dict
- view_reference_device_of(component=None, component_name=None, data_type=None)[source]#
View the reference/source experimental device that was used to validate a specific simulation configuration.
- Parameters:
component (str) – The component of interest.
component_name (str) – The name of the component.
data_type (str) – The type of data.
- view_reference_devices()[source]#
View all unique reference (experimental) devices and their relevant information.
This method iterates through the configurations and extracts the chip’s name within the SQuADDS DB, group, and who the chip was measured by. It also finds the simulation results for the device.It checks if the combination of simulation results uploader, PI, group, and institution is already in the list of unique contributors. If not, it adds the relevant information to the list. Finally, it prints the list of unique devices in a tabular format.
- view_sim_contributors_of(component=None, component_name=None, data_type=None, measured_device_name=None)[source]#
View the simulation contributors of a specific component, component name, and data type.
- Parameters:
component (str) – The component of interest.
component_name (str) – The name of the component.
data_type (str) – The type of data.
measured_device_name (str) – The name of the measured device.
- Returns:
None