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

Qiskit / qiskit / 9197238242
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 22 May 2024 07:43PM UTC
Jobs 1
Files 833
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

22 May 2024 07:25PM UTC coverage: 89.598% (-0.01%) from 89.611%
9197238242

push

github

web-flow
Add `DenseLayout` trial to `SabreLayout` (#12453)

Building on the work done in #10829, #10721, and #12104 this commit adds
a new trial to all runs of `SabreLayout` that runs the dense layout
pass. In general the sabre layout algorithm starts from a random layout
and then runs a routing algorithm to permute that layout virtually where
swaps would be inserted to select a layout that would result in fewer
swaps. As was discussed in #10721 and #10829 that random starting point
is often not ideal especially for larger targets where the distance
between qubits can be quite far. Especially when the circuit qubit count
is low relative to the target's qubit count this can result it poor
layouts as the distance between the qubits is too large. In qiskit we
have an existing pass, `DenseLayout`, which tries to find the most
densely connected n qubit subgraph of a connectivity graph. This
algorithm necessarily will select a starting layout where the qubits are
near each other and for those large backends where the random starting
layout doesn't work well this can improve the output quality.

As the overhead of `DenseLayout` is quite low and the core algorithm is
written in rust already this commit adds a default trial that uses
DenseLayout as a starting point on top of the random trials (and any
input starting points). For example if the user specifies to run
SabreLayout with 20 layout trials this will run 20 random trials and
one trial with `DenseLayout` as the starting point. This is all done
directly in the sabre layout rust code for efficiency. The other
difference between the standalone `DenseLayout` pass is that in the
standalone pass a sparse matrix is built and a reverse Cuthill-McKee
permutation is run on the densest subgraph qubits to pick the final
layout. This permutation is skipped because in the case of Sabre's
use of dense layout we're relying on the sabre algorithm to perform
the permutation.

Depends on: #12104

26 of 28 new or added lines in 1 file covered. (92.86%)

21 existing lines in 2 files now uncovered.

62335 of 69572 relevant lines covered (89.6%)

238448.3 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
90.21
-9.79% crates/accelerate/src/sabre/layout.rs

Uncovered Existing Lines

Lines Coverage ∆ File
4
92.11
-0.25% crates/qasm2/src/lex.rs
17
90.21
-9.79% crates/accelerate/src/sabre/layout.rs
Jobs
ID Job ID Ran Files Coverage
1 9197238242.1 22 May 2024 07:43PM UTC 833
89.6
GitHub Action Run
Source Files on build 9197238242
  • Tree
  • List 833
  • Changed 31
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 531f91c2 on github
  • Prev Build on main (#9195596815)
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