• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 23253663161
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: standalone-synth-interfaces
DEFAULT BRANCH: main
Ran 18 Mar 2026 04:24PM UTC
Jobs 1
Files 917
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Mar 2026 03:49PM UTC coverage: 87.416% (+0.009%) from 87.407%
23253663161

push

github

web-flow
Add C API vtable to `pyext` (#15761)

* Add C API vtable to `pyext`

While the `_accelerate.abi3.so` object that ships with Qiskit already
exposes all the C API symbols with public `qk_*` names, this can't
safely be used by distributable compiled Python extension modules,
because they cannot rely even on deferred dynamic linking to the object.
Instead, we define what is effectively a set of vtables, where the
actual addresses of the functions are written (at runtime) at known
offsets to a base pointer.  These can then be accessed without the
actual involvement of a linker by knowing the base pointer of the
vtable, the offset of the desired function and the expected signature.

In order for user builds to be forwards compatible (or in other words,
for later Qiskit builds to be _backwards_ compatible) from an ABI
perspective, the offsets into the vtables must be constant between
Qiskit versions.  This requires them to be defined statically, without
being inferred from other functions; if we try to infer based on the set
of functions, there is no way to keep them the same as functions are
added without defining an order.  The hierarchical `VTable` machinery
introduced in this commit is a trade-off between two extreme approaches:

1. use a per-function annotation to set the slot and the vtable
2. use a single global list completely defining the vtable

Option 1 has the negative that it's incredibly hard to tell from local
information only what the available slots are, and which slot should be
next assigned.  Option 2 is undesirable because it completely
centralises all definitions, which will likely make it very hard to add
new C API functions without constantly generating merge conflicts (which
is especially important to avoid breaking the merge queue), and likely
leads to the functions by sequential offset being in random order (which
isn't a technical problem, but is aesthetically unsatisfying!).

The hierarchical approach allows C-API additions that t... (continued)

335 of 369 new or added lines in 5 files covered. (90.79%)

13 existing lines in 5 files now uncovered.

101670 of 116306 relevant lines covered (87.42%)

1159223.64 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
91.67
crates/pyext/src/capi.rs
31
53.03
crates/cext-vtable/src/impl_.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
86.99
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
74.34
0.29% crates/circuit/src/parameter/symbol_expr.rs
1
94.71
-0.18% crates/transpiler/src/passes/unitary_synthesis/decomposers.rs
4
92.29
-0.51% crates/qasm2/src/lex.rs
6
97.63
-0.47% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 23253663161.1 18 Mar 2026 04:24PM UTC 917
87.42
GitHub Action Run
Source Files on build 23253663161
  • Tree
  • List 917
  • Changed 7
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23253663161
  • 888c8770 on github
  • Prev Build on gh-readonly-queue/main/pr-15486-a415913bc8524a0e6489015b3cfcb942d06fb5b3 (#23251667952)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc