Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BackendV2 mocked backend #7643

Merged
merged 109 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
66ecf25
Add backend converter script from Matthew
HuangJunye Feb 9, 2022
9a9ef3e
FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress
HuangJunye Feb 9, 2022
61069f1
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Feb 9, 2022
6046706
Temporary fix for circular import
HuangJunye Feb 10, 2022
667d039
First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/Fa…
HuangJunye Feb 10, 2022
c04bf29
Implement FakeQasmBackend methods into FakeBackendV2
HuangJunye Feb 14, 2022
fa7ebd9
Implement FakePulseBackend methods into FakeBackendV2
HuangJunye Feb 14, 2022
619e5de
Import missing PulseDefaults and adjust _get_conf_from_json method po…
HuangJunye Feb 14, 2022
df20b0f
Adjust _get_config_from_dict method position
HuangJunye Feb 14, 2022
9480d76
Fix target property
HuangJunye Feb 14, 2022
b1c422e
Fix _default_options method
HuangJunye Feb 14, 2022
d75e3c0
Add FakeProviderV2 for V2 fake backends
HuangJunye Feb 14, 2022
d48bf0a
Remove FakeQasmBackendV2 class
HuangJunye Feb 15, 2022
77dd9e2
Copy run method from FakeBackendV1
HuangJunye Feb 15, 2022
806cdd3
change configuration to self._configuration
HuangJunye Feb 17, 2022
2438935
Update backend_converter.py
HuangJunye Feb 18, 2022
eec4a49
@rathishcholarajan Use BackendConfiguration, BackendProperties and P…
HuangJunye Feb 18, 2022
12ed0a4
Add dtm
HuangJunye Feb 18, 2022
842a18a
Add qubit properties
HuangJunye Feb 18, 2022
1b73006
Add drive, measure and acquire channels.
HuangJunye Feb 22, 2022
f75c24e
Fix test_fake_backends
HuangJunye Feb 22, 2022
ccc5a9f
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Feb 22, 2022
ba29e4e
Fix ConfigurableFakeBackend circular import problem
HuangJunye Feb 22, 2022
7fddb5e
Fix configurable_backend circular import problem
HuangJunye Feb 22, 2022
774caf9
FakeAlmadenV2
HuangJunye Feb 23, 2022
896b93a
FakeArmonkV2
HuangJunye Feb 23, 2022
fbf9007
FakeAthensV2
HuangJunye Feb 23, 2022
8cef341
FakeBelemV2
HuangJunye Feb 23, 2022
fafe038
FakeBoeblingenV2
HuangJunye Feb 23, 2022
19bf018
Add fake backends (except rueschlikon, tenerife and tokyo)
HuangJunye Feb 24, 2022
b5aa3a0
import fake v2 backends in __init__.py
HuangJunye Feb 24, 2022
18d2074
add fake backends to mock.backend.__init__ and fake provider
HuangJunye Feb 24, 2022
62aeb08
Fix typos
HuangJunye Feb 24, 2022
0d781e5
Add defs files to manila, poughkeepsie, rome and santiago
HuangJunye Feb 24, 2022
a02abb9
Fix FakeCambridgeV2
HuangJunye Feb 24, 2022
ccf6a55
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Feb 24, 2022
ac3c237
Add Hanoi and Kolkata to FakeProviderV2
HuangJunye Feb 28, 2022
59ceb3e
Handle no pulse backends in V2
HuangJunye Feb 28, 2022
fd31f13
Fix getting qubit properties from properties bug
HuangJunye Mar 1, 2022
4a35e5d
Fix _parse_inst_map for BackendV2 with no pulse support
HuangJunye Mar 2, 2022
61609e6
Revert "Update backend_converter.py"
HuangJunye Mar 3, 2022
3a2421a
Revert " @rathishcholarajan Use BackendConfiguration, BackendProperti…
HuangJunye Mar 3, 2022
a5d4462
Use dicts instead of conf, props, defs objects
HuangJunye Mar 3, 2022
023b459
remove channels
HuangJunye Mar 3, 2022
8571e84
add type hints
HuangJunye Mar 3, 2022
54cead1
Use dict.get instead of brackets
HuangJunye Mar 3, 2022
a814fa7
clean up backend_converter.py
HuangJunye Mar 3, 2022
72df114
construct target using defs files if it exist
HuangJunye Mar 3, 2022
fcedd6b
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 4, 2022
f01e8db
Fix typo in target.acquire_alignment
HuangJunye Mar 4, 2022
fa4f142
Handle BackendV2 in transpiler._parse_inst_map
HuangJunye Mar 4, 2022
2127b34
Comment out backends in fake provider and Aer run method for testing
HuangJunye Mar 4, 2022
e80abda
undo typo fix for target.acquire_alignment
HuangJunye Mar 7, 2022
6e7875f
Revert "Comment out backends in fake provider and Aer run method for …
HuangJunye Mar 7, 2022
2fe67a2
Copy NoiseModel.from_backend() method from Aer
HuangJunye Mar 7, 2022
a29d58e
modify NoiseModel.from_backend method to support V2 backend
HuangJunye Mar 7, 2022
8927092
Build V2 backend noise model from self._props_dict
HuangJunye Mar 7, 2022
308d22a
black reformatting
HuangJunye Mar 8, 2022
58c69dd
Move V2 backend code to above V1 and Legacy
HuangJunye Mar 8, 2022
a5585ff
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 8, 2022
9ed2016
Clean up FakeBackendV2 for testing
HuangJunye Mar 8, 2022
754d12b
Merge branch 'add-v2-mocked-backend-7391' of https://github.com/Huang…
HuangJunye Mar 8, 2022
33a53a6
Order FakeBackendV2 to match BackendV2
HuangJunye Mar 8, 2022
b4107c7
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 10, 2022
ab22b2b
Merge branch 'add-v2-mocked-backend-7391' of https://github.com/Huang…
HuangJunye Mar 10, 2022
474e529
Uncomment out fake backends from fake provider v1 and fake legacy pro…
HuangJunye Mar 10, 2022
8bab11e
Remove unused imports
HuangJunye Mar 11, 2022
0d1ddcd
Remove FakeTokyoV2 import
HuangJunye Mar 11, 2022
2d45c2b
Remove warnings for missing conf, props and defs files
HuangJunye Mar 11, 2022
a11f462
Remove lazy loading of target
HuangJunye Mar 11, 2022
9c68b8a
Remove lazy loading of qubit properties
HuangJunye Mar 11, 2022
b4747fa
Remove deprecation warning for standard_gates option in noise model
HuangJunye Mar 11, 2022
21e567e
linting for fake_backend.py
HuangJunye Mar 11, 2022
f077a6a
linting for backend_converter.py
HuangJunye Mar 11, 2022
735c6d3
fix `Redefining name 'warnings' from outer scope` error
HuangJunye Mar 14, 2022
90036fb
lint: rename qubit_props_dict_from_props_dict
HuangJunye Mar 14, 2022
29a7386
Raise error for pulse simulation
HuangJunye Mar 14, 2022
6047a5d
remove warnings flag
HuangJunye Mar 15, 2022
6cdaecd
Move V2 to in front of V1
HuangJunye Mar 15, 2022
87fb07b
revert changes in transpiler._parse_inst_map
HuangJunye Mar 15, 2022
3a04830
remove warnings flag
HuangJunye Mar 15, 2022
9d23877
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 15, 2022
7d027c8
fix 'no-else-raise' error
HuangJunye Mar 16, 2022
8551086
Add docstring to FakeBackendV2
HuangJunye Mar 16, 2022
48ca29f
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 16, 2022
50c12ac
rename `kwargs` to `options` in .run method
HuangJunye Mar 16, 2022
be27c4d
Update qiskit/test/mock/fake_backend.py
HuangJunye Mar 17, 2022
a418755
Update qiskit/test/mock/fake_backend.py
HuangJunye Mar 17, 2022
a749dda
Update qiskit/test/mock/fake_backend.py
HuangJunye Mar 17, 2022
68fef20
rearrange raising error for pulse job
HuangJunye Mar 17, 2022
164c889
Merge branch 'add-v2-mocked-backend-7391' of https://github.com/Huang…
HuangJunye Mar 17, 2022
bbf53f2
Add a TODO comment for removing PulseDefaults
HuangJunye Mar 17, 2022
965452f
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 17, 2022
764bb05
fix typo
HuangJunye Mar 17, 2022
dcb8a55
black reformat
HuangJunye Mar 17, 2022
67abfcc
Add release note.
HuangJunye Mar 17, 2022
90c8520
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 21, 2022
ce51f51
Fix no else raise error
HuangJunye Mar 29, 2022
caab6ea
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 29, 2022
8f4cb20
Add blank new line in release note
HuangJunye Mar 29, 2022
4838fbe
black formatting
HuangJunye Mar 29, 2022
40e6aa0
fix release note missing black tick
HuangJunye Mar 29, 2022
7800472
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 30, 2022
b5d6144
Rename FakeProviderV2 to FakeProviderForBackendV2
HuangJunye Mar 30, 2022
62402c3
Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider
HuangJunye Mar 30, 2022
088c128
Merge branch 'main' into add-v2-mocked-backend-7391
HuangJunye Mar 30, 2022
ed0417a
black reformatting
HuangJunye Mar 30, 2022
032c530
Merge branch 'add-v2-mocked-backend-7391' of https://github.com/Huang…
HuangJunye Mar 30, 2022
f94452d
Merge branch 'main' into add-v2-mocked-backend-7391
mergify[bot] Mar 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion qiskit/providers/fake_provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
The mock devices are mainly for testing the compiler.
"""

from qiskit.test.mock.fake_provider import FakeProvider, FakeLegacyProvider
from qiskit.test.mock.fake_provider import (
FakeProviderForBackendV2,
FakeProvider,
FakeLegacyProvider,
)
from qiskit.test.mock.fake_provider import FakeProviderFactory
from qiskit.test.mock.fake_backend import FakeBackend, FakeLegacyBackend
from qiskit.test.mock.fake_pulse_backend import FakePulseBackend, FakePulseLegacyBackend
Expand Down
2 changes: 1 addition & 1 deletion qiskit/test/mock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
The mock devices are mainly for testing the compiler.
"""

from .fake_provider import FakeProvider, FakeLegacyProvider
from .fake_provider import FakeProviderForBackendV2, FakeProvider, FakeLegacyProvider
from .fake_provider import FakeProviderFactory
from .fake_backend import FakeBackend, FakeLegacyBackend
from .fake_backend_v2 import FakeBackendV2, FakeBackend5QV2
Expand Down
42 changes: 42 additions & 0 deletions qiskit/test/mock/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@
Mocked versions of real quantum backends.
"""

# BackendV2 Backends
from .almaden import FakeAlmadenV2
from .armonk import FakeArmonkV2
from .athens import FakeAthensV2
from .belem import FakeBelemV2
from .boeblingen import FakeBoeblingenV2
from .bogota import FakeBogotaV2
from .brooklyn import FakeBrooklynV2
from .burlington import FakeBurlingtonV2
from .cairo import FakeCairoV2
from .cambridge import FakeCambridgeV2
from .casablanca import FakeCasablancaV2
from .essex import FakeEssexV2
from .guadalupe import FakeGuadalupeV2
from .hanoi import FakeHanoiV2
from .jakarta import FakeJakartaV2
from .johannesburg import FakeJohannesburgV2
from .kolkata import FakeKolkataV2
from .lagos import FakeLagosV2
from .lima import FakeLimaV2
from .london import FakeLondonV2
from .manhattan import FakeManhattanV2
from .manila import FakeManilaV2
from .melbourne import FakeMelbourneV2
from .montreal import FakeMontrealV2
from .mumbai import FakeMumbaiV2
mtreinish marked this conversation as resolved.
Show resolved Hide resolved
from .nairobi import FakeNairobiV2
from .ourense import FakeOurenseV2
from .paris import FakeParisV2
from .poughkeepsie import FakePoughkeepsieV2
from .quito import FakeQuitoV2
from .rochester import FakeRochesterV2
from .rome import FakeRomeV2
from .santiago import FakeSantiagoV2
from .singapore import FakeSingaporeV2
from .sydney import FakeSydneyV2
from .toronto import FakeTorontoV2
from .valencia import FakeValenciaV2
from .vigo import FakeVigoV2
from .washington import FakeWashingtonV2
from .yorktown import FakeYorktownV2

# BackendV1 Backends
from .almaden import FakeAlmaden
from .armonk import FakeArmonk
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/almaden/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock almaden backend"""

from .fake_almaden import FakeAlmadenV2
from .fake_almaden import FakeAlmaden
from .fake_almaden import FakeLegacyAlmaden
21 changes: 20 additions & 1 deletion qiskit/test/mock/backends/almaden/fake_almaden.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,26 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeAlmadenV2(fake_backend.FakeBackendV2):
"""A fake Almaden V2 backend.

00 ↔ 01 ↔ 02 ↔ 03 ↔ 04
↕ ↕
05 ↔ 06 ↔ 07 ↔ 08 ↔ 09
↕ ↕ ↕
10 ↔ 11 ↔ 12 ↔ 13 ↔ 14
↕ ↕
15 ↔ 16 ↔ 17 ↔ 18 ↔ 19
"""

dirname = os.path.dirname(__file__)
conf_filename = "conf_almaden.json"
props_filename = "props_almaden.json"
defs_filename = "defs_almaden.json"
backend_name = "fake_almaden_v2"


class FakeAlmaden(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/armonk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock armonk backend"""

from .fake_armonk import FakeArmonkV2
from .fake_armonk import FakeArmonk
from .fake_armonk import FakeLegacyArmonk
15 changes: 14 additions & 1 deletion qiskit/test/mock/backends/armonk/fake_armonk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeArmonkV2(fake_backend.FakeBackendV2):
"""A fake 1 qubit backend.

0
"""

dirname = os.path.dirname(__file__)
conf_filename = "conf_armonk.json"
props_filename = "props_armonk.json"
defs_filename = "defs_armonk.json"
backend_name = "fake_armonk_v2"


class FakeArmonk(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/athens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock athens backend"""

from .fake_athens import FakeAthensV2
from .fake_athens import FakeAthens
from .fake_athens import FakeLegacyAthens
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/athens/fake_athens.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeAthensV2(fake_backend.FakeBackendV2):
"""A fake 5 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_athens.json"
props_filename = "props_athens.json"
defs_filename = "defs_athens.json"
backend_name = "fake_athens_v2"


class FakeAthens(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/belem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock belem backend"""

from .fake_belem import FakeBelemV2
from .fake_belem import FakeBelem
from .fake_belem import FakeLegacyBelem
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/belem/fake_belem.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeBelemV2(fake_backend.FakeBackendV2):
"""A fake 5 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_belem.json"
props_filename = "props_belem.json"
defs_filename = "defs_belem.json"
backend_name = "fake_belem_v2"


class FakeBelem(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/boeblingen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock boeblingen backend"""

from .fake_boeblingen import FakeBoeblingenV2
from .fake_boeblingen import FakeBoeblingen
from .fake_boeblingen import FakeLegacyBoeblingen
21 changes: 20 additions & 1 deletion qiskit/test/mock/backends/boeblingen/fake_boeblingen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,26 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeBoeblingenV2(fake_backend.FakeBackendV2):
"""A fake Boeblingen V2 backend.

00 ↔ 01 ↔ 02 ↔ 03 ↔ 04
↕ ↕
05 ↔ 06 ↔ 07 ↔ 08 ↔ 09
↕ ↕ ↕
10 ↔ 11 ↔ 12 ↔ 13 ↔ 14
↕ ↕
15 ↔ 16 ↔ 17 ↔ 18 ↔ 19
"""

dirname = os.path.dirname(__file__)
conf_filename = "conf_boeblingen.json"
props_filename = "props_boeblingen.json"
defs_filename = "defs_boeblingen.json"
backend_name = "fake_boeblingen_v2"


class FakeBoeblingen(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/bogota/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock bogota backend"""

from .fake_bogota import FakeBogotaV2
from .fake_bogota import FakeBogota
from .fake_bogota import FakeLegacyBogota
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/bogota/fake_bogota.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeBogotaV2(fake_backend.FakeBackendV2):
"""A fake 5 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_bogota.json"
props_filename = "props_bogota.json"
defs_filename = "defs_bogota.json"
backend_name = "fake_bogota_v2"


class FakeBogota(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/brooklyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

"""Mock brooklyn backend"""

from .fake_brooklyn import FakeBrooklynV2
from .fake_brooklyn import FakeBrooklyn
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/brooklyn/fake_brooklyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeBrooklynV2(fake_backend.FakeBackendV2):
"""A fake Brooklyn V2 backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_brooklyn.json"
props_filename = "props_brooklyn.json"
defs_filename = "defs_brooklyn.json"
backend_name = "fake_brooklyn_v2"


class FakeBrooklyn(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/burlington/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock burlington backend"""

from .fake_burlington import FakeBurlingtonV2
from .fake_burlington import FakeBurlington
from .fake_burlington import FakeLegacyBurlington
16 changes: 15 additions & 1 deletion qiskit/test/mock/backends/burlington/fake_burlington.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@
"""

import os
from qiskit.test.mock import fake_qasm_backend
from qiskit.test.mock import fake_qasm_backend, fake_backend


class FakeBurlingtonV2(fake_backend.FakeBackendV2):
"""A fake 5 qubit backend.

0 ↔ 1 ↔ 3 ↔ 4
2
"""

dirname = os.path.dirname(__file__)
conf_filename = "conf_burlington.json"
props_filename = "props_burlington.json"
backend_name = "fake_burlington_v2"


class FakeBurlington(fake_qasm_backend.FakeQasmBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/cairo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

"""Mock cairo backend"""

from .fake_cairo import FakeCairoV2
from .fake_cairo import FakeCairo
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/cairo/fake_cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeCairoV2(fake_backend.FakeBackendV2):
"""A fake 27 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_cairo.json"
props_filename = "props_cairo.json"
defs_filename = "defs_cairo.json"
backend_name = "fake_cairo_v2"


class FakeCairo(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/cambridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

"""Mock cambridge backend"""

from .fake_cambridge import FakeCambridgeV2
from .fake_cambridge import FakeCambridge
from .fake_cambridge import FakeCambridgeAlternativeBasis
from .fake_cambridge import FakeLegacyCambridge
Expand Down
22 changes: 21 additions & 1 deletion qiskit/test/mock/backends/cambridge/fake_cambridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,27 @@
"""

import os
from qiskit.test.mock import fake_qasm_backend
from qiskit.test.mock import fake_qasm_backend, fake_backend


class FakeCambridgeV2(fake_backend.FakeBackendV2):
"""A fake Cambridge backend.

00 ↔ 01 ↔ 02 ↔ 03 ↔ 04
↕ ↕
05 06
↕ ↕
07 ↔ 08 ↔ 09 ↔ 10 ↔ 11 ↔ 12 ↔ 13 ↔ 14 ↔ 15
↕ ↕ ↕
16 17 18
↕ ↕ ↕
19 ↔ 20 ↔ 21 ↔ 22 ↔ 23 ↔ 24 ↔ 25 ↔ 26 ↔ 27
"""

dirname = os.path.dirname(__file__)
conf_filename = "conf_cambridge.json"
props_filename = "props_cambridge.json"
backend_name = "fake_cambridge_v2"


class FakeCambridge(fake_qasm_backend.FakeQasmBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/casablanca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock casablanca backend"""

from .fake_casablanca import FakeCasablancaV2
from .fake_casablanca import FakeCasablanca
from .fake_casablanca import FakeLegacyCasablanca
12 changes: 11 additions & 1 deletion qiskit/test/mock/backends/casablanca/fake_casablanca.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"""

import os
from qiskit.test.mock import fake_pulse_backend
from qiskit.test.mock import fake_pulse_backend, fake_backend


class FakeCasablancaV2(fake_backend.FakeBackendV2):
"""A fake 7 qubit backend."""

dirname = os.path.dirname(__file__)
conf_filename = "conf_casablanca.json"
props_filename = "props_casablanca.json"
defs_filename = "defs_casablanca.json"
backend_name = "fake_casablanca_v2"


class FakeCasablanca(fake_pulse_backend.FakePulseBackend):
Expand Down
1 change: 1 addition & 0 deletions qiskit/test/mock/backends/essex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

"""Mock essex backend"""

from .fake_essex import FakeEssexV2
from .fake_essex import FakeEssex
from .fake_essex import FakeLegacyEssex
Loading