qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
106 stars 60 forks source link

Incompatibility with jax 0.4.11 #231

Closed wshanks closed 1 year ago

wshanks commented 1 year ago

With jax >=0.4.11, import qiskit_dynamics fails trying to import DeviceArray from jax which was removed in 0.4.11. The end of the traceback is:

  File "/home/conda/feedstock_root/build_artifacts/qiskit-dynamics_1686354044341/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.11/site-packages/qiskit_dynamics/dispatch/backends/jax.py", line 20, in <module>
    from jax.interpreters.xla import DeviceArray
ImportError: cannot import name 'DeviceArray' from 'jax.interpreters.xla'

I saw this here in the conda-forge build of qiskit-dynamics. The documentation of the removal from jax is here.