Pennylane lightning.gpu error

Even though the compilation shows it is using 12.0 cuda versions and tools, somehow lightning.gpu plugin built from source is still looking for cudart.11.0 library. Any thoughts? how I can debug this problem?

import pennylane as qml
import jax
import jax.numpy as jnp


def standard_parametric(weights, n_qubits, n_registers, circuit_depth):
    number_trainable_parameters = 0
    count = 0
    for _ in range(circuit_depth):
        for k in range(n_qubits):
            qml.RY(weights[count], wires=k)
            count += 1
        for k in range(n_qubits-1):
            qubit_1 = k
            qubit_2 = k + 1
            qml.IsingYY(weights[count], wires=[qubit_1, qubit_2])
            count += 1

        for k in range(n_qubits-1):
            control_qubit = k
            target_qubit = k+1
            qml.CRY(weights[count], wires=[control_qubit, target_qubit])
            count += 1
    number_trainable_parameters = count

def qnode_fn(weights):
    standard_parametric(weights, n_qubits, n_registers=1,
    return qml.sample()

dummy_device = qml.device("lightning.gpu", wires=n_qubits, shots=1)
dummy_qnode = qml.QNode(qnode_fn, dummy_device, diff_method=None, interface="jax")

If you want help with diagnosing an error, please put the full error message below:

/global/u1/p/prmantha/pennylane-lightning/pennylane_lightning/lightning_gpu/ UserWarning: cannot open shared object file: No such file or directory
  warn(str(e), UserWarning)
Traceback (most recent call last):
  File "/global/u1/p/prmantha/qugen/apps/logistics/", line 35, in <module>
    dummy_device = qml.device("lightning.gpu", wires=n_qubits, shots=1)
  File "/global/common/software/m4408/pmantha/qugen_env/lib/python3.9/site-packages/pennylane/", line 393, in device
    dev = plugin_device_class(*args, **options)
  File "/global/u1/p/prmantha/pennylane-lightning/pennylane_lightning/lightning_gpu/", line 254, in __init__
    super().__init__(wires, shots=shots, c_dtype=c_dtype)
  File "/global/u1/p/prmantha/pennylane-lightning/pennylane_lightning/core/", line 74, in __init__
    raise ImportError(
ImportError: Pre-compiled binaries for lightning.gpu are not available. To manually compile from source, follow the instructions at
![Screenshot 2024-05-19 at 2.23.03 PM|690x256](upload://ywme6oIJoPjeZd9xO7dGWblWFqX.png)

And, finally, make sure to include the versions of your packages. Specifically, show us the output of qml.about().

Version: 0.36.0
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.
License: Apache License 2.0
Location: /global/common/software/m4408/pmantha/qugen_env/lib/python3.9/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane_Lightning, PennyLane_Lightning_GPU, qugen

Platform info:           Linux-5.14.21-150400.24.81_12.0.87-cray_shasta_c-x86_64-with-glibc2.31
Python version:          3.9.12
Numpy version:           1.26.4
Scipy version:           1.13.0
Installed devices:
- default.clifford (PennyLane-0.36.0)
- default.gaussian (PennyLane-0.36.0)
- default.mixed (PennyLane-0.36.0)
- default.qubit (PennyLane-0.36.0)
- default.qubit.autograd (PennyLane-0.36.0)
- default.qubit.jax (PennyLane-0.36.0)
- default.qubit.legacy (PennyLane-0.36.0)
- (PennyLane-0.36.0)
- default.qubit.torch (PennyLane-0.36.0)
- default.qutrit (PennyLane-0.36.0)
- default.qutrit.mixed (PennyLane-0.36.0)
- null.qubit (PennyLane-0.36.0)
- lightning.qubit (-ennyLane-Lightning-0.36.0)
- lightning.qubit (PennyLane-Lightning-0.36.0)
- lightning.gpu (PennyLane-Lightning-GPU-0.36.0)```

Hi @QuantumMan,

Thank you for your message. If possible I would recommend creating a new virtual environment with Miniconda.

In this new environment make sure to run python -m pip install pennylane pennylane-lightning-gpu --upgrade to ensure the version is the most recent (v0.36.0 as of writing). Once this is installed and up to date, you can try pip install custatevec-cu12 to bring in the CUDA 12 variant of the NVIDIA cuQuantum custatevec library.

Please let me know if the problem persists in the new environment too.