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
54 stars 24 forks source link

Remove qirlib Builder wrapper #193

Closed bamarsha closed 1 year ago

bamarsha commented 1 year ago

The Builder wrapper was added as a workaround for TheDan64/inkwell#347 so that the QIS calls could get a reference to the module. But this is a problem for #180 because it would mean an Inkwellism would be exposed in the PyQIR Python API (the Builder constructor would require a module instead of just a context).

I rewrote the QIS module so that it uses llvm-sys to get the module from the builder, and removed our Builder wrapper.