Move internal_compiler code to qcor and handle qalloc inside a quantum kernel
Created by: tnguyen-ornl
-
Moved qalloc and xacc_internal_compiler to QCOR (under qrt) and ported those related tests.
-
Update qubit type and qalloc to support lifetime tracking and custom allocator. QRT will provide this allocator. Syntax handler to inject the runtime allocator (similar to the way parent_kernel is injected). At final submission, the global ancilla qureg is pulled in if necessary (qalloc inside kernel).
-
Small update to the XASM grammar to allow for inline function calls in the argument list, e.g.
kernel(q, qalloc(q.size()), ...)
and generate the ANTLR source accordingly. -
Update the arithmetic library to use the new feature and to test them.
-
Make more examples become (compile + execution) test cases (not just compile) to improve test coverage.
Related to: https://github.com/ORNL-QCI/qcor/issues/142 and https://github.com/ORNL-QCI/qcor/issues/150