From 3c16bd57532043efaa25ab6ba705771b6943c7ef Mon Sep 17 00:00:00 2001 From: Eric Giguere Date: Wed, 3 Apr 2024 08:53:28 +0900 Subject: [PATCH 1/3] Fix typos in documentation example --- doc/source/basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/basics.rst b/doc/source/basics.rst index 222077a..c5f7a28 100644 --- a/doc/source/basics.rst +++ b/doc/source/basics.rst @@ -64,7 +64,7 @@ There are many ways to create a QuTiP ``Qobj`` backed by JAX's array class. import qutip import qutip_jax - with qutip.CoreOptions("default_dtype"="jax"): + with qutip.CoreOptions(default_dtype="jax"): jax_eye_qobj = qutip.qeye(3) assert isinstance(jax_eye_qobj.data, qutip_jax.JaxArray) From ab6a5e1ae0dcb1a5cf4847199ada386602217c99 Mon Sep 17 00:00:00 2001 From: Eric Giguere Date: Wed, 3 Apr 2024 13:01:23 +0900 Subject: [PATCH 2/3] Loosen dependencies --- doc/requirements.txt | 11 ++++++----- setup.cfg | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index bc01b9b..6fde020 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,8 +1,8 @@ -numpy==1.22.4 -scipy==1.7.3 -qutip==5.0.0a2 -cython==3.0.2 -Sphinx==6.1.3 +numpy>=1.22.4 +scipy>=1.7.3 +qutip>=5.0.0 +cython>=3.0.2 +Sphinx>=6.1.3 sphinx-rtd-theme==1.2.0 sphinx-gallery==0.12.2 sphinxcontrib-applehelp==1.0.3 @@ -17,4 +17,5 @@ numpydoc==1.4.0 matplotlib==3.7.1 docutils==0.18.1 jax +jax[cpu] jaxlib diff --git a/setup.cfg b/setup.cfg index 3b72c88..4334b22 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,6 @@ include_package_data = True install_requires = qutip>=5.0.0.dev0 jax - jax[cpu] diffrax equinox setup_requires = From 3eb253f8fc35ebbe34f100c9b83b1346020d0101 Mon Sep 17 00:00:00 2001 From: Eric Giguere Date: Wed, 3 Apr 2024 13:10:41 +0900 Subject: [PATCH 3/3] Install jaxlib in actions --- .github/workflows/build_documentation.yml | 7 ++++--- .github/workflows/tests.yml | 7 ++++--- .github/workflows/weekly.yml | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 74b9d53..10bc4c7 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -18,16 +18,17 @@ jobs: - name: Install documentation dependencies run: | - python -mpip install -r doc/requirements.txt + python -m pip install -r doc/requirements.txt - name: Install QuTiP from GitHub run: | - python -mpip install git+https://github.com/qutip/qutip.git@master + python -m pip install git+https://github.com/qutip/qutip.git@master python -c 'import qutip; qutip.about()' - name: Install qutip-jax from GitHub run: | - python -mpip install .[full] + python -m pip install jax jax[cpu] + python -m pip install .[full] python -c 'import qutip_jax; print(qutip_jax.__version__)' - name: Build documentation diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc5c5ea..41599c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,15 +36,16 @@ jobs: - name: Install QuTiP from GitHub run: | - python -mpip install git+https://github.com/qutip/qutip.git@master + python -m pip install git+https://github.com/qutip/qutip.git@master python -c 'import qutip; qutip.about()' - name: Install qutip-jax and dependencies # Install in editable mode so Coveralls detects the tree structure # relative to the git repository root as well. run: | - python -mpip install -e .[full] - python -mpip install pytest-cov coveralls + python -m pip install jax jax[cpu] + python -m pip install -e .[full] + python -m pip install pytest-cov coveralls - name: Package information run: | diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index e0dfc7a..d6a219e 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -51,7 +51,8 @@ jobs: # Install in editable mode so Coveralls detects the tree structure # relative to the git repository root as well. run: | - python -mpip install -e .[full] + python -m pip install jax jax[cpu] + python -m pip install -e .[full] - name: Package information run: |