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

Fix test_choi_to_kraus() randomly crashing #797

Merged
merged 3 commits into from
Feb 17, 2023
Merged

Fix test_choi_to_kraus() randomly crashing #797

merged 3 commits into from
Feb 17, 2023

Conversation

renatomello
Copy link
Contributor

@renatomello renatomello commented Feb 17, 2023

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

@renatomello renatomello added the bug Something isn't working label Feb 17, 2023
@renatomello renatomello added this to the Qibo 0.1.12 milestone Feb 17, 2023
@renatomello renatomello self-assigned this Feb 17, 2023
@renatomello
Copy link
Contributor Author

Since choi_to_kraus() depends on a spectral decomposition (or SVD), sometimes the numerical precision becomes 1-3% above qibo.config.PRECISION_TOL. Therefore, I increased precision for those tests and they should be fine now.

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (4bb7fb3) compared to base (96b47b3).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 4bb7fb3 differs from pull request most recent head 9d584fb. Consider uploading reports for the commit 9d584fb to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #797   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           97        97           
  Lines        12894     12894           
=========================================
  Hits         12894     12894           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...test_quantum_info_superoperator_transformations.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@renatomello renatomello mentioned this pull request Feb 17, 2023
4 tasks
@renatomello
Copy link
Contributor Author

This is ready for merge after review @alecandido @andrea-pasquale

Copy link
Member

@alecandido alecandido left a comment

Choose a reason for hiding this comment

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

Fine by me, but are you sure is it okay with increasing the tolerance by a factor of 10?

In particular, if raising tolerance is the chosen solution, a factor of 2 would have been sufficient.

@renatomello
Copy link
Contributor Author

Fine by me, but are you sure is it okay with increasing the tolerance by a factor of 10?

In particular, if raising tolerance is the chosen solution, a factor of 2 would have been sufficient.

Changed it.

Copy link
Contributor

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

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

Thanks @renatomello.

@renatomello renatomello added this pull request to the merge queue Feb 17, 2023
Merged via the queue into master with commit 340cb65 Feb 17, 2023
@renatomello renatomello mentioned this pull request Feb 17, 2023
4 tasks
@renatomello renatomello deleted the liouville branch February 17, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants