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

Qiskit / qiskit / 17079166433
88%

Build:
DEFAULT BRANCH: main
Ran 19 Aug 2025 07:40PM UTC
Jobs 1
Files 842
Run time 3min
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

19 Aug 2025 06:27PM UTC coverage: 88.285% (+0.005%) from 88.28%
17079166433

push

github

web-flow
Add TranspileLayout to the C API (#14780)

* Add TranspileLayout to the C API

This commit adds the TranspileLayout struct added in #14778 to the C
API. It is a straightforward addition to the API as the interface is
fairly simple. Given a pointer to a TranspileLayout the methods return
the arrays for the various views of the layout or the number of qubits
for the input and output circuits.

One small change was made to the PhysicalQubit and VirtualQubit type
definitions to use #[repr(transparent)] which in practice shouldn't
change anything, but it makes it explicit that these can be used
interchangeably with a u32. This simplifies how we can return arrays of
either type to C because it is safe to cast them as pointers to u32s.

Note that nothing in the C API is capable of generating a transpile
layout currently. The intent is for it to be part of the full
transpile() function return (see #14778). In the meantime this is
tested solely through rust tests and there aren't any tests written
in C yet. A potential follow up commit can be made to update the
standalone vf2 layout pass function to use a transpile layout inside
it's result type which would be more ergonomic than it's current
layout object in the result. But to keep this PR targeted this doesn't
update that interface and only exposes the struct to the C API.

* Apply suggestions from code review

Co-authored-by: Jake Lishman <jake@binhbar.com>

* Update high level docs

* Rework C interface to write arrays to user provided pointers

This commit reworks the C API for accessing the layout details to
writing the output to a user provided pointer rather than allocating the
output array and giving them the pointer and size of it.

* Fix lint and docs

* Add missing free method

* Apply suggestions from code review

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update crates/cext/src/transpiler/transpile_layout.rs

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Query everything

* Remove ... (continued)

272 of 282 new or added lines in 1 file covered. (96.45%)

22 existing lines in 3 files now uncovered.

88369 of 100095 relevant lines covered (88.29%)

504060.13 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
10
96.45
crates/cext/src/transpiler/transpile_layout.rs

Uncovered Existing Lines

Lines Coverage ∆ File
4
74.42
-0.16% crates/circuit/src/parameter/symbol_expr.rs
6
91.24
-1.03% crates/qasm2/src/lex.rs
12
97.09
-0.94% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 17079166433.1 19 Aug 2025 07:40PM UTC 842
88.29
GitHub Action Run
Source Files on build 17079166433
  • Tree
  • List 842
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17079166433
  • 1c04c19c on github
  • Prev Build on main (#17074112127)
  • Next Build on main (#17079669825)
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

© 2025 Coveralls, Inc