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

Update settings on change of backend #66

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

rochisha0
Copy link
Contributor

Updated functions to toggle between JAX and NumPy backends for solvers and dtype with corresponding method adjustments in QuTiP.

@coveralls
Copy link

coveralls commented Aug 19, 2024

Pull Request Test Coverage Report for Build 10484760873

Details

  • 4 of 15 (26.67%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.7%) to 89.785%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/qutip_jax/settings.py 4 15 26.67%
Files with Coverage Reduction New Missed Lines %
src/qutip_jax/binops.py 1 96.5%
Totals Coverage Status
Change from base Build 9842191187: -0.7%
Covered Lines: 1213
Relevant Lines: 1351

💛 - Coveralls

Copy link
Member

@Ericgig Ericgig left a comment

Choose a reason for hiding this comment

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

Overall look good.

I am not a fan of the functions name... It set more than just the backend.
How about set_jax_as_default(*, revert=False) or set_as_default(*, revert=False)?

import qutip_jax
qutip_jax.use_as_default()
...
qutip_jax.use_as_default(revert=True)
...

@Ericgig Ericgig merged commit 2db4223 into qutip:master Aug 21, 2024
3 checks passed
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.

3 participants