Fornitore falso
qiskit_ibm_runtime.fake_provider
Panoramica
Il modulo dei falsi provider contiene classi di falsi provider e falsi backend. I falsi backend sono costruiti per imitare i comportamenti dei sistemi IBM Quantum utilizzando le istantanee del sistema. Le istantanee del sistema contengono informazioni importanti sul sistema quantistico, come la mappa di accoppiamento, le porte di base, le proprietà dei qubit ( T1, T2, il tasso di errore, ecc.) che sono utili per testare il transpiler ed eseguire simulazioni rumorose del sistema.
Utilizzo di esempio
Ecco un esempio di utilizzo di un backend falso per la trasposizione e la simulazione.
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")
# 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")
# 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)
Si noti che la simulazione viene effettuata utilizzando un modello di rumore generato da istantanee del sistema ottenute in passato (a volte qualche anno fa) e i risultati non sono rappresentativi dei comportamenti più recenti del sistema quantistico reale che il backend fasullo sta imitando. Se si desidera eseguire simulazioni rumorose con le ultime istantanee del backend, si può utilizzare il metodo refresh() .
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime.fake_provider import FakeSherbrooke
# initialize service to access real backends
service = QiskitRuntimeService()
# call refresh to retrieve latest backend data
# note that this overwrites your local qiskit-ibm-runtime files
backend = FakeSherbrooke()
backend.refresh(service)Fornitori falsi
I provider fasulli forniscono l'accesso a un elenco di backend fasulli.
FakeProviderForBackendV2 | Falso provider contenente falsi backend di V2. |
Backend falsi
Backend falsi di V2
I falsi backend V2 sono falsi backend con snapshot dei sistemi IBM Quantum implementati con l'interfaccia BackendV2 . Sono tutte sottoclassi di FakeBackendV2.
FakeAachen | Un falso backend a 156 qubit. |
FakeAlgiers | Un falso backend a 27 qubit. |
FakeAlmadenV2 | Un falso backend Almaden V2. |
FakeArmonkV2 | Un falso backend a 1 qubit. |
FakeAthensV2 | Un falso backend a 5 qubit. |
FakeAuckland | Un falso backend a 27 qubit. |
FakeBelemV2 | Un falso backend a 5 qubit. |
FakeBerlin | Un backend fittizio da 120 qubit. |
FakeBoeblingenV2 | Un falso backend di Boeblingen V2. |
FakeBogotaV2 | Un falso backend a 5 qubit. |
FakeBoston | Un falso backend a 156 qubit. |
FakeBrisbane | Un falso backend a 127 qubit. |
FakeBrooklynV2 | Un falso backend di Brooklyn V2. |
FakeBrussels | Un falso backend a 127 qubit. |
FakeBurlingtonV2 | Un falso backend a 5 qubit. |
FakeCairoV2 | Un falso backend a 27 qubit. |
FakeCambridgeV2 | Un falso backend di Cambridge. |
FakeCasablancaV2 | Un falso backend a 7 qubit. |
FakeCusco | Un falso backend a 127 qubit. |
FakeEssexV2 | Un falso backend a 5 qubit. |
FakeFez | Un falso backend a 156 qubit. |
FakeGeneva | Un falso backend a 27 qubit. |
FakeGuadalupeV2 | Un falso backend a 16 qubit. |
FakeHanoiV2 | Un falso backend a 27 qubit. |
FakeJakartaV2 | Un falso backend a 7 qubit V2. |
FakeJohannesburgV2 | Un falso backend di Johannesburg V2. |
FakeKawasaki | Un falso backend a 127 qubit. |
FakeKingston | Un falso backend a 156 qubit. |
FakeKolkataV2 | Un falso backend a 27 qubit. |
FakeKyiv | Un falso backend a 127 qubit. |
FakeKyoto | Un falso backend a 127 qubit. |
FakeLagosV2 | Un falso backend a 7 qubit. |
FakeLimaV2 | Un falso backend a 5 qubit. |
FakeFractionalBackend | Un falso backend a 5 qubit con caratteristiche dinamiche e frazionali modellate sulla base di FakeLima. |
FakeLondonV2 | Un falso backend a 5 qubit. |
FakeManhattanV2 | Un falso backend di Manhattan. |
FakeManilaV2 | Un falso backend a 5 qubit. |
FakeMarrakesh | Un falso backend a 156 qubit. |
FakeMelbourneV2 | Un falso backend a 15 qubit. |
FakeMiami | Un backend fittizio da 120 qubit. |
FakeMontrealV2 | Un falso backend a 27 qubit. |
FakeMumbaiV2 | Un falso backend a 27 qubit. |
FakeNairobiV2 | Un falso backend a 7 qubit. |
FakeOsaka | Un falso backend a 127 qubit. |
FakeOslo | Un falso backend a 7 qubit. |
FakeOurenseV2 | Un falso backend a 5 qubit. |
FakeParisV2 | Un falso backend parigino. |
FakePeekskill | Un falso backend a 27 qubit. |
FakePerth | Un falso backend a 7 qubit. |
FakePittsburgh | Un falso backend a 156 qubit. |
FakePrague | Un falso backend a 33 qubit. |
FakePoughkeepsieV2 | Un falso backend di Poughkeepsie. |
FakeQuebec | Un falso backend a 127 qubit. |
FakeQuitoV2 | Un falso backend a 5 qubit. |
FakeRochesterV2 | Un falso backend Rochester. |
FakeRomeV2 | Un falso backend a 5 qubit. |
FakeSantiagoV2 | Un falso backend di Santiago. |
FakeSherbrooke | Un falso backend a 127 qubit. |
FakeSingaporeV2 | Un falso backend di Singapore. |
FakeStrasbourg | Un falso backend a 127 qubit. |
FakeSydneyV2 | Un falso backend a 27 qubit. |
FakeTorino | Un falso backend a 133 qubit. |
FakeTorontoV2 | Un falso backend a 27 qubit. |
FakeValenciaV2 | Un falso backend a 5 qubit. |
FakeVigoV2 | Un falso backend a 5 qubit. |
FakeWashingtonV2 | Un falso backend a 127 qubit. |
FakeYorktownV2 | Un falso backend a 5 qubit. |