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

Optimize qid comparisons #6386

Merged
merged 1 commit into from
Dec 18, 2023
Merged

Optimize qid comparisons #6386

merged 1 commit into from
Dec 18, 2023

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Dec 18, 2023

Qid comparison turns out to be a very common operation when manipulating circuits, for example when computing the hash of a moment we sort operations by qubits in order to have a canonical order for hashing. Here we optimize the comparison of common qid types for grid, line, and named qubits.

@maffoo maffoo requested a review from dstrain115 December 18, 2023 19:00
@maffoo maffoo requested review from vtomole, cduck and a team as code owners December 18, 2023 19:00
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f3c1e2) 97.81% compared to head (4066f83) 97.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6386   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files        1111     1111           
  Lines       96951    97001   +50     
=======================================
+ Hits        94828    94878   +50     
  Misses       2123     2123           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maffoo maffoo merged commit e3fbd98 into main Dec 18, 2023
38 checks passed
@maffoo maffoo deleted the u/maffoo/qid-cmp branch December 18, 2023 19:30
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants