Skip to main contentIBM Quantum Documentation

Fake Provider

qiskit_ibm_runtime.fake_provider


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 simulations of the system.


Example Usage

Here is an example of using a fake backend for transpilation and simulation.

from qiskit import QuantumCircuit
from qiskit import transpile
from qiskit.visualization import plot_histogram
from qiskit_ibm_runtime import SamplerV2
from qiskit_ibm_runtime.fake_provider import FakeManilaV2
 
# Get a fake backend from the fake provider
backend = FakeManilaV2()
 
# Create a simple circuit
circuit = QuantumCircuit(3)
circuit.h(0)
circuit.cx(0,1)
circuit.cx(0,2)
circuit.measure_all()
circuit.draw('mpl', style="iqp")
../_images/fake_provider-1.png
# Transpile the ideal circuit to a circuit that can be directly executed by the backend
transpiled_circuit = transpile(circuit, backend)
transpiled_circuit.draw('mpl', style="iqp")
../_images/fake_provider-2.png
# Run the transpiled circuit using the simulated fake backend
sampler = SamplerV2(backend)
job = sampler.run([transpiled_circuit])
pub_result = job.result()[0]
counts = pub_result.data.meas.get_counts()
plot_histogram(counts)
../_images/fake_provider-3.png
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, you should use the qiskit_aer library. After installation, you can follow the steps below to generate a simulator that mimics a real quantum system with the latest calibration results.

from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_aer import AerSimulator
 
# get a real backend from the runtime service
service = QiskitRuntimeService()
backend = service.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.

FakeProviderForBackendV2Fake provider containing fake V2 backends.

Fake Backends

Fake V2 Backends

Fake V2 backends are fake backends with IBM Quantum systems snapshots implemented with BackendV2 interface. They are all subclasses of FakeBackendV2.

FakeAlgiersA fake 27 qubit backend.
FakeAlmadenV2A fake Almaden V2 backend.
FakeArmonkV2A fake 1 qubit backend.
FakeAthensV2A fake 5 qubit backend.
FakeAucklandA fake 27 qubit backend.
FakeBelemV2A fake 5 qubit backend.
FakeBoeblingenV2A fake Boeblingen V2 backend.
FakeBogotaV2A fake 5 qubit backend.
FakeBrisbaneA fake 127 qubit backend.
FakeBrooklynV2A fake Brooklyn V2 backend.
FakeBurlingtonV2A fake 5 qubit backend.
FakeCairoV2A fake 27 qubit backend.
FakeCambridgeV2A fake Cambridge backend.
FakeCasablancaV2A fake 7 qubit backend.
FakeCuscoA fake 127 qubit backend.
FakeEssexV2A fake 5 qubit backend.
FakeGenevaA fake 27 qubit backend.
FakeGuadalupeV2A fake 16 qubit backend.
FakeHanoiV2A fake 27 qubit backend.
FakeJakartaV2A fake 7 qubit V2 backend.
FakeJohannesburgV2A fake Johannesburg V2 backend.
FakeKawasakiA fake 127 qubit backend.
FakeKolkataV2A fake 27 qubit backend.
FakeKyivA fake 127 qubit backend.
FakeKyotoA fake 127 qubit backend.
FakeLagosV2A fake 7 qubit backend.
FakeLimaV2A fake 5 qubit backend.
FakeFractionalBackendA fake 5 qubit backend with dynamic and fractional feature modeled based on FakeLima.
FakeLondonV2A fake 5 qubit backend.
FakeManhattanV2A fake Manhattan backend.
FakeManilaV2A fake 5 qubit backend.
FakeMelbourneV2A fake 14 qubit backend.
FakeMontrealV2A fake 27 qubit backend.
FakeMumbaiV2A fake 27 qubit backend.
FakeNairobiV2A fake 7 qubit backend.
FakeOsakaA fake 127 qubit backend.
FakeOsloA fake 7 qubit backend.
FakeOurenseV2A fake 5 qubit backend.
FakeParisV2A fake Paris backend.
FakePeekskillA fake 27 qubit backend.
FakePerthA fake 7 qubit backend.
FakePragueA fake 33 qubit backend.
FakePoughkeepsieV2A fake Poughkeepsie backend.
FakeQuebecA fake 127 qubit backend.
FakeQuitoV2A fake 5 qubit backend.
FakeRochesterV2A fake Rochester backend.
FakeRomeV2A fake 5 qubit backend.
FakeSantiagoV2A fake Santiago backend.
FakeSherbrookeA fake 127 qubit backend.
FakeSingaporeV2A fake Singapore backend.
FakeSydneyV2A fake 27 qubit backend.
FakeTorinoA fake 133 qubit backend.
FakeTorontoV2A fake 27 qubit backend.
FakeValenciaV2A fake 5 qubit backend.
FakeVigoV2A fake 5 qubit backend.
FakeWashingtonV2A fake 127 qubit backend.
FakeYorktownV2A fake 5 qubit backend.
Was this page helpful?
Report a bug or request content on GitHub.