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
Fix copying the Select template #4551
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4551 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 376 376
Lines 33249 33259 +10
=======================================
+ Hits 33130 33140 +10
Misses 119 119
☔ 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.
Looks good to go with a few small changes
Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
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.
**Context:** `qml.Select` could not be copied with `copy.copy(qml.Select(...))`, resulting in errors with `qml.qsvt`. **Description of the Change:** Overrode the `__copy__` function in `qml.Select` **Benefits:** Allows `qml.Select` to be used with `qml.qsvt` more easily and allows it to be copied. **Possible Drawbacks:** Changes to `__copy__` in the base `Operator` class will no longer affect `qml.Select` --------- Co-authored-by: Jay Soni <jbsoni@uwaterloo.ca>
Context:
qml.Select
could not be copied withcopy.copy(qml.Select(...))
, resulting in errors withqml.qsvt
.Description of the Change:
Overrode the
__copy__
function inqml.Select
Benefits:
Allows
qml.Select
to be used withqml.qsvt
more easily and allows it to be copied.Possible Drawbacks:
Changes to
__copy__
in the baseOperator
class will no longer affectqml.Select