Closed bamarsha closed 2 years ago
There might be some churn on some of the things added in this PR with #140 (for example, I needed to make variables typed there), but that could change depending on how the review for #140 goes.
I removed Valuable and added explicit constructors for constant values. ResultRef is kind of an odd case. I want to remove it and absorb it into Value, but it's not a proper value when static result allocation is turned off because of the magic mapping. So I'll defer that to another PR.
This PR adds support for calling external functions that have a return value, and using that return value as the argument to other external functions or rotation gates. It adds a variable case to PyQIR values. Variables are untyped (type errors will be caught only by LLVM).