To support multi-threading in QCOR, we need to audit and fix the usage of some static global variables.
This may include:
(1) the qcor runtime (qrt_impl): building up circuit IR for quantum kernels, optimization, submission, etc.
(2) the qpu instance cached in the internal_compiler namespace (which will be used by the qrt for execution)
When pursuing this feature, we could also look into moving the qpu shared pointer as a member of the qrt implementation for future maintainability.
Note: For JIT compilation (using QJIT, which is non-copyable), we need to make the entire class thread-safe (which I think we've done in https://github.com/ORNL-QCI/qcor/pull/157)
To support multi-threading in QCOR, we need to audit and fix the usage of some static global variables.
This may include:
(1) the qcor runtime (
qrt_impl): building up circuit IR for quantum kernels, optimization, submission, etc.(2) the
qpuinstance cached in theinternal_compilernamespace (which will be used by the qrt for execution)When pursuing this feature, we could also look into moving the
qpushared pointer as a member of the qrt implementation for future maintainability.Note: For JIT compilation (using QJIT, which is non-copyable), we need to make the entire class thread-safe (which I think we've done in https://github.com/ORNL-QCI/qcor/pull/157)