Sample a circuit on IBM hardware
ibm_quantum.run_samplerFree up to 10 min/month; then $96/minute, billed per secondListed
Run a circuit with the Qiskit Runtime Sampler on one of IBM's real quantum computers and get measurement counts. Needs your own IBM Quantum API key.
Inputs
| Name | Type | Description |
|---|---|---|
backendrequired | string | Backend name, e.g. ibm_brisbane |
openqasmrequired | string | OpenQASM 2 or 3 circuit source |
shots | integer | default: 1024; range: 1 to … |
Example output
Provider returns measured qubit results as counts (illustrative Bell pair: mostly "00" and "11").
Try it
Not connected yet: use IBM Quantum directly at ibm.com/quantum . Calling it through our MCP returns this same message.
Call it
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ibm_quantum.run_sampler",
"arguments": {
"backend": "ibm_brisbane",
"openqasm": "OPENQASM 2.0; include \"qelib1.inc\"; qreg q[2]; creg c[2]; h q[0]; cx q[0],q[1]; measure q -> c;",
"shots": 1024
}
}
}curl -sS -X POST https://www.realworldmcp.com/api/call/ibm_quantum.run_sampler \
-H 'content-type: application/json' \
-d '{"backend": "ibm_brisbane", "openqasm": "OPENQASM 2.0; include \"qelib1.inc\"; qreg q[2]; creg c[2]; h q[0]; cx q[0],q[1]; measure q -> c;", "shots": 1024}'const res = await fetch("https://www.realworldmcp.com/api/call/ibm_quantum.run_sampler", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"backend": "ibm_brisbane", "openqasm": "OPENQASM 2.0; include \"qelib1.inc\"; qreg q[2]; creg c[2]; h q[0]; cx q[0],q[1]; measure q -> c;", "shots": 1024})
});
console.log(await res.json());