qiskit/test/python/compiler
Jake Lishman bfa4ceba0c
Fix tests that assume a trivial layout from compilation (#14192)
These tests all have a built-in assumption that if the trivial layout
produces a routed circuit, it will automatically be used at optimisation
levels 2 and 3.  This is not formally the case; only optimization levels
0 and 1 set that by default.

An implementation detail of the current VF2Layout pass causes it to
short-circuit out on the first possible solution without scoring, if the
number of virtual qubits matches the number of physical qubits.  This
allowed these tests to pass without any flakiness, even though some of
them used unseeded randomness in `GenericBackendV2`.  This
short-circuiting in VF2Layout is based on a false premise that all
"complete" isomorphic layouts must have the same score, but this is not
actually correct, and follow-on modifications to the VF2 pass might
change this.
2025-04-07 23:09:20 +00:00
..
__init__.py Remove coding: utf-8 per PEP 3120 (#4914) 2020-08-12 08:29:16 -04:00
test_compiler.py Update transpiler pipeline to (only) use target internally (#12850) 2025-03-06 16:25:55 +00:00
test_transpiler.py Fix tests that assume a trivial layout from compilation (#14192) 2025-04-07 23:09:20 +00:00