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

Qiskit / qiskit / 15027465497
88%

Build:
DEFAULT BRANCH: main
Ran 14 May 2025 06:08PM UTC
Jobs 1
Files 809
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

14 May 2025 05:12PM UTC coverage: 88.704% (+0.01%) from 88.69%
15027465497

push

github

web-flow
Port disjoint layout utils in rust (#14177)

* Port disjoint layout utils in rust

This commit ports the disjoint layout utils into rust. The eventual goal
of this is to enable porting the full DenseLayout and SabreLayout pass
to rust so it's a standalone function. This will enable us exposing
these passes as a C function. Since the eventual goal of this
functionality is to expose it as a C function this attempts to do as
much as possible without a py token. A standalone rust entrypoint is
added which will serve as what is called from the standalone rust passes
in the future, this is then wrapped in a python entrypoint.

If we have a target that can't build a coupling map from Rust the
disjoint utils return None. This could be because the target could be
global and not have any connectivity constraints, or it could be caused
by having a FakeTarget that doesn't expose certain constraints to rust.
This commit fixes this by falling back to the coupling map python path
in these cases since we can get the python coupling map and use the
python version of the disjoint utils.

* Improve ergonomics of rust interface

* Run rustfmt

* Remove stale comment

* Use Graph instead of StableGraph and UnGraph for coupling

This commit moves to using a regular Graph instead of StableGraph
internally in the disjoint utils. We are never removing nodes from
interaction graphs or coupling graphs so we don't need index stability
on removals and using Graph avoids the overhead for tracking the free
list. Additionally we can use undirected graphs for the coupling graph
since we don't have physical gates defined in the layout stage because
we need to pick the qubits first before we can worry about the
directionality of the gates selected. The one caveat with this is the
CouplingMap in Python is directed so we need to add the reverse edge
when making the coupling map object in Python to ensure we're not
representing things differently.

* Remove python implementation of disjoi... (continued)

434 of 480 new or added lines in 7 files covered. (90.42%)

8 existing lines in 3 files now uncovered.

76375 of 86101 relevant lines covered (88.7%)

427660.75 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
93.26
-1.86% qiskit/transpiler/passes/layout/dense_layout.py
44
90.37
crates/transpiler/src/passes/disjoint_layout.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.23
-0.23% crates/qasm2/src/expr.rs
3
92.23
0.5% crates/qasm2/src/lex.rs
4
93.18
-1.05% crates/circuit/src/packed_instruction.rs
Jobs
ID Job ID Ran Files Coverage
1 15027465497.1 14 May 2025 06:08PM UTC 809
88.7
GitHub Action Run
Source Files on build 15027465497
  • Tree
  • List 809
  • Changed 11
  • Source Changed 6
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15027465497
  • 940f44cc on github
  • Prev Build on main (#15001620749)
  • Next Build on main (#15044879393)
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