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
Track qpu executions and shots on default qubit #4628
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4628 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 376 376
Lines 33617 33649 +32
=======================================
+ Hits 33493 33525 +32
Misses 124 124
☔ View full report in Codecov by Sentry. |
[sc-42389] |
this looks great, but i'm wondering if we should change the naming to match how things were before.
or something like that. if you make this change, |
Thanks @albi3ro!
Agreed - would be great not to introduce a breaking change here. Though this way around there is the issue that |
I think the tracker only shows things that you add to it, right? so on real QPUs, you just don't add |
For an analytic case, do we want |
@albi3ro in the analytic case, I think it's fine if I think the above is compatible with what we were doing before, i.e., the old import pennylane as qml
dev = qml.device('default.qubit', wires=1)
@qml.qnode(dev)
def f(x):
qml.RX(x, wires=0)
return qml.expval(qml.PauliX(0)), qml.expval(qml.PauliY(0))
with qml.Tracker(dev) as tracker:
f(0.8)
assert tracker.totals['executions'] == 2
@timmysilv yes that works, but can we make sure to clearly document this in the |
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.
just a comment on the changelog, otherwise lgtm!
Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
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's a couple things I'm not sure about.
Example behavior: