rigetti / qiskit-rigetti

Qiskit provider serving Rigetti hardware & simulator backends.
Apache License 2.0
7 stars 7 forks source link

Fix: Compatibility with Qiskit's `run_circuits` and `CircuitSampler` utilities. #19

Closed dbanty closed 2 years ago

dbanty commented 2 years ago

Some Qiskit utilities (like those mentioned above) will not call result() unless status() is already DONE. This change makes status() immediately block on reading buffers from the QCS backend. Otherwise, those utilities loop forever as we don't have anything polling results asynchronously.

As a future performance improvement, we could try a threadpool to check on results and update statuses as we get them (to avoid blocking the main thread), or we could add a result-fetcher in pyQuil which does not wait to reduce the main-thread blocking.

dbanty commented 2 years ago

Opened #20 so thoughts about better performance & semantics are indicated somewhere for the future. Will merge this one as-is to get the fix out.

rigetti-githubbot commented 2 years ago

:tada: This PR is included in version 0.4.4 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: