Skip to content

Commit cb5a93a

Browse files
committed
Note on setting OQUPY_BACKEND variable
1 parent aa1fa82 commit cb5a93a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

DEVELOPMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ To enable experimental features switch to the `dev/jax` branch and use
2424
from oqupy.backends import enable_jax_features
2525
enable_jax_features()
2626
```
27+
Alternatively, the `OQUPY_BACKEND` environmental variable may be set to `jax` to
28+
initialize the jax backend by default.
2729

2830
### Contributing Guidelines
2931

docs/pages/gpu_features.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ To enable experimental features, switch to the ``dev/jax`` branch and use
2525
from oqupy.backends import enable_jax_features
2626
enable_jax_features()
2727
28+
Alternatively, the `OQUPY_BACKEND` environmental variable may be set to `jax` to
29+
initialize the jax backend by default.
30+
2831
Contributing Guidelines
2932
~~~~~~~~~~~~~~~~~~~~~~~
3033

examples/simple_dynamics_jax.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import oqupy
99
from oqupy.backends import enable_jax_features
1010
# import NumPy from numerical_backend
11-
from oqupy.backends.numerical_backend import np
12-
enable_jax_features()
11+
#from oqupy.backends.numerical_backend import np
12+
#enable_jax_features()
1313

1414
import matplotlib.pyplot as plt
1515
sigma_x = oqupy.operators.sigma("x")
@@ -39,5 +39,5 @@
3939
plt.plot(t, s_z, label=r'$\alpha=0.3$')
4040
plt.xlabel(r'$t\,\Omega$')
4141
plt.ylabel(r'$\langle\sigma_z\rangle$')
42-
#plt.savefig('simple_dynamics.png')
43-
plt.show()
42+
plt.savefig('simple_dynamics_jax.png')
43+
#plt.show()

0 commit comments

Comments
 (0)