-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add qiskit.generic device that accepts instantiated qiskit backends. #304
Add qiskit.generic device that accepts instantiated qiskit backends. #304
Conversation
Codecov Report
@@ Coverage Diff @@
## master #304 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 7 +1
Lines 302 315 +13
=========================================
+ Hits 302 315 +13
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for putting this together, it looks great! Device construction feels much more intuitive. just a few things to bring up:
- If you can test the V2 for
backend.name
and callingjob.result()
without timeout, it would be sweet. If not, we'll have to skip it somehow. Dealing with the changing IBMQ API can be tough sometimes so it's all good - Can you give some details on the specific scenario in which you want to pass an already-existing device? It feels a bit funny making a new class just to implement
short_name
(not too bad, but I guess there are other ways around that if that's the only problem 😋 )
Don't forget to add a changelog entry!
Thanks for the positive review!
I'll have a look. It turns out to be difficult to find a concrete implementation of a
I initially intended to use
Done. For the list of contributors, I'd be happy about adding an affiliation. Would that be fine for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this all makes sense, and looks good! Just one concern with naming. Also, could you update index.rst with a title card for this new device, and have it point to a new file in the devices/
subfolder? It could be small like BasicAer's file, just something to show how/why to use this new device. Thanks!
regarding your questions:
|
96888de
to
f3fb973
Compare
Thanks for the review! As requested, I renamed I also added explicit @timmysilv from your last comment, I understand that the remaining open threads do not need immediate action. Please let me know if that's not the case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great stuff, thanks for addressing all our concerns! glad to have this in 🎉 and yes, you can disregard the previous comments 😄
re: docs failure, I think you just need to add it to the list here the codecov thing is unrelated, I'm looking into it outside of this PR. don't worry about it - we can merge this in despite that failure |
Sounds great, thanks a lot for considering this patch and reviewing it.
Thanks for the hint! Should be fixed now. |
looks great! I don't have permission to update the branch on your fork, but I fixed the codecov issue on master. If you pull in the latest master, I'll re-run CI and merge 😎 |
Co-authored-by: Matthew Silverman <ma.silv11@gmail.com>
Co-authored-by: Matthew Silverman <ma.silv11@gmail.com>
ffd22f9
to
68dcd6a
Compare
Thanks! I rebased on latest |
This patch introduces a new
qiskit.generic
device that accepts instantiated Qiskit backends and wraps them into a Pennylane device.This offers a more composable mechanism for specifying the Qiskit backend, especially for providers that require more filter criteria than only a name to select a unique backend with
get_backend
.Basic integration tests were added.
A small patch on the call to
JobV1.result()
was done: changes in #298 pass atimeout
argument toJobV1.result()
. While supported by many job handles, including that from IBMQ, it is not part of the ABC definition and is therefore not required to be valid.