pyquil icon indicating copy to clipboard operation
pyquil copied to clipboard

Make multithreading QPU runs a standard feature

Open zohimchandani opened this issue 4 years ago • 3 comments

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?

zohimchandani avatar Oct 29 '21 18:10 zohimchandani

Two parts here:

  1. We need to make this a first-class concern in v4
  2. We need to document its behavior front-and-center for users to take advantage of

kalzoo avatar Nov 07 '22 23:11 kalzoo

Is a threading approach or an async I/O approach more favorable? Does it depend on the use case? Should we have both options?

mhodson-rigetti avatar Jul 05 '23 01:07 mhodson-rigetti

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.

MarquessV avatar Sep 25 '23 18:09 MarquessV