I am an community college professor and I am attempting to use CUDA-Q on the Jetson Orin Nano (Jetpack 6.2). Fresh image. The only thing I had to do was revert snapd back to 2.68.5 to get the browser to run, so I could access the url below.
Following: https://nvidia.github.io/cuda-quantum/latest/using/quick_start.html
I ensured pip version was greater than 24.0 (running 25.1.1)
pip install cudaq
skipped the conda steps, as they were optional
inputted and ran the sample code: see below
rashap@q:~/Documents/cuda-q$ cat program.py
import sys
import cudaq
print(f"Running on target {cudaq.get_target().name}")
qubit_count = int(sys.argv[1]) if 1 < len(sys.argv) else 2
@cudaq.kernel
def kernel():
qubits = cudaq.qvector(qubit_count)
h(qubits[0])
for i in range(1, qubit_count):
x.ctrl(qubits[0], qubits[i])
mz(qubits)
result = cudaq.sample(kernel)
print(result) # Example: { 11:500 00:500 }
rashap@q:~/Documents/cuda-q$ python3 program.py
Running on target nvidia
RuntimeError: initialization error
spisal
July 29, 2025, 4:16pm
2
brashap:
initialization error
Hello @brashap , Would you please post the output of nvidia-smi command?
spisal
July 30, 2025, 5:11pm
4
Thank you @brashap .
Can you please try the following sequence for imports?
import cudaq
import sys
I changed the order, but it not have any effect:
spisal
July 31, 2025, 5:36am
6
Hi @brashap ,
I would like to check if it is an issue with the Nvidia GPU driver.
Would you please set target to qpp-cpu?
cudaq.set_target(“qpp-cpu”)
print(f"Running on target {cudaq.get_target().name}")
Switching to CPU seems to have fixed it, so indeed maybe a gpu issue
spisal
July 31, 2025, 2:46pm
8
Thanks @brashap .
Ah, seems like an issue with Nvidia GPU driver and/or cuda toolkit version then.
Would you be able to update the driver?
@spisal The drivers are integrated into Jetpack 6.2, correct? Is there a way I need to update them that doesn’t disrupt anything else with Jetpack 6.2.
spisal
July 31, 2025, 3:45pm
10
Naive thought, instead of messing up with the embedded drivers, would you be able to upgrade Jetpack to 6.2.1?
@spisal It looks like I already have Jetpack 6.2.1.
And, when I add the -a to the show jetpack, it actually shows three of them: 6.2.1+b38, 6.2+b27, and 6.1+b123, I’m not sure what take presendent.
spisal
July 31, 2025, 4:57pm
13
Can you please show the output of the command below?
apt list --installed nvidia-jetpack
Well, this doesn’t seem right:
Does that mean my next step is: sudo apt install nvidia-jetpack
spisal
July 31, 2025, 5:28pm
15
Apt installed listing can be a bit strict about exact names.
Can you try this command?
dpkg -l ‘nvidia-jetpack*’
spisal
July 31, 2025, 5:43pm
17
Thanks @brashap .
Please run this command
apt-cache policy nvidia-jetpack
and if you do see Installed: (none), then please use the command below to install it
sudo apt update
sudo apt install nvidia-jetpack
Let us know if CUDA-Q code still does not work on your machine.
@spisal I did get installed: (none) and was able to install it. See the verification below. However, also see that after commenting out the qpp-cpu line, I still get the initialization error.
spisal
July 31, 2025, 8:02pm
19
Thanks @brashap . Would you please set this flag export CUDAQ_LOG_LEVEL=info before running your program.py file?
Please post the logs here.