Skip to content

Commit

Permalink
Avoid all to all connectivity in fake backend tests
Browse files Browse the repository at this point in the history
The aer noise model construction was an artifact of using all to all
connectivity in the test. Using a more sparse connectivity alleviates
the performance issues. This commit switches to use a ring graph and
restores the larger qubit count backends.
  • Loading branch information
mtreinish committed Feb 1, 2024
1 parent f158512 commit 24343f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/python/providers/test_fake_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@
BreakLoopOp,
SwitchCaseOp,
)
from qiskit.transpiler.coupling import CouplingMap
from test.utils.base import QiskitTestCase # pylint: disable=wrong-import-order

BACKENDS = [Fake5QV1(), Fake20QV1(), Fake7QPulseV1(), Fake27QPulseV1(), Fake127QPulseV1()]

BACKENDS_V2 = []
# NOTE: Do not go any larger to avoid noise model construction performance issues
for n in [5, 7]:
BACKENDS_V2.append(GenericBackendV2(num_qubits=n))
for n in [5, 7, 16, 20, 27, 65, 127]:
cmap = CouplingMap.from_ring(n)
BACKENDS_V2.append(GenericBackendV2(num_qubits=n, coupling_map=cmap))


@ddt
Expand Down

0 comments on commit 24343f9

Please sign in to comment.