-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add the execute and batch_execute methods #6
Conversation
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
…nnylane-orquestra into execute_and_batch
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.
Very nice code and testing @antalszava. Just had a few questions and some text-comments (a few docstrings in the tests need to be updated, etc.) 🏅
.github/workflows/tests.yml
Outdated
- name: Adjust coverage file for Codecov | ||
run: bash <(sed -i 's/filename=\"/filename=\"pennylane_orquestra\//g' coverage.xml) |
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.
Again, just re-iterating what @josh146 said earlier, is this necessary here?
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.
Oh, thanks so much for catching that! Still remained there somehow (maybe in between branches). Removed.
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
…nnylane-orquestra into execute_and_batch
Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Theodor <theodor@xanadu.ai>
…nnylane-orquestra into execute_and_batch
Co-authored-by: Theodor <theodor@xanadu.ai>
…nnylane-orquestra into execute_and_batch
Context
OrquestraDevice
and its subclasses are capable of serializing backend specifications, circuits and operators. There are also auxiliary functions available that make it possible to:gen_workflow.py
)cli_actions.py
).To put pieces together, executing circuits and computing expectation values of operators remain.
Changes
Adds two device methods:
OrquestraDevice.execute
: supports computing expectation values for (an) operator(s) and returning the result(s) to a QNodeOrquestraDevice.batch_execute
: supports computing expectation values for batches of circuits (e.g., when computing jacobians and using aJacobianTape
with the new tape mode feature of PennyLane)