pyquil
pyquil copied to clipboard
Make multithreading QPU runs a standard feature
Multithreading is currently hidden under the 'Advanced Usage' section in the docs which most users will not come across at first glance.
Moreover, the additional code required to enable this deters users from adding on this functionality.
Given its usefulness in speeding up program execution, should this be a standard feature already baked into the qc.run() command?
Two parts here:
- We need to make this a first-class concern in
v4 - We need to document its behavior front-and-center for users to take advantage of
Is a threading approach or an async I/O approach more favorable? Does it depend on the use case? Should we have both options?
I've done some testing on this in preparation for v4, and right now, threading is still favored. pyQuil doesn't offer an asyncio API and so it doesn't offer much benefit. The Rust libraries v4 now depend on offer an asyncio API that we may use in a future release to offer an asyncio variant of the pyQuil API. At that point, we'll re-test and update our recommendation if it indeed offers any advantages.