Learn how to submit jobs directly to the IonQ API
IONQ_API_KEY
.
curl
on the command line, but in the real world example, you’d likely want to use a SDK.simulator
or qpu.aria-1
). We can also assign a name to the job for easier reference.
ghz-job.json
.
We’re now ready to submit our job to the IonQ Quantum Cloud API. We’ll use a POST
request to send our JSON job data to the job creation endpoint. This request will include two headers: one for authorization using the API key we created earlier, and another to specify that the request body is in JSON format. In this example, we give the target
key the value simulator
, which sends the job to our QPU simulator:
id
can then be used to manage the submitted job, including canceling it, checking its status, or retrieving the results.
GET
request to its unique resource URL, identified by the job ID:
{your-job-id}
with the ID you just got back.GET
request will resemble the following: