Skip to content

Commit 82e5459

Browse files
committed
Note on setting OQUPY_BACKEND variable
1 parent 2f03fbc commit 82e5459

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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)