By abstracting Qiskit object conversion methods, and by returning measurement samples in the form most natural and native to PyQrack, we significantly reduce the potential worst-case execution time for circuits compiled with Qiskit. Notably, this adds the function `pyqrack.util.convert_qiskit_circuit_to_qasm_experiment()`, as a potential last step in circuit compilation.
With v0.17.x development, our point is to use the Qiskit compiler to produce optimized circuit definitions that require the absolute minimum of execution time and other computational resources to run. In its most native case, PyQrack can interpret a Python `list` of Qiskit QASM instructions and output a set of samples to match the requested number of trials. We aim for _this_ code path to be directly accessible _after all compilation steps_, where we assume compilation will occur once to be reused many times. Hence, `convert_qiskit_circuit_to_qasm_experiment()` can be used after compilation from a Qiskit `QuantumCircuit` to bring the compiled result into the format that is fastest for PyQrack to interpret. Also, PyQrack measurement outputs follow PyQrack conventions rather than Qiskit conventions, which is faster for PyQrack.
We also offer a separate `qiskit-qrack-provider` package that abides by Qiskit standards for providers. If a user wants full compatibility with Qiskit, they may use that package, but the alternative Qiskit functionality in the PyQrack package itself need not reproduce perfect adherence to Qiskit standards, in the case that a custom PyQrack implementation or convention would be advantageous for speed or other limiting resource improvements. Hence, the PyQrack package now internally provides an alternative for speed, which we assume need not be used with any part of Qiskit but transpilation.