-
Notifications
You must be signed in to change notification settings - Fork 604
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
Deprecate tape
and qtape
properties on the QNode
#6583
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6583 +/- ##
=======================================
Coverage 99.29% 99.30%
=======================================
Files 454 454
Lines 43262 43262
=======================================
+ Hits 42959 42960 +1
+ Misses 303 302 -1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
…1266) Summary: Updating deprecated code that was introduced from a recent deprecation PennyLaneAI/pennylane#6583. [sc-76836]
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.
❤️
Co-authored-by: Mudit Pandey <[email protected]>
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. There are a couple of comments that are blocking approval from me.
|
||
# pylint: disable=unexpected-keyword-arg | ||
def test_no_shots_per_call_if_user_has_shots_qfunc_arg(self): | ||
"""Tests that the per-call shots overwriting is suspended | ||
if user has a shots argument, but a warning is raised.""" | ||
dev = qml.device("default.mixed", wires=[0, 1], shots=10) | ||
dev = qml.device("default.qubit", wires=[0, 1], shots=10) |
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 file tests legacy devices, hence why default.mixed
is used. Now that default.mixed
is being ported over, we might need a different device. Maybe we should use the tests/default_qubit_legacy
device? cc @albi3ro
Co-authored-by: Mudit Pandey <[email protected]>
Context:
The QNode currently has
QNode.tape
andQNode.qtape
properties, which track the last tape generated during a construct call. Users can check these to verify what was executed most recently.Now, we’ve added
construct_tape(qnode)(*args, **kwargs)
in the workflow module as a preferred method for constructing tapes. This function creates a tape without modifying the QNode, ensuring it doesn’t interfere with other parts of the codebase.Description of the change
QNode.tape
andQNode.qtape
in the PennyLane source code.Found references in,
tape
andqtape
properties inQNode
qml#1266tape
andqtape
properties inQNode
pennylane-qiskit#602No references in,
Benefits: Removes problems and confusion with having a mutable tape property.
Possible Drawbacks: None
[sc-76836]