-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Frontend] Implement quantum device capabilities as a data structure #609
Conversation
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 @grwlf nice clean up, I have left some questions 👍
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Romain Moyard <rmoyard@gmail.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.
Happy to approve after answering the two comments 💯
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 it looks good to me now 💯
**Context:** Having a proper encoding for the device capabilites, we implement the main part of program verification in this PR. **Description of the Change:** [sc-55558] [sc-60607] [sc-60648] * [x] Verify that no MCM (measure op) is present in the call * [ ] Verify that no callbacks are present in the call tree (future: verify that callbacks have custom vjp or are io callbacks) * [x] Verify that no state or variance is returned from the QNode. (Double check if Lightning Adjoint supports this!) * [x] adjoint diff method: Does the Tape only contain operations deemed differentiable by the QJITDevice from the TOML spec? * [x] parameter-shit method: Does the Tape only contain operations that support the 2-term parameter shift rule? **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** The following PRs need to be merged before this one: - #609 Introduces device capabilities. - #712 Makes toml-independent tests possible. --------- Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com> Co-authored-by: Lillian <lillian542@gmail.com>
In this PR we implement a dedicated data structure representing quantum device capabilities. Previously we used toml document IR for this purpose. We see the following benefits in the new approach:
C(Gate)/Adjoint(Gate)
syntax to minimum. We still use it only to communicate with PennyLane's APIIn subsequent PRs we will use it for program verification.
[sc-59478]