Skip to content
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

Merged
merged 17 commits into from
Apr 12, 2024

Conversation

obliviateandsurrender
Copy link
Contributor

Context: Update qml.specs to track and combine error

Description of the Change: Adds a _compute_algo_error method that combines the individual errors of similar types. Further updates specs method of QuantumScript to use the prior method for the required computation in a similar fashion to resources.

Benefits: specs will track algorithmic errors.

Possible Drawbacks: N/A

Related GitHub Issues: N/A

@obliviateandsurrender
Copy link
Contributor Author

[sc-55444]

@obliviateandsurrender obliviateandsurrender changed the title Add algorithmic error to qml.specs Add algorithmic errors tracking to qml.specs Apr 2, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (b2b0c36) to head (5676519).

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@soranjh soranjh left a 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.

Copy link
Contributor

@Jaybsoni Jaybsoni left a 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.

Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Jaybsoni Jaybsoni left a 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 💯

@obliviateandsurrender obliviateandsurrender merged commit d5e3b60 into master Apr 12, 2024
38 checks passed
@obliviateandsurrender obliviateandsurrender deleted the specs_algo_error branch April 12, 2024 19:07
Copy link
Contributor

@trbromley trbromley left a 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)},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants