Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup redundant code for computing t complexity #1317

Merged
merged 13 commits into from
Aug 23, 2024

Conversation

anurudhp
Copy link
Contributor

@anurudhp anurudhp commented Aug 20, 2024

Cleaning up some redundant code to compute t-complexity.

  • remove _get_all_rotation_types (in favor of bloq_is_rotation).
  • reduce uses of t_counts_from_sigma (in favor of QECGatesCost).

TODOs in follow up:

  • Currently, only t_counts_from_sigma uses eps correctly, but it's only used in a handful of places. This should be replaced with QECGatesCost after adding support for eps (Propagate rotation epsilon in gate cost #1250).
  • We could add a simple GateCounts.total_t_and_rotation_count helper to support existing use cases which only take number of rotations (e.g. Beverland-et-al model).

Relevant discussions:

@anurudhp anurudhp force-pushed the 2024/08/20-refactor-rot-eps branch from 40a04d6 to 576560d Compare August 20, 2024 21:33
@anurudhp anurudhp changed the title Cleanup rotation eps attribute Cleanup redundant code for computing t complexity Aug 20, 2024
@anurudhp anurudhp force-pushed the 2024/08/20-refactor-rot-eps branch from 8efdb70 to 623413d Compare August 21, 2024 00:04
@anurudhp anurudhp marked this pull request as ready for review August 21, 2024 06:27
@anurudhp anurudhp force-pushed the 2024/08/20-refactor-rot-eps branch from 73cc574 to a7d7681 Compare August 21, 2024 06:32
Copy link
Collaborator

@mpharrigan mpharrigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally very reasonable changes; unsure about that one test deletion

@anurudhp anurudhp merged commit dccd673 into quantumlib:main Aug 23, 2024
8 checks passed
@anurudhp anurudhp deleted the 2024/08/20-refactor-rot-eps branch August 23, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants