quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Set maxsize of request queue to Quantum Engine #6576

Closed senecameeks closed 6 months ago

senecameeks commented 6 months ago

We want to prevent overwhelming the engine tasks with too many requests.

Setting a maxsize does not reject requests that happen after the queue is full. Instead, when a request is to be put into the queue it will wait until a free slot is available before adding.

We also limit the size of the request messages sent to prevent overloading the server with very large requests.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.79%. Comparing base (2474d47) to head (fc4c293). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6576 +/- ## ======================================= Coverage 97.79% 97.79% ======================================= Files 1124 1124 Lines 95658 95659 +1 ======================================= + Hits 93549 93550 +1 Misses 2109 2109 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.