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

Qiskit / qiskit / 16950907807
88%

Build:
DEFAULT BRANCH: main
Ran 13 Aug 2025 11:13PM UTC
Jobs 1
Files 837
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

13 Aug 2025 09:58PM UTC coverage: 88.255% (+0.02%) from 88.238%
16950907807

push

github

web-flow
Collapse Sabre nodes with no routing implications (#14607)

* Collapse Sabre nodes with no routing implications

Not all nodes in the `SabreDAG` actually imply additional routing
constraints.  For example, a 2q gate immediately following a prior 2q
gate on the same qubits doesn't need to be routed; it's automatically
valid as soon as its predecessor is.  Similarly, 1q gates (without
additional classical wires) never impact routing and can be folded into
previous instructions.

More formally, a `Synchronize` node whose incoming edges are all from
the same predecessor (or are at the start of the circuit) does not
actually synchronise anything, and can be folded into any preceding
node.  A `TwoQ` node whose incoming edges are all from the same
predecessor can be folded into that predecessor if it is another `TwoQ`
node (even if there were already intermediate `Synchronize` nodes folded
into that `TwoQ` node).  `ControlFlow` nodes always have to be
considered by the router, because they need to be recursed into.

Collapsing these nodes as part of the `SabreDAG` construction has a few
benefits:

- In layout, when we keep multiple versions of a `SabreDAG`
  around, we have to store less memory, especially because we can
  entirely throw away all tracking of the collapsed DAG nodes, since we
  never need to rebuild afterwards.

- In routing, when we look ahead to populate the extended set, we no
  longer need to have the separate `visit_now` queue because all the
  nodes (and more!) that we would "look through" to make a DFS over the
  2q gates are now automatically folded into the preceding 2q gate
  already.  The behaviour is not entirely identical (the handling of
  wide `Synchronize` items can be slightly different), but the spirit is
  still there, and the handling is much easier.

- When populating the extended set, runs of 2q gates can no longer be
  multiply counted.  Previously, a run _could_ saturate the extended
  set, biasing the algorithm toward... (continued)

65 of 68 new or added lines in 2 files covered. (95.59%)

16 existing lines in 5 files now uncovered.

87243 of 98853 relevant lines covered (88.26%)

508901.63 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
94.62
0.44% crates/transpiler/src/passes/sabre/dag.rs
2
92.8
-0.36% crates/transpiler/src/passes/sabre/route.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
83.39
0.0% crates/circuit/src/parameter/parameter_expression.rs
1
92.24
-0.1% crates/transpiler/src/passes/unitary_synthesis.rs
2
92.8
-0.36% crates/transpiler/src/passes/sabre/route.rs
3
92.01
0.52% crates/qasm2/src/lex.rs
9
74.42
-0.37% crates/circuit/src/parameter/symbol_expr.rs
Jobs
ID Job ID Ran Files Coverage
1 16950907807.1 13 Aug 2025 11:13PM UTC 837
88.26
GitHub Action Run
Source Files on build 16950907807
  • Tree
  • List 837
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16950907807
  • e364cd96 on github
  • Prev Build on gh-readonly-queue/main/pr-14895-aeb15b82cf115a6faa8ce11c26e91099d97b810a (#16943439613)
  • Next Build on main (#16967470304)
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