-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: pulse programming support for OQC Lucy #191
Conversation
* feat: add Python 3.11 support
Also made plugin compatible with new return types specification (amazon-braket#153) Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com> Co-authored-by: David Wierichs <david.wierichs@xanadu.ai> Co-authored-by: Cody Wang <speller26@gmail.com>
Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
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.
According to the latest tests we did, I believe that the phase need to adapt as this. I should be ok to approve it once we do this change.
Co-authored-by: Jean-Christophe Jaskula <99367153+jcjaskula-aws@users.noreply.github.com>
# Create waveform for each pulse in `ParametrizedEvolution` | ||
if callable(pulse.amplitude): | ||
if pulse.amplitude == qml.pulse.constant: | ||
amplitude = float(op.parameters[callable_index]) |
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.
Can we remove this float
or set complex
to allow sending complex constant amplitudes? Below we are also not casting to any specifc dtype
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.
last change float
-> complex
is fine and should not change anything.
There were conflicts in the imports of |
Description of changes:
Adds access to the OQC device Lucy through PennyLane's pulse programming module.
Where it was simple to do so, the code was kept general for ease of adding additional devices later. However, some refactoring to remove hardcoded assumptions based on the Lucy device will certainly be necessary to add additional pulse-based devices.
ParametrizedEvolution
as an allowed operation for the OQC Lucy device only_translate_operation
for converting a PennyLaneParameterizedEvolution
to a BraketPulseGate
device
kwarg is added to_translate_operation
, which defaults toNone
pulse_settings
attribute (user-facing) that retrieves and displays some of the device specs (resonant frequency, connectivity, anharmonicity) that users might want in PL simulationsOpen questions:
Testing done:
_translate_operation
function for both constant amplitudes and amplitudes with a callable defining a pulse envelopepulse_settings
and the functions to access device framesParametrizedEvolution
operatorsIntegration tests added that:
Without pulse calibration data for the Lucy device, it is not possible to compare a pulse execution to an expected result. The integration tests currently run locally without raising an error.
Tests similar to these were run successfully before the device went offline for maintenance3. These tests specifically connect to and interact with the OQC Lucy device.
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.