-
Notifications
You must be signed in to change notification settings - Fork 12
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 IonQ native gateset support #55
Conversation
Will have to go to an older black version for formatting, I guess. The TODOs need to be resolved before submission, and the too-few-public-method check should be skipped/ignored somehow Can add tests once we finalize API shape |
Thanks @Cynocracy! |
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 88.85% 93.77% +4.92%
==========================================
Files 5 5
Lines 287 305 +18
==========================================
+ Hits 255 286 +31
+ Misses 32 19 -13
Continue to review full report at Codecov.
|
Ready for review! |
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.
I was able to submit a job to the simulator with the native gate set, but "ionq.qpu"
is hanging currently for both "native" and "qis" gates.
Exciting to be able to work with these gates!
Most of my notes have to do with documentation.
We could probably add parameter-shift support later for these gates, but I think it's ok to leave them with grad_method = None
for now.
pennylane_ionq/ops.py
Outdated
""" | ||
num_params = 1 | ||
num_wires = 1 | ||
grad_method = "None" |
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.
grad_method = "None" | |
grad_method = None |
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.
Do you have an example of how to add parameter shift support? I'd be happy to give it a shot (though maybe in a follow-up PR)
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.
The easiest way is to define the parameter_frequencies
property.
If the parameter frequencies aren't manually defined, we can calculate them from the generator
, defined via the generator
method.
As these are single qubit operators with a single parameter, they will probably have the same frequencies as the standard rotation gates, namely [(1,)]
, but I'd have to double check.
Is the QPU job submitting fine but then not being processed? We have very long queue times at the moment: https://status.ionq.co/ |
Okay, after many mini fixups I think the docs render and don't have any glaring typos (I hope!) |
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.
The .. math::
accepts LaTeX, so there's no need for the *
symbols.
Thanks for updating the docstring for the IonQDevice
class. We should similarly update the docstring for the QPUDevice
and the SimulatorDevice
.
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
docs look good! |
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.
Looks great! Thanks for being patient will all the changes.
No problem :) I appreciate the thorough review! |
No description provided.