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
{{ message }}
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Currently the input QIR files for tests in QirRuntime are generated manually and have to be doctored before they can be used. This creates a maintenance burden and a possibility of drift between the intended Q# input and the actual QIR input for the tests.
Step 1: remove the necessity to post-edit QIR input
Reasons for post-editing of the QIR files:
they might contain calls to non-implemented runtime callbacks even if these calls are never executed by the QIR
there might contain duplicated symbol definitions for partial applications and memory management functions
they do contain duplicated symbol definitions for PauliX constants
To address the above we could:
fix the corresponding bugs in the compiler so it doesn't generate unnecessary code and/or add stubs in the runtime to enable linking
(and 3.) compile all input Q# files into a single *.ll file (we will still have manually authored test .ll files but these we can create in a way that avoids naming conflicts). To be able to do this before multiple entry points are supported by Q# compiler, might need to modify the tests to use C-compatible signatures so wouldn't need to C-compatible wrapper provided by @EntryPoint attribute
Step 2: enable QirRuntime project to consume Q# compiler as a package and incorporate QIR generation into the build process (probably in the form of custom CMake actions). Note: this should also remove the need for maintaining QirCore.qs and QirTarget.qs in the runtime.