Qualtran
Qualtran copied to clipboard
Cleanup redundant code for computing t complexity
Cleaning up some redundant code to compute t-complexity.
- remove
_get_all_rotation_types(in favor ofbloq_is_rotation). - reduce uses of
t_counts_from_sigma(in favor ofQECGatesCost).
TODOs in follow up:
- Currently, only
t_counts_from_sigmauses eps correctly, but it's only used in a handful of places. This should be replaced withQECGatesCostafter adding support for eps (#1250). - We could add a simple
GateCounts.total_t_and_rotation_counthelper to support existing use cases which only take number of rotations (e.g. Beverland-et-al model).
Relevant discussions:
- https://github.com/quantumlib/Qualtran/issues/662#issuecomment-1949215534
- https://github.com/quantumlib/Qualtran/pull/678#discussion_r1492944645