Ran
|
Files
1260
|
Run time
14s
|
Badge
Embed ▾
README BADGES
|
push
github
Fix final_layout when VF2PostLayout finds a better layout (#10466) (#10493) * Fix final_layout when VF2PostLayout finds a better layout This commit fixes a bug in the preset pass managers when VF2PostLayout is run and finds a better layout to use. In these cases the ApplyLayout was updating the layout but we never updated the final layout to reflect these changes. This would result in an incorrect final layout because the input positions of the qubits were incorrect after re-applying the layout. This commit fixes this by adding code to ApplyLayout to also update final_layout, if one is set, to reflect the new initial layout found by VF2PostLayout. Fixes #10457 * Remove stray debug print * Use a list instead of a dict * Add assertion on vf2postlayout being used in compiler.transpile tests * Actually assert a post layout is set (cherry picked from commit 42a0ee84d) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
72909 of 84849 relevant lines covered (85.93%)
60044.84 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|