Working with Quantum Devices
April 16, 2026 ยท View on GitHub
This guide covers how to list and query quantum computing devices through the MCP server.
Available Tools
| Tool | Description |
|---|---|
list_qpu_devices_tool | List all available QPU devices |
get_qpu_properties_tool | Get detailed properties of a device |
Listing Devices
To see all available quantum processing units (QPUs):
result = await list_qpu_devices_tool()
if result["status"] == "success":
for device in result["devices"]:
print(f"ID: {device['id']}")
print(f"Name: {device['name']}")
print(f"Qubits: {device['num_qubits']}")
print(f"Operational: {device['operational']}")
print("---")
Response Format
{
"status": "success",
"devices": [
{
"id": "20",
"name": "QPU-20",
"num_qubits": 72,
"operational": true,
"is_virtual": false,
"pending_jobs": 3
}
],
"total_devices": 5
}
Getting Device Properties
To get detailed information about a specific device:
properties = await get_qpu_properties_tool(device_id="20")
if properties["status"] == "success":
print(f"Device: {properties['name']}")
print(f"Qubits: {properties['num_qubits']}")
print(f"Basis Gates: {properties['basis_gates']}")
print(f"Topology: {properties['topology']}")
Response Format
{
"status": "success",
"device_id": "20",
"name": "QPU-20",
"num_qubits": 72,
"topology": "[[0,1], [1,2], ...]",
"basis_gates": ["x", "y", "z", "h", "cx", "cz"],
"operational": true,
"is_virtual": false,
"channel": "qcloud"
}
Device Properties Explained
| Property | Description |
|---|---|
id | Unique device identifier |
name | Human-readable device name |
num_qubits | Number of qubits available |
operational | Whether the device is online |
is_virtual | Whether this is a simulator |
pending_jobs | Number of jobs in queue |
basis_gates | Native gates supported |
topology | Qubit connectivity map |
Selecting a Device
When choosing a device for your quantum tasks, consider:
- Qubit Count: Ensure the device has enough qubits for your circuit
- Operational Status: Check that the device is online
- Queue Length: Devices with fewer pending jobs may execute faster
- Gate Set: Verify the device supports your required gates
# Find the best available device
devices = await list_qpu_devices_tool()
best_device = None
for device in devices["devices"]:
if device["operational"] and not device["is_virtual"]:
if best_device is None or device["pending_jobs"] < best_device["pending_jobs"]:
best_device = device
if best_device:
print(f"Selected device: {best_device['id']} ({best_device['name']})")