POST/jobs

Submit a quantum job to the specified device.

Request Body:

  • program (object, required): Quantum program with format and data fields
  • shots (integer, required): Number of shots to execute
  • deviceQrn (string, required): Device QRN (qBraid Resource Name)
  • runtimeOptions (object, optional): Runtime options
  • tags (object, optional): Job tags
  • name (string, optional): Job name

Headers:

  • X-API-KEY (string, required): Your qBraid API key

Returns:

  • Object containing the new job QRN and initial status

Raises:

  • 422: Validation error if required fields are missing or invalid

Authorizations

X-API-KEYstringheaderrequired

Authenticate requests using an API key linked to your qBraid account. Obtain your key by registering or logging in at account.qbraid.com.

Body

application/jsonrequired
namestring

Job name

shotsintegerrequired

Number of shots to execute

deviceQrnstringrequired

qBraid device resource name

tagsobject

Job tags

runtimeOptionsobject

Runtime options

programobjectrequired

Schema for quantum program

Response

201Successful Response
successbooleanrequired

Whether the job was created successfully

dataobjectrequired
422Validation Error
POST/jobs
curl --request POST \
  --url https://api-v2.qbraid.com/api/v1/jobs \
  --header 'X-API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "shots": 123,
  "deviceQrn": "<string>",
  "tags": {},
  "runtimeOptions": {},
  "program": {
    "format": "qasm2",
    "data": {}
  }
}'
import requests

url = "https://api-v2.qbraid.com/api/v1/jobs"
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}
payload = {
  "name": "<string>",
  "shots": 123,
  "deviceQrn": "<string>",
  "tags": {},
  "runtimeOptions": {},
  "program": {
    "format": "qasm2",
    "data": {}
  }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
const url = "https://api-v2.qbraid.com/api/v1/jobs";
const options = {
  method: "POST",
  headers: {"X-API-KEY":"<api-key>","Content-Type":"application/json"},
  body: JSON.stringify({
    "name": "<string>",
    "shots": 123,
    "deviceQrn": "<string>",
    "tags": {},
    "runtimeOptions": {},
    "program": {
      "format": "qasm2",
      "data": {}
    }
  }),
};

const response = await fetch(url, options);
console.log(await response.json());
{
  "success": true,
  "data": {
    "jobQrn": "aws:aws:sim:dm1-a1b2-qjob-1234567890abcdef",
    "status": "INITIALIZING"
  }
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}