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

Add binary operation specialization #2

Merged
merged 7 commits into from
Oct 7, 2022
Merged

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Oct 6, 2022

Add binary operations between JaxArray: matmul, add, sub, kron, multiply,
and binary operation between JaxArray and scalar: mul, pow.

@coveralls
Copy link

coveralls commented Oct 6, 2022

Pull Request Test Coverage Report for Build 3203863830

  • 51 of 54 (94.44%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.5%) to 91.525%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/qutip_jax/binops.py 44 47 93.62%
Totals Coverage Status
Change from base Build 3160050711: 2.5%
Covered Lines: 108
Relevant Lines: 118

💛 - Coveralls

@Ericgig Ericgig requested a review from quantshah October 7, 2022 09:43
@Ericgig
Copy link
Member Author

Ericgig commented Oct 7, 2022

@quantshah
Could you add your new tests in another PR instead of pushing it here.
Usage test and adding specialization don't have to be done together.

@quantshah
Copy link
Member

Everything looks good here except that we cannot pass QuTiP objects to and from functions that require JIT compilation. I wrote a simple use-case to show this. We probably need to do something like this:
jax-ml/jax#4269 (comment)

But I am not sure how what's the best way to go here.

@quantshah
Copy link
Member

Ok I will add the JIT tests in a separate PR. Everything looks good here. Will merge after the tests pass.

@quantshah quantshah merged commit efd1d6e into qutip:master Oct 7, 2022
@Ericgig Ericgig deleted the binops branch October 7, 2022 17:22
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