Backends & Targets¶
The Qiskit plugin provides backend discovery through OpenQuantumService and Qiskit Target objects that describe each backend's native gate set, topology, and qubit count.
Listing Backends¶
Use service.backends() to list available backends with optional filters:
from openquantum_sdk_qiskit import OpenQuantumService
service = OpenQuantumService()
# All backends
all_backends = service.backends()
# Filter by availability
online = service.backends(online=True)
# Filter by type
qpus = service.backends(device_type="QPU")
# Filter by name or short code
ionq = service.backends(name="ionq")
# Filter by provider ID
rigetti = service.backends(vendor_id="rigetti-provider-uuid")
Each backend is returned as a dictionary:
{
"id": "uuid",
"name": "IonQ Forte-1",
"description": "IonQ Forte-1 trapped-ion QPU",
"type": "QPU",
"provider_id": "uuid",
"short_code": "ionq:forte-1",
"queue_depth": 3,
"accepting_jobs": True,
"status": "Online",
}
Getting a Backend Instance¶
Use service.return_backend() to get a Qiskit BackendV2 instance:
# Simple usage: returns a clean BackendV2 for the target.
# job_subcategory_id lives at job creation time (see .run() or create_* below).
backend = service.return_backend("ionq:forte-1")
# Pass config for per-backend defaults (e.g. for repeated .run() calls without
# repeating options). job_subcategory_id can be supplied here as a default
# or overridden at the actual run/create time.
backend = service.return_backend(
"ionq:forte-1",
config={
"job_subcategory_id": "phys:oth", # default for this backend's .run() calls
"organization_id": "...",
},
)
Config Dictionary¶
The optional config parameter on return_backend() lets you supply defaults for
job submission metadata that will be used by direct backend.run(...) calls
(they can still be overridden per-call). The more common place for
job_subcategory_id is when creating jobs/primitives.
| Key | Required | Description |
|---|---|---|
backend_class_id |
No (defaults to the name arg to return_backend) |
Backend identifier (UUID or short code) |
job_subcategory_id |
No (can be supplied here as a default for .run(); otherwise defaults to "oth:oth" at run time) |
Job subcategory (UUID or short code). Best supplied at job creation. |
organization_id |
No | Organization UUID (auto-discovered if omitted) |
name |
No | Job name prefix |
configuration_data |
No | Provider-specific configuration |
execution_plan |
No | "auto" (default) / "public" / "private" |
queue_priority |
No | "auto" (default) / "standard" / "priority" / "instant" |
Export Format¶
The export_format parameter controls how circuits are serialized for submission:
# OpenQASM 3 (default)
backend = service.return_backend("ionq:forte-1", export_format="qasm3")
# OpenQASM 2
backend = service.return_backend("ionq:forte-1", export_format="qasm2")
Getting a Target¶
Use service.return_target() to get a Qiskit Target without creating a full backend:
target = service.return_target("ionq:forte-1")
print(f"Qubits: {target.num_qubits}")
print(f"Operations: {target.operation_names}")
Targets are useful for transpilation without submission.
Built-In Backend Capabilities¶
The plugin includes built-in capability definitions for supported backends. These define the native gate set, qubit count, and connectivity for Qiskit's transpiler.
IonQ Backends¶
| Backend | Qubits | Native Gates | Topology |
|---|---|---|---|
| Forte-1 | 36 | GPI, GPI2, ZZ | Fully connected |
IonQ backends use all-to-all connectivity, so no SWAP routing is needed.
Rigetti Backends¶
| Backend | Qubits | Native Gates | Topology |
|---|---|---|---|
| Cepheus-1 | 108 | RX, RZ, iSWAP | Grid |
Rigetti's grid topology requires SWAP routing for non-adjacent qubit interactions.
IQM Backends¶
| Backend | Qubits | Native Gates | Topology |
|---|---|---|---|
| Emerald | 54 | PRX, CZ | Custom |
| Garnet | 20 | PRX, CZ | Custom |
AQT Backends¶
| Backend | Qubits | Native Gates | Topology |
|---|---|---|---|
| IBEX Q1 | 12 | PRX, XX, RZ | Fully connected |
Custom Capabilities¶
You can provide custom capabilities as a dictionary, file path, or URL:
# From a dictionary
caps = {
"n_qubits": 4,
"native_ops": [
{"name": "rx", "arity": 1},
{"name": "rz", "arity": 1},
{"name": "cx", "arity": 2},
{"name": "measure", "arity": 1},
],
"topology": {
"directed_edges": False,
"coupling_map": [[0, 1], [1, 2], [2, 3]],
},
}
backend = service.return_backend(
"custom-backend",
capabilities_source=caps,
config={...},
)
# From a file
backend = service.return_backend(
"custom-backend",
capabilities_source="/path/to/capabilities.json",
config={...},
)
Related Pages¶
- Getting Started -- Install and first circuit.
- Sampler & Estimator -- Primitives for sampling and estimation.
- Backends -- Platform-level backend concepts.