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

Don't create a new list of qubits in Gate.on #6390

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Dec 20, 2023

The value received from *qubits is a tuple, and GateOperation.__init__ would immediately convert the passed-in list back to a tuple anyway, so we can save on lots of small allocations by just passing the tuple of args through to GateOperation.

@maffoo maffoo requested review from vtomole, cduck and a team as code owners December 20, 2023 20:11
@maffoo maffoo requested a review from dabacon December 20, 2023 20:11
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (be7b059) 97.80% compared to head (efe2c67) 97.81%.
Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6390    +/-   ##
========================================
  Coverage   97.80%   97.81%            
========================================
  Files        1111     1111            
  Lines       96877    97054   +177     
========================================
+ Hits        94754    94931   +177     
  Misses       2123     2123            

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

@maffoo maffoo merged commit d33b1a7 into main Dec 21, 2023
38 checks passed
@maffoo maffoo deleted the u/maffoo/on-qubits branch December 21, 2023 18:51
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