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

introduce rand_unitary and isunitary #203

Merged
merged 7 commits into from
Aug 20, 2024

Conversation

ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Aug 13, 2024

This PR introduces two functions which are the same ones in qutip:

  • rand_unitary: Returns a random unitary with two different provided methods.
  • isunitary: Test whether a Qobj $$U$$ is unitary operator. This function calls Base.isapprox to test whether $$U U^\dagger$$ is approximately equal to identity operator.

Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.26%. Comparing base (5499a17) to head (95e0977).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
+ Coverage   93.21%   93.26%   +0.05%     
==========================================
  Files          28       28              
  Lines        2152     2168      +16     
==========================================
+ Hits         2006     2022      +16     
  Misses        146      146              

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

src/qobj/operators.jl Show resolved Hide resolved
src/qobj/operators.jl Show resolved Hide resolved
@albertomercurio albertomercurio merged commit 74448b0 into qutip:main Aug 20, 2024
14 checks passed
@ytdHuang ytdHuang deleted the dev/unitary branch August 20, 2024 13:27
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.

2 participants