-
Notifications
You must be signed in to change notification settings - Fork 643
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 algorithmic errors tracking to qml.specs
#5464
Conversation
[sc-55444] |
qml.specs
qml.specs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5464 +/- ##
==========================================
- Coverage 99.67% 99.66% -0.01%
==========================================
Files 404 404
Lines 37833 37554 -279
==========================================
- Hits 37709 37429 -280
- Misses 124 125 +1 ☔ 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.
Thanks @obliviateandsurrender, looks good already, left some small comments and suggestions.
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 from my side! Mostly just echoing the comments left by Soran.
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.
Thanks @obliviateandsurrender 🎉
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 one small correction in the doc-string. Otherwise looks good to me 💯
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.
Thanks @obliviateandsurrender @Jaybsoni! Looks great. Just want to CC @DSGuala to make sure he's in the loop.
gate_sizes=defaultdict(<class 'int'>, {1: 1, 2: 1}), depth=2, shots=Shots(total_shots=None, shot_vector=())), | ||
{'resources': Resources(num_wires=2, num_gates=4, gate_types=defaultdict(<class 'int'>, {'RX': 1, 'CNOT': 1, 'TrotterPro | ||
duct': 2}}), gate_sizes=defaultdict(<class 'int'>, {1: 3, 2: 1}), depth=4, shots=Shots(total_shots=None, shot_vector=())), | ||
'errors': {'SpectralNormError': SpectralNormError(0.42998560822421455)}, |
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.
Nice!
Context: Update
qml.specs
to track and combine errorDescription of the Change: Adds a
_compute_algo_error
method that combines the individual errors of similar types. Further updatesspecs
method ofQuantumScript
to use the prior method for the required computation in a similar fashion toresources
.Benefits:
specs
will track algorithmic errors.Possible Drawbacks: N/A
Related GitHub Issues: N/A