-
Notifications
You must be signed in to change notification settings - Fork 188
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
Update deprecated usage of tape
and qtape
properties in QNode
#1266
base: dev
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
tape
and qtape
in QNode
tape
and qtape
properties in QNode
Thank you for opening this pull request. You can find the built site at this link. Deployment Info:
Note: It may take several minutes for updates to this pull request to be reflected on the deployed site. |
cost.construct([params - self.finite_diff_step * direction], {}) | ||
tape_backward = cost.tape.copy(copy_operations=True) | ||
tape_forward = qml.workflow.construct_tape(cost)(*[params + self.finite_diff_step * direction]) | ||
tape_backward = qml.workflow.construct_tape(cost)(*[params - self.finite_diff_step * direction]) |
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.
Hey @andrijapau, quick question; could this part of the tutorial be rewritten as a transform?
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.
Imo it'll make the implementation longer and consequently, the demo less readable.
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.
I would say out of scope for a quick deprecation change.
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.
qnspsa
demo's metadata.json file is missing an update.
cost.construct([params - self.finite_diff_step * direction], {}) | ||
tape_backward = cost.tape.copy(copy_operations=True) | ||
tape_forward = qml.workflow.construct_tape(cost)(*[params + self.finite_diff_step * direction]) | ||
tape_backward = qml.workflow.construct_tape(cost)(*[params - self.finite_diff_step * direction]) |
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.
Imo it'll make the implementation longer and consequently, the demo less readable.
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.
No blockers from my end so I'm approving, but you should probably wait to merge until the conversation Josh brought up is resolved.
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.
👍
Summary:
Updating deprecated code that was introduced from a recent deprecation PennyLaneAI/pennylane#6583.
[sc-76836]