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

Remove implicit thread creation in XEB sampling #6643

Closed NoureldinYosri closed 5 months ago

NoureldinYosri commented 5 months ago

XEB sampling creates threads inorder to speed sampling up. however this leads to a race condition when the sampler itself uses threads in its internal implementation. This PR removes the implicit behaviour

In a follow up PR I'll make passing a threading pool possible but optional

cc: @eliottrosenberg

codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 97.81%. Comparing base (03aa511) to head (9097ddd).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6643 +/- ## ========================================== - Coverage 97.81% 97.81% -0.01% ========================================== Files 1067 1067 Lines 91551 91547 -4 ========================================== - Hits 89550 89545 -5 - Misses 2001 2002 +1 ```

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

eliottrosenberg commented 5 months ago

Thanks, Nour!