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 incorrect inputs for functions that generate states #157

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Jun 4, 2024

close #154

Summary for this PR:

  • fock can only return Ket
  • basis can only return Ket
  • rand_dm can only return Operator
  • users can specify the keyword argument dims for all the functions above, and will check whether the arguments are correct by directly passing them to QuantumObject(A; type = type, dims = dims)

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.52%. Comparing base (c6e8b56) to head (0825a97).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   92.47%   92.52%   +0.05%     
==========================================
  Files          26       26              
  Lines        1847     1847              
==========================================
+ Hits         1708     1709       +1     
+ Misses        139      138       -1     

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

@ytdHuang ytdHuang merged commit 219c907 into qutip:main Jun 4, 2024
14 checks passed
@ytdHuang ytdHuang deleted the fix/states branch June 4, 2024 13:57
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.

Raise exception for incorrect input (dims) in basis and fock
2 participants