Replies: 1 comment
-
Thank you for the question. You are correct, this isn't supported in CUDA-Q.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have a python script that is supposed to simulate some quantum algorithm. The required number of qubits would only be determined at runtime of the script. Within the script I can easily create custom ops using
cudaq.register_operation(...)
.The problem is, that I failed to call these custom ops in the kernels, with the dynamically computed number of qubits. That is, because the only way I found to call the custom ops is by hardcoding the qubits that the custom op acts on.
Is there any way to avoid this hard coding?
In the mwe below this call of the custom op takes place in the kernel
my_kernel(n: int)
.I am using the container from nvcr.io/nvidia/quantum/cuda-quantum:cu12-0.11.0
Which gives:
Beta Was this translation helpful? Give feedback.
All reactions