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

Qiskit / qiskit / 10165229615
88%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2024 03:50PM UTC
Jobs 1
Files 858
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

30 Jul 2024 02:08PM UTC coverage: 89.648% (-0.1%) from 89.781%
10165229615

push

github

web-flow
Expose Sabre heuristic configuration to Python (#12171)

* Expose Sabre heuristic configuration to Python

This exposes the entirety of the configuration of the Sabre heuristic to
Python space, making it modifiable without recompilation.  This includes
some additional configuration options that were not previously easily
modifiable, even with recompilation:

- the base weight of the "basic" component can be adjusted
- the weight of the "basic" and "lookahead" components can be adjusted
  to _either_ use a constant weight (previously not a thing) or use a
  weight that scales with the size of the set (previously the only
  option).
- the "decay" component is now entirely separated from the "lookahead"
  component, so in theory you can now have a decay without a lookahead.

This introduces a tracking `Vec` that stores the scores of _all_ the
swaps encountered, rather than just dynamically keeping hold of the best
swaps.  This has a couple of benefits:

- with the new dynamic structure for heuristics, this is rather more
  efficient because each heuristic component can be calculated in
  separate loops over the swaps, and we don't have to branch within the
  innermost loop.
- it makes it possible in the future to try things like assigning
  probabilities to each swap and randomly choosing from _all_ of them,
  not just the best swaps.  This is something I've actively wanted to
  try for quite some time.

The default heuristics in the transpiler-pass creators for the `basic`,
`lookahead` and `decay` strings are set to represent the same heuristics
as before, and this commit is entirely RNG compatible with its
predecessor (_technically_ for huge problems there's a possiblity that
pulling out some divisions into multiplications by reciprocals will
affect the floating-point maths enough to modify the swap selection).

* Update for PyO3 0.21

* Increase documentation of heuristic components

135 of 240 new or added lines in 7 files covered. (56.25%)

16 existing lines in 3 files now uncovered.

67027 of 74767 relevant lines covered (89.65%)

385586.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.23
-0.59% qiskit/transpiler/passes/routing/sabre_swap.py
4
99.05
-0.95% crates/accelerate/src/sabre/route.rs
100
30.07
crates/accelerate/src/sabre/heuristic.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.61
-0.06% crates/accelerate/src/two_qubit_decompose.rs
3
92.73
-0.25% crates/qasm2/src/lex.rs
12
96.69
-0.92% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 10165229615.1 30 Jul 2024 03:49PM UTC 858
89.65
GitHub Action Run
Source Files on build 10165229615
  • Tree
  • List 858
  • Changed 48
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 43d8372e on github
  • Prev Build on main (#10164682771)
  • Next Build on main (#10167476193)
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

© 2026 Coveralls, Inc