Multicircuit Jobs
This guide covers everything from setting up a multicircuit job, submitting it to IonQ’s backend, and retrieving the results.
Jobs contain a circuit to be executed on a QPU, and in the case of multicircuit jobs, multiple circuits are being submitted in a single job payload. The advantage of this approach is that it simplifies the submission process, allowing for example, all of the circuits of a gradient calculation to be submitted in a single HTTP request, instead of over hundreds.
When submitting work from a local environment with a poor internet connection, this can also help overcome job submissions failing intermittently from network issues.
To ensure smooth processing, please format your quantum programs in
ionq.circuit.v0
as demonstrated below.
Creating a Multicircuit Job
Below is a JSON object that describes a multicircuit job for IonQ’s simulator. This job includes two distinct circuits:
Submitting the Job
To submit this multicircuit job to IonQ, use the following curl
command. Make sure to replace your-api-key
with your actual API key:
Expected Response
You should receive a JSON response containing the job ID and status, similar to this:
Retrieving Job Results
Once the job is complete, fetch the results using the job’s UUID provided in the job submission response:
Result Example
Each UUID represents a circuit within your job, and the results show the probability distribution of the qubit measurements.
If you are interested in implementing these steps using the Qiskit SDK, check out this detailed multicircuit guide with Qiskit and IonQ.
Was this page helpful?