Hello,
I am trying to use a Pytorch model along with my quantum circuit accelerated by catalyst.
Initially, I ran the command:
pip install pennylane pennylane-lightning-gpu pennylane-catalyst pennylane-qiskit torch
This installed the latest Pennylane and Catalyst versions, along with torch 2.4.1
>>> qml.about()
Name: pennylane
Version: 0.42.1
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page:
Author:
Author-email:
License-Expression: Apache-2.0
Location: /home/ashutosh/Test-Code/python/testvenv/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing_extensions
Required-by: PennyLane-qiskit, pennylane_catalyst, pennylane_lightning, pennylane_lightning_gpu
Platform info: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python version: 3.10.12
Numpy version: 2.2.6
Scipy version: 1.15.3
Installed devices:
- lightning.gpu (pennylane_lightning_gpu-0.42.0)
- qiskit.aer (PennyLane-qiskit-0.42.0)
- qiskit.basicaer (PennyLane-qiskit-0.42.0)
- qiskit.basicsim (PennyLane-qiskit-0.42.0)
- qiskit.remote (PennyLane-qiskit-0.42.0)
- nvidia.custatevec (pennylane_catalyst-0.12.0)
- nvidia.cutensornet (pennylane_catalyst-0.12.0)
- oqc.cloud (pennylane_catalyst-0.12.0)
- softwareq.qpp (pennylane_catalyst-0.12.0)
- lightning.qubit (pennylane_lightning-0.42.0)
- default.clifford (pennylane-0.42.1)
- default.gaussian (pennylane-0.42.1)
- default.mixed (pennylane-0.42.1)
- default.qubit (pennylane-0.42.1)
- default.qutrit (pennylane-0.42.1)
- default.qutrit.mixed (pennylane-0.42.1)
- default.tensor (pennylane-0.42.1)
- null.qubit (pennylane-0.42.1)
- reference.qubit (pennylane-0.42.1)
>>>
>>> torch.__version__
'2.4.1+cu121'
However, when trying to execute my JAX circuits I got the following warning:
WARNING:2025-07-31 20:58:21,824:jax._src.xla_bridge:909: An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu.
Upon looking at other issues with the same warning, I realized that I was missing the JAX-cuda libraries.
I tried to install these libraries, but I see this error:
>$ pip install jax[cuda12]
...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torch 2.4.1 requires nvidia-cudnn-cu12==9.1.0.70; platform_system == "Linux" and platform_machine == "x86_64", but you have nvidia-cudnn-cu12 9.11.0.98 which is incompatible.
Successfully installed jax-cuda12-pjrt-0.6.0 jax-cuda12-plugin-0.6.0 nvidia-cuda-nvcc-cu12-12.9.86 nvidia-cudnn-cu12-9.11.0.98
Is there a way that I can work with both Pytorch and JAX/Catalyst?