Skip to content

Conversation

@mhucka
Copy link
Contributor

@mhucka mhucka commented Aug 14, 2025

The behavior of the function unitary(…) changed with respect to NumPy array arguments. I found the docstring not clear enough during some recent debugging on another issue. I rewrote that part, then noticed inconsistencies in formatting and language elsewhehre, so ended up editing other parts of this file too.

The behavior of the function `unitary()` changed with respect to NumPy
array arguments. I found the docstring not clear enough during some
recent debugging on another issue. I rewrote that part, then noticed
inconsistencies in formatting and language elsewhehre, so ended up
editing other parts of this file too.
@mhucka mhucka requested review from a team and vtomole as code owners August 14, 2025 23:10
@mhucka mhucka requested a review from maffoo August 14, 2025 23:10
@github-actions github-actions bot added the size: S 10< lines changed <50 label Aug 14, 2025
@pavoljuhas
Copy link
Collaborator

Let us first converge on #7595 and then adjust the text here accordingly.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.38%. Comparing base (bc6dab9) to head (78b1ec3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7582   +/-   ##
=======================================
  Coverage   99.38%   99.38%           
=======================================
  Files        1091     1091           
  Lines       97815    97815           
=======================================
  Hits        97214    97214           
  Misses        601      601           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

Let us sync this with the current state of the code after #7595 - please see inline comments.

Otherwise LGTM.

Comment on lines +86 to +88
- If the value is a NumPy array, it is tested using `linalg.is_unitary()`.
If the result is `True`, the array is returned directly; if `is_unitary()`
returns `False`, a `ValueError` exception is raised.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- If the value is a NumPy array, it is tested using `linalg.is_unitary()`.
If the result is `True`, the array is returned directly; if `is_unitary()`
returns `False`, a `ValueError` exception is raised.
- If the value is a NumPy array, it is returned directly.

"\n"
"The value failed to satisfy any of the following criteria:\n"
"The given value failed to satisfy any of the following criteria:\n"
"- A NumPy array for which `linalg.is_unitary()` returned `True`.\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not checked anymore and thus not possible here.

Suggested change
"- A NumPy array for which `linalg.is_unitary()` returned `True`.\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants