qiskit-metal
qiskit-metal copied to clipboard
Consistent data format for analysis results
Current behavior
Output data is stored in self._variables in QAnalysis (accessible with self.get_data()). However the format varies for each return element, forcing the user to interpret the data as needed.
Requested behavior
Create a uniform data structure. Current ideas are:
- flat data expression. indexes, unit measures and numerical value all stored in separate objects within a dictionary
- pandas with multiple indexes. Everything is described inside the pandas dataframe, except for the units, therefore they need to be stored as two separate objects within a dictionary
Below two examples (not completely defined):
resultnp = Dict(
cap_matrix = Dict(
index1 = [200,220],
index2 = [1,2],
index3 = ["Cin","Cout"],
index4 = ["Cin","Cout"],
values = a,
units = ["nF","um", None, None, None ],
indexes = ['pad_width','passes','CapY','CapX']
))
resultpd_i = Dict(
cap_matrix = Dict(
values = index_select_df,
units = ["nF","um",None,None,None]
))
where
b = a.reshape(16)
index_select_df = pd.DataFrame(zip(c,d,e,f,b),columns=['CapX','CapY','passes','pad_width','CapValue'])
index_select_df.set_index(['CapX','CapY','passes','pad_width'])