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

Qiskit / qiskit / 17434232678
88%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2025 01:39PM UTC
Jobs 1
Files 864
Run time 6min
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

03 Sep 2025 12:27PM UTC coverage: 88.325% (-0.06%) from 88.388%
17434232678

push

github

web-flow
Add on-the-fly score pruning to VF2 (#14856)

This is a complete rewrite of the VF2 codebase, also adding the concept
of "score" to the semantic matchers for nodes and edges.  Nothing in the
current codebase is updated to use the new scoring capabilities in this
patch, though the modifications to how the node-matching functions need
to be supplied are respected.

The on-the-fly scoring is to support the use-case of our `VF2Layout` and
`VF2PostLayout` passes, which are a minimising reduction over all
possible subgraph isomorphisms.  The current logic generates each
isomorphism, keys that to a score, then finds the minimal mapping based
on that key.  The benefits of on-the-fly scoring are:

1. The VF2 search tree can be eagerly pruned as soon as the score of the
   partial mapping exceeds the current known minimal value.  In terms of
   the code structure here, we claim a candidate mapping pair is
   "unfeasible" if it increases the score past the minimum.  This allows
   us to terminate entire branches of the algorithm, potentially with
   many levels of depth still unmapped.  This can be a combinatoric
   improvement on the complete iterator.

2. A given pair of layouts generated "close" together (in terms of the
   loop over isomorphisms) will usually share most of their node
   mappings.  This means that they also share almost all of their score
   calculation.  By tracking the score on-the-fly, and backtracking the
   score to a previous state as we pop pairs out of the mapping, we
   avoid recalculating much of the score.  If there are many available
   subgraph isomorphisms, differing only by small numbers of qubits at
   one end, this can improve the asymptotic complexity of the scoring
   significantly.

The scoring, as implemented here, does come at a cost: if enabled, but
there is _no_ isomorphism, we'll waste time by scoring partial layouts
all the way through, only for the regular structural checks to show that
everything was already imposs... (continued)

356 of 572 new or added lines in 3 files covered. (62.24%)

39 existing lines in 6 files now uncovered.

91295 of 103362 relevant lines covered (88.33%)

482189.4 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
84.44
0.01% crates/circuit/src/dag_circuit.rs
215
69.63
-7.63% crates/circuit/src/vf2.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
84.44
0.01% crates/circuit/src/dag_circuit.rs
1
82.79
0.0% crates/circuit/src/parameter/parameter_expression.rs
6
72.86
-0.25% crates/circuit/src/parameter/symbol_expr.rs
7
92.27
-0.26% crates/qasm2/src/lex.rs
12
69.63
-7.63% crates/circuit/src/vf2.rs
12
97.09
-0.47% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 17434232678.1 03 Sep 2025 01:39PM UTC 864
88.33
GitHub Action Run
Source Files on build 17434232678
  • Tree
  • List 864
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17434232678
  • 62dd854b on github
  • Prev Build on gh-readonly-queue/main/pr-14872-60c9b716ca68ad8388bf2ecb8e4bb4209f8dd20c (#17432553195)
  • Next Build on main (#17437774369)
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