qiskit-aqt-provider icon indicating copy to clipboard operation
qiskit-aqt-provider copied to clipboard

Add experimental QIR to AQT API converter.

Open airwoodix opened this issue 8 months ago • 0 comments

Summary

This PR adds an experimental conversion function from QIR to the AQT API format.

Due to the limited functionality of the backend, the subset of accepted QIR is quite small (see the conversion function's docstring for the main limitations).

Public documentation may be added once the functionality stabilizes and is properly exposed.

Details and comments

This patch only provides the conversion function and some rather optimistic tests. Follow ups will expose the functionality on AQTResource.

For convenience, the set of accepted QIR QIS calls is slightly larger than the native gate set. Angle-wrapping is performed on the fly on single-qubit gates because it trigger the emission of extra operations. This is not the case for RXX gates and thus no angle-wrapping is performed.

New dependencies (gated by the qir feature):

  • pyqir is used to manipulate the QIR bitcode
  • in tests, qiskit-qir is used to conveniently generate QIR modules from Qiskit QuantumCircuits.

airwoodix avatar May 28 '24 15:05 airwoodix