Skip to content

Divert cirq.Sampler's run_batch to run_batch_async #6813

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

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

senecameeks
Copy link
Collaborator

@senecameeks senecameeks commented Dec 2, 2024

We get a ~3x speedup if run_batch diverts to run_batch_async. Shown in this colab, it benchmarks using a child class of cirq.Sampler which does not implement it's own run_batch methods.

@senecameeks senecameeks requested a review from wcourtney December 2, 2024 20:55
@senecameeks senecameeks requested review from vtomole and a team as code owners December 2, 2024 20:55
@senecameeks senecameeks requested a review from fdmalone December 2, 2024 20:55
@CirqBot CirqBot added the size: S 10< lines changed <50 label Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.85%. Comparing base (d760f00) to head (666b8bf).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6813   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files        1084     1084           
  Lines       93742    93758   +16     
=======================================
+ Hits        91733    91749   +16     
  Misses       2009     2009           

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

@senecameeks senecameeks requested a review from verult as a code owner December 2, 2024 21:49
Copy link
Collaborator

@wcourtney wcourtney left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@senecameeks
Copy link
Collaborator Author

@verult mind reviewing as a code-owner?

@senecameeks senecameeks merged commit 495d913 into quantumlib:main Dec 2, 2024
37 checks passed
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
* run_batch diverts to run_batch_async

* fix typecheck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants