Ran
|
Jobs
1
|
Files
1260
|
Run time
22s
|
Badge
Embed ▾
README BADGES
|
push
github
Assert properties not specifics of `DenseLayout` results (backport #10901) (#10907) * Assert properties not specifics of `DenseLayout` results (#10901) `DenseLayout` is a deterministic pass, so there's no risk of RNG manipulations changing the output. Internally, however, the use of the sparse-matrix bandwidth-reduction algorithm in Scipy's `reverse_cuthill_mckee` uses `numpy.argsort` internally with the unstable default sorting algorithm, which means the output _can_ be dependent on the way that sort is implemented. The arrays that are sorted are directly related to the input coupling map, and are likely to include degeneracies, which pose problems when the implementation of the unstable sort changes. This was the case moving from Numpy 1.24 to Numpy 1.25. This commit instead changes the tests from asserting that a precise layout was returned to asserting that the returned layout contains only a connected subgraph of qubits. The "most" connected component that `DenseLayout` finds must be _at least_ connected, though this assertion is not quite as strong as finding the _densest_. The extra test accounts for this weakening. (cherry picked from commit 0f66cdfd3) * Avoid use of un-backported kwarg * Update test/python/transpiler/test_dense_layout.py --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
74147 of 84973 relevant lines covered (87.26%)
61224.56 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
93.76 |
-0.24% | crates/qasm2/src/expr.rs |
4 |
91.67 |
0.25% | crates/qasm2/src/lex.rs |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 6356445754.1 | 1260 |
87.26 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|