Skip to content

Commit

Permalink
Merge pull request #55 from rochisha0/add-settings
Browse files Browse the repository at this point in the history
Add jax.numpy backend
  • Loading branch information
Ericgig authored Jun 25, 2024
2 parents bd4f704 + 2cd8365 commit 684da39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qutip_jax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from .permute import *
from .reshape import *
from . import norm
from .settings import *
from .measurements import *
from .properties import *
from .linalg import *
Expand Down
7 changes: 7 additions & 0 deletions src/qutip_jax/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import jax.numpy as jnp
from qutip import settings

__all__ = ["use_jax_backend"]

def use_jax_backend():
settings.core['numpy_backend'] = jnp

0 comments on commit 684da39

Please sign in to comment.