Skip to content

Commit

Permalink
Tested for NCap integration + fixed sorting for NCaps (kappa and g fo…
Browse files Browse the repository at this point in the history
…r NCaps still need to be added; device with ncap cavity still needs fix)
  • Loading branch information
shanto268 committed Mar 17, 2024
1 parent f7bafe2 commit 49f675e
Show file tree
Hide file tree
Showing 3 changed files with 1,003 additions and 26,632 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ testing/*
tutorials/Data_Cleaning.ipynb
tutorials/*.json
presentations/*
tutorials/shot*.png

# Ignore operating system files
.DS_Store
Expand Down
11 changes: 7 additions & 4 deletions squadds/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ def get_component_names(self, component=None):
return
if component not in self.supported_components():
print("Component not supported. Available components are:")
print(self.supported_components())
print(self.supported_components()+["CLT"]) #TODO: handle dynamically
return
else:
component_names = []
for config in self.configs:
if component in config:
component_names.append(config.split("-")[1])
return component_names
return component_names+["CLT"]

def view_component_names(self, component=None):
"""
Expand Down Expand Up @@ -626,12 +626,15 @@ def create_system_df(self):
df = self.get_dataset(data_type=self.selected_data_type, component=self.selected_component, component_name=self.selected_component_name)
# if coupler is selected, filter by coupler
if self.selected_coupler is not None:
df = filter_df_by_conditions(df, {"coupler": self.selected_coupler})
df = filter_df_by_conditions(df, {"coupler_type": self.selected_coupler})
self.selected_df = df
elif isinstance(self.selected_system, list):
elif isinstance(self.selected_system, list): #! TODO: need to implement logic to handle more complex systems
# get the qubit and cavity dfs
qubit_df = self.get_dataset(data_type="cap_matrix", component="qubit", component_name=self.selected_qubit) #TODO: handle dynamically
cavity_df = self.get_dataset(data_type="eigenmode", component="cavity_claw", component_name=self.selected_cavity) #TODO: handle dynamically
# if coupler is selected, filter by coupler
if self.selected_coupler is not None:
cavity_df = filter_df_by_conditions(cavity_df, {"coupler_type": self.selected_coupler})
df = self.create_qubit_cavity_df(qubit_df, cavity_df, merger_terms=['claw_width', 'claw_length', 'claw_gap']) #TODO: handle with user awareness
self.selected_df = df
else:
Expand Down
Loading

0 comments on commit 49f675e

Please sign in to comment.