-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fixing string representations in tests #1292
Conversation
Hello. You may have forgotten to update the changelog!
|
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.
LGTM once the T gate that slipped through is updated :)
**PLEASE READ BEFORE MERGING** Immediately after this PR is merged into PL, [this one](PennyLaneAI/catalyst#1292) should be marked as ready for review and merged into Catalyst to fix the tests. **Context:** The string representation format of some operators is slightly different from others. This is because some do not have their own string representation. Furthermore, the output of the Hadamard operator should be updated since its string representation recently changed. **Description of the Change:** - Change the output in the doc of the `qml.Hadamard` operator, since its string representation changed during the previous release - Add a string representation for the `qml.S` operator and change the output in the doc - Add a string representation for the `qml.T` operator and change the output in the doc - Add a string representation for the `qml.SX` operator and change the output in the doc **Benefits:** Correct doc output and more consistency among string representation for non-parametrized single wire operators. **Possible Drawbacks:** This change was performed during the feature freeze before the release of PL 0.39, but it had to be reverted because of a single test in Catalyst that failed (the test uses the string representation to verify the result). It is necessary to create a small PR in Catalyst to fix such a test and link it to this story after the PL PR is merged. **Related GitHub Issues:** None. **Related Shortcut Stories:** [sc-77632] --------- Co-authored-by: Christina Lee <[email protected]>
@joeycarter Is this the "changed-before-release-then-changed-back" string test you mentioned? |
Yes exactly, this PR replaces my old one here: #1263 |
Context: This PR in core PennyLane slightly improves the string representations for some operators. One example is:
"Adjoint(S(wires=[0]) + T(wires=[0]))"
->"Adjoint(S(0) + T(0))"
. Catalyst contains a few tests that check these string representations, so these tests must be updated.Description of the Change: For the above reason, we update string representations for all failing tests.
Benefits: Catalyst works again.
Possible Drawbacks: None that I can think of.
Related GitHub Issues: None.
Related Shortcut Stories: [sc-77632]