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

Qiskit / qiskit / 10168162794
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15562-f617d0afcca71953581b4085f032cc83b3ecbd21
DEFAULT BRANCH: main
Ran 30 Jul 2024 07:18PM UTC
Jobs 1
Files 854
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

30 Jul 2024 06:24PM UTC coverage: 89.861% (-0.09%) from 89.954%
10168162794

push

github

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

* 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

(cherry picked from commit 43d8372ef7350a348897afa9c7dbd51c... (continued)

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

8 existing lines in 3 files now uncovered.

66427 of 73922 relevant lines covered (89.86%)

233878.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10168162794.1 30 Jul 2024 07:18PM UTC 0
89.86
GitHub Action Run
Source Files on build 10168162794
Detailed source file information is not available for this build.
  • Back to Repo
  • 927d592e on github
  • Prev Build on gh-readonly-queue/stable/1.2/pr-12855-a04a12d1261f0d3b9d441d63b1e2700d650b21a0 (#10166686322)
  • Next Build on stable/1.2 (#10168948981)
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