@CatalinaAlbornoz my cuQuantum SDK version is 22.05, LD_LIBRARY_PATH includes the cuQuantum SDK libraries (such as libcustatevec.so, libcutensornet.so etc), built lightning_gpu 0.24.1 with the commands:
cmake -BBuild -DCUQUANTUM_SDK=path to sdk
cmake --build ./Build --verbose
python -m pip install wheel
python setup.py build_ext --cuquantum=path to sdk
python setup.py bdist_wheel
and ran the test code with the same error message as shown:
python test.py
Name: PennyLane
Version: 0.24.0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: https://github.com/XanaduAI/pennylane
Author:
Author-email:
License: Apache License 2.0
Location: /home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, retworkx, scipy, semantic-version, toml
Required-by: PennyLane-Lightning, PennyLane-Lightning-GPU
Platform info: Linux-5.10.65-tegra-aarch64-with-glibc2.31
Python version: 3.10.4
Numpy version: 1.22.3
Scipy version: 1.8.1
Installed devices:
-
lightning.gpu (PennyLane-Lightning-GPU-0.24.1)
-
default.gaussian (PennyLane-0.24.0)
-
default.mixed (PennyLane-0.24.0)
-
default.qubit (PennyLane-0.24.0)
-
default.qubit.autograd (PennyLane-0.24.0)
-
default.qubit.jax (PennyLane-0.24.0)
-
default.qubit.tf (PennyLane-0.24.0)
-
default.qubit.torch (PennyLane-0.24.0)
-
lightning.qubit (PennyLane-Lightning-0.24.0)
/media/arthurlobo/QML/pennylane-lightning-gpu-0.24.1/pennylane_lightning_gpu/lightning_gpu.py:73: UserWarning: No module named ‘pennylane_lightning_gpu.lightning_gpu_qubit_ops’
warn(str(e), UserWarning)
/media/arthurlobo/QML/pennylane-lightning-gpu-0.24.1/pennylane_lightning_gpu/lightning_gpu.py:413: RuntimeWarning:
!!!#####################################################################################
!!!
!!! WARNING: INSUFFICIENT SUPPORT DETECTED FOR GPU DEVICE WITH lightning.gpu
!!! DEFAULTING TO CPU DEVICE lightning.qubit
!!!
!!!#####################################################################################
warn(
This time I used the Jetson AGX Xavier Developer Kit.
Output of make test-python:
make test-python
python3 -I -m pytest tests --tb=short
===================================================================== test session starts =====================================================================
platform linux – Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
rootdir: /media/arthurlobo/QML/pennylane-lightning-gpu-0.24.1
plugins: mock-3.8.2, flaky-3.7.0
collected 564 items / 1 skipped
tests/test_adjoint_jacobian.py … [ 21%]
…sss… [ 27%]
tests/test_apply.py … [ 50%]
…s [ 69%]
tests/test_comparison.py … [ 77%]
tests/test_gates.py .s…s…ss…s…ss…s…s…s.s…s…ss…s…s…ss…s…ss…s…s…s.s…s…ss… [ 97%]
tests/test_sample.py … [ 98%]
tests/test_var.py … [100%]
====================================================================== warnings summary =======================================================================
tests/test_adjoint_jacobian.py::test_qchem_expvalcost_correct
/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/vqe/vqe.py:153: UserWarning: ExpvalCost is deprecated, use qml.expval() instead. For optimizing Hamiltonian measurements with measuring commuting terms in parallel, use the grouping_type keyword in qml.Hamiltonian.
warnings.warn(
tests/test_gates.py: 110 warnings
/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/ops/qubit/non_parametric_ops.py:1954: UserWarning: The control_wires keyword will be removed soon. Use wires = (control_wires, target_wire) instead. See the documentation for more information.
warnings.warn(
================================================== 532 passed, 33 skipped, 111 warnings in 71.06s (0:01:11) ===================================================
pl-device-test --device lightning.gpu --skip-ops --shots=20000
===================================================================== test session starts =====================================================================
platform linux – Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests, configfile: pytest.ini
plugins: mock-3.8.2, flaky-3.7.0
collected 372 items
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_compare_default_qubit.py sssssssss [ 2%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_gates.py … [ 11%]
… [ 52%]
… [ 60%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_gates_with_expval.py … [ 66%]
… [ 79%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_measurements.py …s…sss… [ 86%]
…sss.ssss…ss.ss…ss [ 95%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_properties.py …s.X… [ 97%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_tracker.py sss [ 98%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_wires.py … [100%]
====================================================================== warnings summary =======================================================================
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/ops/qubit/non_parametric_ops.py:1954
/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/ops/qubit/non_parametric_ops.py:1954: UserWarning: The control_wires keyword will be removed soon. Use wires = (control_wires, target_wire) instead. See the documentation for more information.
warnings.warn(
=================================================== 341 passed, 30 skipped, 1 xpassed, 1 warning in 14.90s ====================================================
pl-device-test --device lightning.gpu --shots=None --skip-ops
===================================================================== test session starts =====================================================================
platform linux – Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests, configfile: pytest.ini
plugins: mock-3.8.2, flaky-3.7.0
collected 372 items
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_compare_default_qubit.py sssss… [ 2%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_gates.py … [ 11%]
… [ 52%]
… [ 60%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_gates_with_expval.py … [ 66%]
… [ 79%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_measurements.py …sss… [ 86%]
…ssssssssssss.ss…ss [ 95%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_properties.py …s.X… [ 97%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_tracker.py sss [ 98%]
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/devices/tests/test_wires.py … [100%]
====================================================================== warnings summary =======================================================================
…/…/…/…/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/ops/qubit/non_parametric_ops.py:1954
/home/arthurlobo/.conda/envs/qml_py310/lib/python3.10/site-packages/pennylane/ops/qubit/non_parametric_ops.py:1954: UserWarning: The control_wires keyword will be removed soon. Use wires = (control_wires, target_wire) instead. See the documentation for more information.
warnings.warn(
=================================================== 343 passed, 28 skipped, 1 xpassed, 1 warning in 10.04s ====================================================
Output of deviceQuery command:
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: “Xavier”
CUDA Driver Version / Runtime Version 11.4 / 11.4
CUDA Capability Major/Minor version number: 7.2
Total amount of global memory: 14907 MBytes (15631454208 bytes)
(008) Multiprocessors, (064) CUDA Cores/MP: 512 CUDA Cores
GPU Max Clock rate: 1377 MHz (1.38 GHz)
Memory Clock rate: 1377 Mhz
Memory Bus Width: 256-bit
L2 Cache Size: 524288 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total shared memory per multiprocessor: 98304 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device supports Managed Memory: Yes
Device supports Compute Preemption: Yes
Supports Cooperative Kernel Launch: Yes
Supports MultiDevice Co-op Kernel Launch: Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.4, CUDA Runtime Version = 11.4, NumDevs = 1
Result = PASS