The way the Qiskit C API is exposed to Python/C extension modules is via vtables accessed by compiled-in integer offsets. This is sound and a well-tested approach (NumPy uses a similar system, for example), but maintaining ABI compatibility between different versions of Qiskit requires constant manual review on any PR touching qiskit-cext-vtable to make sure that no slots shift around.
Instead, we should add tooling to compare the slots generated by the current repository state against the slots generated by older versions of Qiskit, and ensure that we only make semver compatible changes. This can then be added to CI, so the testing is automated.
The way the Qiskit C API is exposed to Python/C extension modules is via vtables accessed by compiled-in integer offsets. This is sound and a well-tested approach (NumPy uses a similar system, for example), but maintaining ABI compatibility between different versions of Qiskit requires constant manual review on any PR touching
qiskit-cext-vtableto make sure that no slots shift around.Instead, we should add tooling to compare the slots generated by the current repository state against the slots generated by older versions of Qiskit, and ensure that we only make semver compatible changes. This can then be added to CI, so the testing is automated.