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 usage of rand_unitary and rand_ket #163

Merged
merged 4 commits into from
Aug 31, 2022
Merged

Conversation

christian512
Copy link
Contributor

@christian512 christian512 commented Aug 22, 2022

The signature of rand_unitary has changed recently in QuTiP 5. The argument dims no longer exists. This PR changes the two usages of rand_unitary by checking the version of QuTiP and then using the corresponding definition.
The same holds for rand_ket.

The tests were recently failing due to this change in QuTiP 5.

@christian512 christian512 changed the title Fix usage of rand_unitary for QuTiP 5 Fix usage of rand_unitary and rand_ket Aug 22, 2022
Copy link
Member

@BoxiLi BoxiLi left a comment

Choose a reason for hiding this comment

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

Thank you! @christian512

@BoxiLi BoxiLi merged commit a8d3c45 into qutip:master Aug 31, 2022
@BoxiLi BoxiLi added this to the qutip-qip-0.2.3 milestone Sep 11, 2022
@BoxiLi BoxiLi added the qutip5 qutip 5 compatibility label Sep 11, 2022
BoxiLi pushed a commit to BoxiLi/qutip-qip that referenced this pull request Oct 23, 2022
* add version test for definition of rand_unitary

* fix usage of rand_ket and rand_unitary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qutip5 qutip 5 compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants