qcor icon indicating copy to clipboard operation
qcor copied to clipboard

QPU Lambdas need to be able to use __qpu__ kernels

Open 1tnguyen opened this issue 3 years ago • 2 comments

Ideally, users wouldn't need to capture but can just use these kernels, e.g. from an included header file, etc.

1tnguyen avatar May 11 '21 00:05 1tnguyen

Hello, Please tell me how to proceed with this?

divshacker avatar Jun 03 '22 19:06 divshacker

I'd suggest that you take a look at the _qpu_lambda class implementation in https://github.com/qir-alliance/qcor/blob/master/runtime/kernel/quantum_kernel.hpp first. It is quite a complicated class, involving the JIT engine (QJIT). The feature mentioned in this task is to find a way to inject other kernels (e.g., defined as standalone __qpu__ kernels) into the JIT compilation context of the _qpu_lambda.

We don't have a solution for this yet. So please feel free to propose an implementation.

1tnguyen avatar Jun 04 '22 00:06 1tnguyen