Skip to content

Commit

Permalink
benchmarking demos
Browse files Browse the repository at this point in the history
  • Loading branch information
calumholker committed Jan 18, 2024
1 parent 19ba596 commit 6f744a7
Show file tree
Hide file tree
Showing 19 changed files with 2,502 additions and 643 deletions.
5 changes: 3 additions & 2 deletions benchmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,14 @@ def table_style(styler: plt.style , cols: List[Tuple[str]]) -> plt.style:
if any('Gates' in col for col in cols): border_col = 'Gates'
elif any('2Q Count' in col for col in cols): border_col = '2Q Count'
elif any('T Count' in col for col in cols): border_col = 'T Count'
elif any('t_opt' in col for col in cols): border_col = 't_opt'
styler.set_table_styles(dict.fromkeys([col for col in cols if border_col in col or ('Original' in col and 'Qubits' in col)], [{'selector': 'th', 'props': 'border-left: 1px solid white !important'},
{'selector': 'td', 'props': 'border-left: 1px solid white !important'}]), overwrite=False, axis=0)
styler.apply(lambda s: np.where(s==np.nanmin(s.values),'color:green',''), axis=1, subset=[col for col in cols if 'Gates' in col])
styler.apply(lambda s: np.where(s==np.nanmin(s.values),'color:green',''), axis=1, subset=[col for col in cols if '2Q Count' in col])
styler.apply(lambda s: np.where(s==np.nanmin(s.values),'color:green',''), axis=1, subset=[col for col in cols if 'T Count' in col])
styler.format(subset=[col for col in cols if 't_opt' or 't_simp' in col],precision=2, na_rep='-', thousands=",")
styler.format(subset=[col for col in cols if 't_opt' not in col and 't_simp' not in col],precision=0, na_rep='-', thousands=",")
styler.format(subset=[col for col in cols if 't_opt' in col],precision=2, na_rep='-', thousands=",")
styler.format(subset=[col for col in cols if 't_opt' not in col],precision=0, na_rep='-', thousands=",")
return(styler)

def df(self, groups: List[str] = ['all'], routines: List[str] = ['all'], funcs: List[str] = ['all'], atts: List[str] = ['all']) -> pd.DataFrame:
Expand Down

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,615 changes: 1,615 additions & 0 deletions demos/Circuit Optimisation/flow_opt_benchmarking.ipynb

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions demos/Circuit Optimisation/flow_opt_results/rand_data.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
�}�.

Large diffs are not rendered by default.

Binary file removed demos/circuit_optimisation/benchmark/circuits.pkl
Binary file not shown.
Binary file removed demos/circuit_optimisation/benchmark/funcs.pkl
Binary file not shown.
Binary file removed demos/circuit_optimisation/benchmark/rand_data.pkl
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 comments on commit 6f744a7

Please sign in to comment.