qir-alliance / qcor

C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC
http://docs.aide-qc.org
MIT License
97 stars 39 forks source link

[OpenQASM3] Support input/output variable modifiers #222

Open 1tnguyen opened 3 years ago

1tnguyen commented 3 years ago

Ref: https://qiskit.github.io/openqasm/language/directives.html#input-output

We may utilize the output modifier as a way to mark a variable as the return value of the main OpenQASM3 program (wrapped inside the __internal_mlir function)

Related to https://github.com/ORNL-QCI/qcor/issues/190

I lodged this separately here since this is a new feature. I guess we'll close https://github.com/ORNL-QCI/qcor/issues/190 once all the updated syntax has been incorporated.