Skip to content

Commit

Permalink
Remove provider-specific fake backends, fake provider and related tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Dec 6, 2023
1 parent 920fa57 commit 78cb3f3
Show file tree
Hide file tree
Showing 237 changed files with 697 additions and 3,992 deletions.
185 changes: 24 additions & 161 deletions qiskit/providers/fake_provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
Overview
========
The fake provider module contains fake providers and fake backends classes. The fake backends are
built to mimic the behaviors of IBM Quantum systems using system snapshots. The system snapshots
contain important information about the quantum system such as coupling map, basis gates, qubit
properties (T1, T2, error rate, etc.) which are useful for testing the transpiler and performing
noisy simulation of the system.
The fake provider module in Qiskit contains fake backend classes for testing
the transpiler and other backend-facing functionalities.
Example Usage
=============
Expand All @@ -35,13 +32,12 @@
:include-source:
from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeManilaV2
from qiskit.providers.fake_provider import FakeGeneric
from qiskit import transpile
from qiskit.tools.visualization import plot_histogram
# Get a fake backend from the fake provider
backend = FakeManilaV2()
backend = FakeGeneric(num_qubits=5, basis_gates=['x', 'sx', 'cx', 'id', 'rz']
# Create a simple circuit
circuit = QuantumCircuit(3)
Expand All @@ -60,175 +56,48 @@
counts = job.result().get_counts()
plot_histogram(counts)
.. important::
Please note that the simulation is done using a noise model generated from system snapshots
obtained in the past (sometimes a few years ago) and the results are not representative of the
latest behaviours of the real quantum system which the fake backend is mimicking. If you want to
run noisy simulations to compare with the real quantum system, please follow steps below to
generate a simulator mimics a real quantum system with the latest calibration results.
.. code-block:: python
from qiskit.providers.ibmq import IBMQ
from qiskit.providers.aer import AerSimulator
# get a real backend from a real provider
provider = IBMQ.load_account()
backend = provider.get_backend('ibmq_manila')
# generate a simulator that mimics the real quantum system with the latest calibration results
backend_sim = AerSimulator.from_backend(backend)
Fake Providers
==============
Fake providers provide access to a list of fake backends.
.. autosummary::
:toctree: ../stubs/
FakeProviderForBackendV2
FakeProvider
Fake Backends
=============
Fake V2 Backends
----------------
Fake V2 backends are fake backends with IBM Quantum systems snapshots implemented with
:mod:`~qiskit.providers.backend.BackendV2` interface. They are all subclasses of
:class:`FakeBackendV2`.
================
.. autosummary::
:toctree: ../stubs/
FakeAlmadenV2
FakeArmonkV2
FakeAthensV2
FakeAuckland
FakeBelemV2
FakeBoeblingenV2
FakeBogotaV2
FakeBrooklynV2
FakeBurlingtonV2
FakeCairoV2
FakeCambridgeV2
FakeCasablancaV2
FakeEssexV2
FakeGeneva
FakeGuadalupeV2
FakeHanoiV2
FakeJakartaV2
FakeJohannesburgV2
FakeKolkataV2
FakeLagosV2
FakeLimaV2
FakeLondonV2
FakeManhattanV2
FakeManilaV2
FakeMelbourneV2
FakeMontrealV2
FakeMumbaiV2
FakeNairobiV2
FakeOslo
FakeOurenseV2
FakeParisV2
FakePerth
FakePrague
FakePoughkeepsieV2
FakeQuitoV2
FakeRochesterV2
FakeRomeV2
.. FakeRueschlikonV2 # no v2 version
FakeSantiagoV2
FakeSherbrooke
FakeSingaporeV2
FakeSydneyV2
.. FakeTenerifeV2 # no v2 version
.. FakeTokyoV2 # no v2 version
FakeTorontoV2
FakeValenciaV2
FakeVigoV2
FakeWashingtonV2
FakeYorktownV2
Fake V1 Backends
----------------
FakeBackendV2
FakeBackend5QV2
FakeMumbaiFractionalCX
ConfigurableFakeBackend
FakeGeneric
Fake V1 backends are fake backends with IBM Quantum systems snapshots implemented with
:mod:`~qiskit.providers.backend.BackendV1` interface.
Fake Target
============
.. autosummary::
:toctree: ../stubs/
GenericTarget
FakeAlmaden
FakeArmonk
FakeAthens
FakeBelem
FakeBoeblingen
FakeBogota
FakeBrooklyn
FakeBurlington
FakeCairo
FakeCambridge
FakeCasablanca
FakeEssex
FakeGuadalupe
FakeHanoi
FakeJakarta
FakeJohannesburg
FakeKolkata
FakeLagos
FakeLima
FakeLondon
FakeManhattan
FakeManila
FakeMelbourne
FakeMontreal
FakeMumbai
FakeNairobi
FakeOurense
FakeParis
FakePoughkeepsie
FakeQuito
FakeRochester
FakeRome
FakeRueschlikon
FakeSantiago
FakeSingapore
FakeSydney
FakeTenerife
FakeTokyo
FakeToronto
FakeValencia
FakeVigo
FakeWashington
FakeYorktown
Special Fake Backends
=====================
The :class:`.GenericTarget` class is used to build :class:`.FakeGeneric`'s target,
but can also be used as a standalone target generator for testing.
Special fake backends are fake backends that were created for special testing purposes.
(Legacy) Fake V1 Backends
=========================
.. autosummary::
:toctree: ../stubs/
FakeQasmSimulator
FakeOpenPulse2Q
FakeOpenPulse3Q
Fake1Q
FakeBackendV2
FakeBackend5QV2
FakeMumbaiFractionalCX
ConfigurableFakeBackend
Fake5QV1
Fake20QV1
Fake7QPulseV1
Fake27QPulseV1
Fake127PulseV1
Fake Backend Base Classes
=========================
The fake backends based on IBM hardware are based on a set of base classes:
The fake backends are based on a set of base classes:
.. currentmodule:: qiskit.providers.fake_provider.fake_backend
.. autoclass:: qiskit.providers.fake_provider.fake_backend.FakeBackendV2
Expand All @@ -249,13 +118,7 @@
from .fake_qasm_backend import FakeQasmBackend
from .fake_pulse_backend import FakePulseBackend

# Fake providers
from .fake_provider import FakeProviderFactory, FakeProviderForBackendV2, FakeProvider

# Standard fake backends with IBM Quantum systems snapshots
from .backends import *

# Special fake backends for special testing perpurposes
# Special fake backends for special testing purposes
from .fake_qasm_simulator import FakeQasmSimulator
from .fake_openpulse_2q import FakeOpenPulse2Q
from .fake_openpulse_3q import FakeOpenPulse3Q
Expand Down
110 changes: 0 additions & 110 deletions qiskit/providers/fake_provider/backends/__init__.py

This file was deleted.

16 changes: 0 additions & 16 deletions qiskit/providers/fake_provider/backends/almaden/__init__.py

This file was deleted.

This file was deleted.

Loading

0 comments on commit 78cb3f3

Please sign in to comment.