-
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
Override __copy__
method for QSVT instances
#5248
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5248 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 399 399
Lines 36853 36574 -279
==========================================
- Hits 36736 36456 -280
- Misses 117 118 +1 ☔ View full report in Codecov by Sentry. |
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.
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.
Optional comment about testing, but thanks for fixing this :)
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Context:
Unfortunately, #5226 introduced a regression which causes the QSVT in Practice demo to fail. The issue is that the current implementation of
Operator.__copy__()
copies the data of an Operator before other attributes are copied; however, this is not suitable for QSVT since the QSVTdata
property depends on the_hyperparameters
attribute.Description of the Change:
QSVT.__copy__()
method to ensure thedata
attribute is ignored when QSVT instances are copied.Benefits:
Possible Drawbacks:
None.
Related GitHub Issues:
None.