quantumlib / Cirq

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

Use spawn in _compat_test.py to avoid fork problems #6374

Closed maffoo closed 9 months ago

maffoo commented 9 months ago

Fixes #6373.

Note that using multiprocessing with "spawn" is significantly slower than either "fork" or "forkserver", but it ensures that the subprocesses are isolated so is significantly safer. We can switch back in the future to improve performance if we can work out the issues, but for now I think using spawn is more robust.

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (30b6c39) 97.80% compared to head (ef83e54) 97.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6374 +/- ## ======================================= Coverage 97.80% 97.80% ======================================= Files 1111 1111 Lines 96878 96873 -5 ======================================= - Hits 94755 94751 -4 + Misses 2123 2122 -1 ```

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