-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update remaining unit tests to use
FakeGeneric
(#10918)
* Update V2 tests to use FakeGeneric or GenericTarget * Add missing tests and fixes Fix backend estimator test Fix lint, backend estimator test Include missing tests * Fix calibrations and adjust tests Initial fix Fix calibrations Fix remaining tests * Fix remaining tests * Add test_backend_v2 test * Add Aer check to sparse_pauli_op test * Fix noise defaults * Fix value * Fix lint * Delete spurious files * Update class names, fix conflicts post-merge. * Extract coupling maps, improve style * Fix passmanager test * More test fixes * New attempt at fixing tests * Please, mr. backend_estimator test, give me a break and reproduce my local results. * Trying again * Apply suggestions from Kevin's code review Co-authored-by: Kevin Hartman <[email protected]> * Move cmaps to new file, fix black * Fix tests * Replace FakeBackendSimple with BasicSimulator * Fix passmanager config test * Fix seed for vf2 layout tests --------- Co-authored-by: Kevin Hartman <[email protected]>
- Loading branch information
1 parent
0364786
commit d9b90de
Showing
25 changed files
with
719 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2024. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
"""Coupling maps for fake backend generation and transpiler testing.""" | ||
|
||
# 5 qubits | ||
# bidirectional | ||
BOGOTA_CMAP = [[0, 1], [1, 0], [1, 2], [2, 1], [2, 3], [3, 2], [3, 4], [4, 3]] | ||
LIMA_CMAP = [[0, 1], [1, 0], [1, 2], [1, 3], [2, 1], [3, 1], [3, 4], [4, 3]] | ||
YORKTOWN_CMAP = [ | ||
[0, 1], | ||
[0, 2], | ||
[1, 0], | ||
[1, 2], | ||
[2, 0], | ||
[2, 1], | ||
[2, 3], | ||
[2, 4], | ||
[3, 2], | ||
[3, 4], | ||
[4, 2], | ||
[4, 3], | ||
] | ||
# directional | ||
TENERIFE_CMAP = [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4], [4, 2]] | ||
|
||
# 16 qubits | ||
RUESCHLIKON_CMAP = [ | ||
[1, 0], | ||
[1, 2], | ||
[2, 3], | ||
[3, 4], | ||
[3, 14], | ||
[5, 4], | ||
[6, 5], | ||
[6, 7], | ||
[6, 11], | ||
[7, 10], | ||
[8, 7], | ||
[9, 8], | ||
[9, 10], | ||
[11, 10], | ||
[12, 5], | ||
[12, 11], | ||
[12, 13], | ||
[13, 4], | ||
[13, 14], | ||
[15, 0], | ||
[15, 2], | ||
[15, 14], | ||
] | ||
|
||
# 20 qubits | ||
TOKYO_CMAP = [ | ||
[0, 1], | ||
[0, 5], | ||
[1, 0], | ||
[1, 2], | ||
[1, 6], | ||
[1, 7], | ||
[2, 1], | ||
[2, 6], | ||
[3, 8], | ||
[4, 8], | ||
[4, 9], | ||
[5, 0], | ||
[5, 6], | ||
[5, 10], | ||
[5, 11], | ||
[6, 1], | ||
[6, 2], | ||
[6, 5], | ||
[6, 7], | ||
[6, 10], | ||
[6, 11], | ||
[7, 1], | ||
[7, 6], | ||
[7, 8], | ||
[7, 12], | ||
[8, 3], | ||
[8, 4], | ||
[8, 7], | ||
[8, 9], | ||
[8, 12], | ||
[8, 13], | ||
[9, 4], | ||
[9, 8], | ||
[10, 5], | ||
[10, 6], | ||
[10, 11], | ||
[10, 15], | ||
[11, 5], | ||
[11, 6], | ||
[11, 10], | ||
[11, 12], | ||
[11, 16], | ||
[11, 17], | ||
[12, 7], | ||
[12, 8], | ||
[12, 11], | ||
[12, 13], | ||
[12, 16], | ||
[13, 8], | ||
[13, 12], | ||
[13, 14], | ||
[13, 18], | ||
[13, 19], | ||
[14, 13], | ||
[14, 18], | ||
[14, 19], | ||
[15, 10], | ||
[15, 16], | ||
[16, 11], | ||
[16, 12], | ||
[16, 15], | ||
[16, 17], | ||
[17, 11], | ||
[17, 16], | ||
[17, 18], | ||
[18, 13], | ||
[18, 14], | ||
[18, 17], | ||
[19, 13], | ||
[19, 14], | ||
] | ||
|
||
# 27 qubits | ||
MUMBAI_CMAP = [ | ||
[0, 1], | ||
[1, 0], | ||
[1, 2], | ||
[1, 4], | ||
[2, 1], | ||
[2, 3], | ||
[3, 2], | ||
[3, 5], | ||
[4, 1], | ||
[4, 7], | ||
[5, 3], | ||
[5, 8], | ||
[6, 7], | ||
[7, 4], | ||
[7, 6], | ||
[7, 10], | ||
[8, 5], | ||
[8, 9], | ||
[8, 11], | ||
[9, 8], | ||
[10, 7], | ||
[10, 12], | ||
[11, 8], | ||
[11, 14], | ||
[12, 10], | ||
[12, 13], | ||
[12, 15], | ||
[13, 12], | ||
[13, 14], | ||
[14, 11], | ||
[14, 13], | ||
[14, 16], | ||
[15, 12], | ||
[15, 18], | ||
[16, 14], | ||
[16, 19], | ||
[17, 18], | ||
[18, 15], | ||
[18, 17], | ||
[18, 21], | ||
[19, 16], | ||
[19, 20], | ||
[19, 22], | ||
[20, 19], | ||
[21, 18], | ||
[21, 23], | ||
[22, 19], | ||
[22, 25], | ||
[23, 21], | ||
[23, 24], | ||
[24, 23], | ||
[24, 25], | ||
[25, 22], | ||
[25, 24], | ||
[25, 26], | ||
[26, 25], | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.