PsiQ / bartiq

Bartiq
https://psiq.github.io/bartiq/
Apache License 2.0
29 stars 9 forks source link

Add "aggregation" function #24

Closed mstechly closed 1 month ago

mstechly commented 4 months ago

It would be useful to have a reliable way to add "aggregated costs" in bartiq.

I imagine the API would look sth like this:

aggregation_dict = {"effective_toffs": {"toffs": 1, "gidney_lelbows": 1}, "aggregated_t_gates": {"toffs": 4, "gidney_lelbows": 4, "t": 1, "rotation": 50}
alg_with_extra_resources = add_aggregated_resources(my_algorithm, aggregation_dict)