qir-alliance / pyqir

PyQIR is a set of APIs for generating, parsing, and evaluating Quantum Intermediate Representation (QIR).
https://qir-alliance.github.io/pyqir
MIT License
57 stars 24 forks source link

Add bitcode/qir conversion functions to generator #115

Closed idavis closed 2 years ago

idavis commented 2 years ago

This PR adds ir_to_bitcode and bitcode_to_ir functions to the generator package. Also fixes a bug where the rurned bitcode from SimpleModule::bitcode() returned a list of bytes instead of a bytes object.