toqito icon indicating copy to clipboard operation
toqito copied to clipboard

Test generalized Pauli matrices

Open atomgardner opened this issue 10 months ago • 2 comments

We add tests to check the creation of generalized Pauli matrices. Fixes #485.

atomgardner avatar Apr 09 '24 07:04 atomgardner

Hi @atomgardner, thank you for both of your PRs.

I just wanted to point out that even though the issue is tagged unitaryhack, the monetary award related to fixing an issue is only available when unitaryHACK 2024 starts (May 29 -June 12).

We tagged the issues pretty early because we didn't want to accidentally assign these issues to ourselves. I'll go ahead and remove the labels as it might cause additional confusion.

Edit: Did you use black to format your code? It is not compatible with our ruff configuration file, FYI. For example, we allow line-length > 80 which is the default setting for black.

purva-thakre avatar Apr 09 '24 10:04 purva-thakre

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.1%. Comparing base (c2d1d6e) to head (ba48ae1).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #544   +/-   ##
======================================
  Coverage    98.1%   98.1%           
======================================
  Files         162     162           
  Lines        3108    3108           
  Branches      760     760           
======================================
  Hits         3050    3050           
  Misses         37      37           
  Partials       21      21           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 09 '24 10:04 codecov[bot]

@purva-thakre, haha, I'm happy to bear some responsibility here—I'd misread the unitaryHACK dates, this was the first repo I'd clicked on, and the tags made it seem like I was already late to the party.

re style: no black; I ran ruff format before pushing.

atomgardner avatar Apr 20 '24 03:04 atomgardner

Sincerely appreciate the ownership, @atomgardner !

It appears as if the black formatter is still forcing the lines of the test files to aggressively new line. The thing is that applying ruff after black won't revert the black formatting. Hope that makes sense, and of course, feel free to let me know if we can provide any help / clarification / etc!

vprusso avatar Apr 20 '24 15:04 vprusso

@vprusso haha :)

So, I minified the matrices and ran ruff check, and it did lead to a different formatting. How does this look? (Plus, how did you catch this in the first place?)

atomgardner avatar Apr 21 '24 10:04 atomgardner

LGTM! As @purva-thakre said, we hope to see you around for UnitaryHack, @atomgardner !

vprusso avatar May 05 '24 13:05 vprusso