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

Qiskit / qiskit / 35882578663
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: c/contributing
DEFAULT BRANCH: main
Ran 23 Sep 2026 03:59PM UTC
Jobs 1
Files 966
Run time 4min
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

23 Sep 2026 03:34PM UTC coverage: 87.857% (+0.02%) from 87.833%
35882578663

push

github

web-flow
Add `unsafe` trait  for C/Rust ownership transfer (#17037)

* Add `unsafe` trait  for C/Rust ownership transfer

We currently have ad-hoc cross-function assumptions that all Rust-native
objects exposed directly to C are boxed and leaked.  This works fine in
principle, but will become more complicated when we introduce some types
that expose by `Arc`, which will happen as soon as we have
shared-ownership vtables for custom trait objects (e.g.
`CustomOperation`, `Pass` and `IR`).

Encapsulating this in a trait has two major benefits:

1. In existing code, we can abstract away the FFI boundary layer, making
   it much easier to ensure the `leak`/`steal` sides agree on the base
   type used.

2. In new code, we can use trait bounds on `ExposesOwnedPointers` to
   assert particular behaviour around the ownership shape.  This is
   anticipated to be used in the new pass-manager logic which needs to
   cast between `Box<dyn IR>` and `Box<T>` where `trait IR: Any`, and
   subsequently expose owned downcast objects to C.  This is only safe
   when the owner of the downcast type is exposed via `Box`, but the
   same PR will introduce objects that expose via `Arc`.

* Use leak in circuit-library functions

* Fix typos

73 of 77 new or added lines in 11 files covered. (94.81%)

6 existing lines in 3 files now uncovered.

118753 of 135166 relevant lines covered (87.86%)

971121.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
82.35
0.0% crates/cext/src/circuit_library/iqp.rs
1
87.75
0.18% crates/cext/src/dag.rs
1
87.23
1.94% crates/cext/src/pointers.rs
1
89.94
0.5% crates/cext/src/transpiler/target.rs

Coverage Regressions

Lines Coverage ∆ File
3
81.53
-0.07% crates/circuit/src/parameter/symbol_expr.rs
2
93.06
1.29% crates/qasm2/src/lex.rs
1
90.32
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 35882578663.1 23 Sep 2026 03:59PM UTC 966
87.86
GitHub Action Run
Source Files on build 35882578663
  • Tree
  • List 966
  • Changed 15
  • Source Changed 11
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35882578663
  • 5132160f on github
  • Prev Build on gh-readonly-queue/main/pr-16957-f69ade8bdc2027f5ef9514c2f4f9428e82833009 (#35874638421)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc