-
Notifications
You must be signed in to change notification settings - Fork 603
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
Implement assert equal for operators #5780
Implement assert equal for operators #5780
Conversation
These had to be implemented to fix tests
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5780 +/- ##
==========================================
- Coverage 99.67% 99.67% -0.01%
==========================================
Files 420 420
Lines 40084 39842 -242
==========================================
- Hits 39955 39713 -242
Misses 129 129 ☔ View full report in Codecov by Sentry. |
This reverts commit c5788da.
# Conflicts: # pennylane/ops/functions/equal.py # tests/ops/functions/test_equal.py
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 is looking great! I actually don't have any comments 🎉
Sorry about taking so long to get to this review...
I'm really looking forward to starting to use this in testing and debugging. It's going to be so much easier to trouble shoot.
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! I'll approve once the below comments are addressed and CI continues to pass afterwards 😄
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 good to me 😄
Nice work everyone! 🎉 Just to clarify, @Tarun-Kumar07 and @EuGig how much would both of you say that you contributed to this PR? |
Hey @isaacdevlugt , all the changes in this PR were done by me :) |
Hi @trbromley, I noticed that the auto-merge was disabled. Is everything okay? |
Hey @Tarun-Kumar07, no concerns here 😄. We will merge your PR by the end of the day (around 5pm ET). |
Context:
PennyLane currently has a
qml.equal
function which can be used to check the equality of operators, measurements, and tapes. New frameworkassert_equal
has been developed which along with checking equality tells the reason for equality failure.Description of the Change:
assert_equal
for different type of operators mentioned in #5644 and #5648Benefits:
assert_equals
for mentioned operators above return more granular reason of failure. This eases debugging of tests.Possible Drawbacks:
More maintenance
Related GitHub Issues:
Fixes #5644
Fixes #5648