Skip to content

Add ABI-compatibility linting of C #15983

@jakelishman

Description

@jakelishman

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.

Metadata

Metadata

Assignees

Labels

C APIRelated to the C APItype: feature requestNew feature or requesttype: qaIssues and PRs that relate to testing and code quality

Type

No type

Projects

Status

Ready

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions