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

[Testing] Reduce testing time of measurement protocols #638

Merged
merged 9 commits into from
Jan 6, 2025

Conversation

chMoussa
Copy link
Collaborator

Solves #145 by:

  • Refactoring tests to use several observables in shadows
  • Reduce testing time of tomography. It turns out that QNN tests are a major bottleneck, especially a second-order cross-derivative. Also the zz_hamiltonian is quite long for the parameterized test test_forward_and_backward_passes_with_qnn. In my laptop, tests went from 5 minutes to 1 with these changes.

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.53%. Comparing base (c426f17) to head (27d31bb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #638   +/-   ##
=======================================
  Coverage   85.53%   85.53%           
=======================================
  Files         194      194           
  Lines       16663    16644   -19     
  Branches     1409     1410    +1     
=======================================
- Hits        14253    14237   -16     
+ Misses       2010     2007    -3     
  Partials      400      400           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chMoussa chMoussa self-assigned this Dec 30, 2024
@chMoussa chMoussa added the testing Everything related to tests label Dec 30, 2024
Copy link
Collaborator

@jpmoutinho jpmoutinho left a comment

Choose a reason for hiding this comment

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

Thanks @chMoussa

@chMoussa chMoussa marked this pull request as ready for review January 6, 2025 12:10
@chMoussa chMoussa merged commit 1821399 into main Jan 6, 2025
10 checks passed
@chMoussa chMoussa deleted the cm/refactor_measurements branch January 6, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Everything related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants