-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
* Add fake backends for newer IBM backends This commit adds news fake backend classes for the following newer IBM backends: Algiers, Brisbane, Cusco, Kawasaki, Kyoto, Osaka, Peekskill, Quebec, and Torino. This was done using a modified version of the qiskit script to update backends [1] (to use qiskit-ibm-runtime instead of qiskit-ibmq-provider). There is a standalone script adding this functionality for this repo in #1263. [1] https://github.com/Qiskit/qiskit/blob/stable/0.46/tools/update_fake_backends.py Fixes #1421 * Remove unused import * Add new backends to FakeProviderForBackendV2 too * Don't forget FakeKyiv in docs or provider class --------- Co-authored-by: Kevin Tian <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2019, 2023. | ||
# | ||
# 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. | ||
|
||
"""Mock algiers backend""" | ||
|
||
from .fake_algiers import FakeAlgiers |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2021, 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Algiers device (27 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeAlgiers(fake_backend.FakeBackendV2): | ||
"""A fake 27 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_algiers.json" # type: ignore | ||
props_filename = "props_algiers.json" # type: ignore | ||
defs_filename = "defs_algiers.json" # type: ignore | ||
backend_name = "fake_algiers" # type: ignore |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Brisbane backend (127 qubit). | ||
""" | ||
|
||
from .fake_brisbane import FakeBrisbane |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Brisbane device (127 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeBrisbane(fake_backend.FakeBackendV2): | ||
"""A fake 127 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_brisbane.json" # type: ignore | ||
props_filename = "props_brisbane.json" # type: ignore | ||
defs_filename = "defs_brisbane.json" # type: ignore | ||
backend_name = "fake_brisbane" # type: ignore |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Cusco backend (127 qubit). | ||
""" | ||
|
||
from .fake_cusco import FakeCusco |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Cusco device (127 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeCusco(fake_backend.FakeBackendV2): | ||
"""A fake 127 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_cusco.json" # type: ignore | ||
props_filename = "props_cusco.json" # type: ignore | ||
defs_filename = "defs_cusco.json" # type: ignore | ||
backend_name = "fake_cusco" # type: ignore |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kawasaki backend (127 qubit). | ||
""" | ||
|
||
from .fake_kawasaki import FakeKawasaki |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kawasaki device (127 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeKawasaki(fake_backend.FakeBackendV2): | ||
"""A fake 127 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_kawasaki.json" # type: ignore | ||
props_filename = "props_kawasaki.json" # type: ignore | ||
defs_filename = "defs_kawasaki.json" # type: ignore | ||
backend_name = "fake_kawasaki" # type: ignore |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kyiv backend (127 qubit). | ||
""" | ||
|
||
from .fake_kyiv import FakeKyiv |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kyiv device (127 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeKyiv(fake_backend.FakeBackendV2): | ||
"""A fake 127 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_kyiv.json" # type: ignore | ||
props_filename = "props_kyiv.json" # type: ignore | ||
defs_filename = "defs_kyiv.json" # type: ignore | ||
backend_name = "fake_kyiv" # type: ignore |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kyoto backend (127 qubit). | ||
""" | ||
|
||
from .fake_kyoto import FakeKyoto |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2023. | ||
# | ||
# 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. | ||
|
||
""" | ||
Fake Kyoto device (127 qubit). | ||
""" | ||
|
||
import os | ||
from qiskit_ibm_runtime.fake_provider import fake_backend | ||
|
||
|
||
class FakeKyoto(fake_backend.FakeBackendV2): | ||
"""A fake 127 qubit backend.""" | ||
|
||
dirname = os.path.dirname(__file__) # type: ignore | ||
conf_filename = "conf_kyoto.json" # type: ignore | ||
props_filename = "props_kyoto.json" # type: ignore | ||
defs_filename = "defs_kyoto.json" # type: ignore | ||
backend_name = "fake_kyoto" # type: ignore |
Large diffs are not rendered by default.