You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature
Currently, set_target is set globally and if we wanted to offload different kernels onto different architectures we could do this:
cudaq.set_target("superconducting")
@cudaq.kernel
def kernel_1()
pass
#execute kernel 1 onto superconducting
cudaq.set_target("photonic")
@cudaq.kernel
def kernel_2()
pass
#execute kernel 2 on photonic now that the target has been changed
This however is not natural and somewhat cumbersome as we have to have things defined in a sequential manner.
I think wrapping a target to a kernel is more natural:
I don't think we should mark kernels for specific targets only. We could consider allowing to pass a target to runtime functions like sample and observe instead.
Required prerequisites
Describe the feature
Currently,
set_target
is set globally and if we wanted to offload different kernels onto different architectures we could do this:This however is not natural and somewhat cumbersome as we have to have things defined in a sequential manner.
I think wrapping a target to a kernel is more natural:
The text was updated successfully, but these errors were encountered: