Learn how to submit jobs directly to the IonQ API v0.4
Most users will submit jobs and interact with IonQ through an SDK like Qiskit, but in some instances direct API submission is preferred. This guide walks you through the basics of using the IonQ Quantum Cloud to write and run quantum programs. You’ll learn how to use the latest v0.4 Quantum Cloud API to define quantum circuits, submit them as jobs, and access the results.
Before you get started, ensure you have an IonQ Quantum Cloud account and have created an API key. For guidance on setting up and managing your API keys, please refer to our dedicated guide.This guide assumes you have completed these steps and stored your API key as a local environment variable named IONQ_API_KEY.
We’ll need to create a quantum circuit to submit as your first job. Let’s use a simple GHZ state using three qubits, first applying a Hadamard gate to a single qubit, and then using it as the control qubit for a series of controlled-NOT gates on the other two.A three-qubit GHZ circuit can be visualized like this:In IonQ’s language-agnostic JSON circuit representation, the circuit looks like this:
For the purposes of this guide we’ll use curl on the command line, but in the real world example, you’d likely want to use an SDK.
Before submitting our circuit, we need to provide some additional information. This includes specifying the circuit type, the number of times the circuit should be executed (shots), and the desired backend for the job (e.g., simulator or qpu.forte-1). We can also assign a name to the job for easier reference.
For a full list of options that can be passed to this resource, check out the API reference for POST /jobs.
In this case, we’ll submit a job to the simulator so that we get our results quickly:
Paste this in your text editor of choice and then save it using a memorable name—something like 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 backend key the value simulator, which sends the job to our QPU simulator:
Remember to replace {your-job-id} with the ID you just got back.
This request retrieves the current status of the job. Because we submitted the job to the simulator, it should be completed almost immediately. If you submitted the job to a QPU, you’ll need to wait for it to progress through the queue. The job status response to our GET request will resemble the following:
The results request provides a histogram representing the probabilities of each measured state across all 1024 shots. It’s important to note that this histogram is sparse, meaning it only includes data for outcomes that were actually measured.For example, if you ran 1024 shots of a 3-qubit circuit, there are 8 possible outcomes (000, 001, 010, 011, 100, 101, 110, 111). However, if only states 000, 011, and 111 were measured, the histogram would only contain entries for those states, omitting the others.Additionally, the output keys are little-endian integers: qubit i from the submitted program occupies the bit with value 2i, so the rightmost bit of the key’s binary form is qubit zero. For example, in a 3-qubit program, key 3 (binary 011) means qubit 0 measured 1, qubit 1 measured 1, and qubit 2 measured 0, while key 4 (binary 100) means only qubit 2 measured 1.
If you’re working on your own tools to interact with the API, the full API Reference has details on HTTP verbs and endpoints, expected response formats, and other features not covered in this guide.Additionally, our best practices page provides detailed instructions for getting the most out of our trapped-ion systems, and our QPU submission checklist is great to run through before submitting a job to one of our QPUs.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"IonQ Quantum Cloud Documentation","colors":{"primary":"#FF5000","light":"#FF5000","dark":"#FF5000"},"logo":{"light":"https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/media/branding/ionq-logo-light.png?fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=11cad3438352638e3454cd778e5edbd2","dark":"https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/media/branding/ionq-logo-dark.png?fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=85d5d12a9583104a8d373ede243bb6eb","href":"/"},"favicon":"https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/media/branding/favicon.png?fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=82c7a4271938c62e2d0face324458e5b","api":{"openapi":["https://api.ionq.co/v0.3/api-docs","https://api.ionq.co/v0.4/api-docs"]},"appearance":{"default":"dark"},"background":{"color":{"dark":"#0F161B"}},"navbar":{"links":[],"primary":{"type":"button","label":"Sign In","href":"https://cloud.ionq.com"}},"footer":{"socials":{"twitter":"https://twitter.com/ionq_inc","github":"https://github.com/ionq","linkedin":"https://www.linkedin.com/company/ionq.co"}},"search":{"prompt":"Search for..."},"seo":{"metatags":{"og:logo":"/media/branding/ionq-logo-light.png"},"indexing":"all"},"integrations":{"ga4":{"measurementId":"G-4MVSY41MTC"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Join our Slack","icon":"slack","href":"https://join.slack.com/t/ionqcommunity/shared_invite/zt-2ohj4fkvb-ErVKebhkwaP7S~lt2Gq0_w"},{"anchor":"Example Notebooks","icon":"github","href":"https://github.com/ionq-samples/"},{"anchor":"Other Resources","icon":"book-open-cover","href":"https://ionq.com/resources"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ionq","hasAudioNarration":false,"actualSubdomain":"ionq","customDomains":["docs.ionq.com"],"gitSource":{"type":"github","owner":"ionq-samples","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb8b0e2d3c9c6f327a1f19","collectionId":"b88c1530-3396-4270-8569-b4fe17a1adfa","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb8b0e2d3c9c6f327a1f19"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adb8b0e2d3c9c6f327a1f19","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"API v0.4 (Latest)","count":29},{"language":"default","tag":"Jobs","count":20},{"language":"default","tag":"API v0.3","count":19},{"language":"default","tag":"Home","count":18},{"language":"default","tag":"SDKs","count":11},{"language":"default","tag":"Python SDKs","count":11},{"language":"default","tag":"IonQ v0.3 API","count":7},{"language":"default","tag":"User Manual","count":7},{"language":"default","tag":"Backends","count":5},{"language":"default","tag":"Guides","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"[email protected]"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"survey-popup.css","content":".ionq-survey-popup{--ionq-survey-bg:#ffffff;--ionq-survey-fg:#0f161b;--ionq-survey-muted:#4b5563;--ionq-survey-border:rgba(15, 22, 27, 0.1);--ionq-survey-shadow:0 12px 32px rgba(15, 22, 27, 0.18);--ionq-survey-accent:#ff5000;--ionq-survey-accent-hover:#e64800;position:fixed;right:1.25rem;bottom:1.25rem;z-index:60;box-sizing:border-box;width:min(22.5rem,calc(100vw - 2.5rem));padding:1.25rem 1.25rem 1.125rem;border:1px solid var(--ionq-survey-border);border-radius:.875rem;background:var(--ionq-survey-bg);color:var(--ionq-survey-fg);box-shadow:var(--ionq-survey-shadow);font-family:inherit;line-height:1.45;opacity:0;transform:translateY(.75rem);transition:opacity .25s ease,transform .25s ease;pointer-events:none}.ionq-survey-popup--visible{opacity:1;transform:translateY(0);pointer-events:auto}html.dark .ionq-survey-popup{--ionq-survey-bg:#161f26;--ionq-survey-fg:#f3f4f6;--ionq-survey-muted:#a8b3bd;--ionq-survey-border:rgba(255, 255, 255, 0.1);--ionq-survey-shadow:0 12px 32px rgba(0, 0, 0, 0.5)}.ionq-survey-popup__close{position:absolute;top:.5rem;right:.5rem;width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:999px;background:0 0;color:var(--ionq-survey-muted);font-size:1.25rem;line-height:1;cursor:pointer}.ionq-survey-popup__close:focus-visible,.ionq-survey-popup__close:hover{background:var(--ionq-survey-border);color:var(--ionq-survey-fg);outline:0}.ionq-survey-popup__badge{display:inline-block;margin-bottom:.625rem;padding:.125rem .5rem;border-radius:999px;background:rgba(255,80,0,.12);color:var(--ionq-survey-accent);font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.ionq-survey-popup__title{margin:0 1.5rem .375rem 0;font-size:1rem;font-weight:600;line-height:1.3}.ionq-survey-popup__body{margin:0 0 1rem;color:var(--ionq-survey-muted);font-size:.875rem}.ionq-survey-popup__actions{display:flex;flex-wrap:wrap;gap:.5rem .75rem;align-items:center}.ionq-survey-popup__cta{display:inline-flex;align-items:center;padding:.5rem .875rem;border-radius:.5rem;background:var(--ionq-survey-accent);color:#fff!important;font-size:.875rem;font-weight:600;text-decoration:none!important;transition:background .15s ease}.ionq-survey-popup__cta:focus-visible,.ionq-survey-popup__cta:hover{background:var(--ionq-survey-accent-hover);outline:0}.ionq-survey-popup__later{padding:.5rem .25rem;border:0;background:0 0;color:var(--ionq-survey-muted);font-size:.875rem;font-weight:500;cursor:pointer}.ionq-survey-popup__later:focus-visible,.ionq-survey-popup__later:hover{color:var(--ionq-survey-fg);text-decoration:underline;outline:0}@media (max-width:640px){.ionq-survey-popup{right:.75rem;left:.75rem;bottom:.75rem;width:auto}}@media (prefers-reduced-motion:reduce){.ionq-survey-popup{transition:none;transform:none}}"}],"page":{"pagePath":"guides/direct-api-submission","slug":"/guides/direct-api-submission","pageMetadata":{"title":"Direct API Submissions","description":"Learn how to submit jobs directly to the IonQ API v0.4","href":"/guides/direct-api-submission"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to submit jobs directly to the IonQ API v0.4\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,annotation:`annotation`,code:`code`,hr:`hr`,math:`math`,mi:`mi`,mn:`mn`,mrow:`mrow`,msup:`msup`,p:`p`,pre:`pre`,semantics:`semantics`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,OptimizedImage,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Most users will submit jobs and interact with IonQ through an SDK like `,_jsx(_components.a,{href:`/sdks/index#qiskit`,children:`Qiskit`}),`, but in some instances direct API submission is preferred. This guide walks you through the basics of using the IonQ Quantum Cloud to write and run quantum programs. You’ll learn how to use the latest v0.4 Quantum Cloud API to define quantum circuits, submit them as jobs, and access the results.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-begin`,children:`Before you begin`}),`\n`,_jsxs(_components.p,{children:[`Before you get started, ensure you have an `,_jsx(_components.a,{href:`https://cloud.ionq.com`,children:`IonQ Quantum Cloud`}),` account and have created an API key. For guidance on setting up and managing your API keys, please refer to our `,_jsx(_components.a,{href:`/guides/managing-api-keys`,children:`dedicated guide`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This guide assumes you have completed these steps and stored your API key as a local environment variable named `,_jsx(_components.code,{children:`IONQ_API_KEY`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`writing-a-quantum-circuit`,children:`Writing a quantum circuit`}),`\n`,_jsxs(_components.p,{children:[`We’ll need to create a quantum circuit to submit as your first job. Let’s use a simple `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/Greenberger%E2%80%93Horne%E2%80%93Zeilinger_state`,children:`GHZ state`}),` using three qubits, first applying a Hadamard gate to a single qubit, and then using it as the control qubit for a series of controlled-NOT gates on the other two.`]}),`\n`,_jsx(_components.p,{children:`A three-qubit GHZ circuit can be visualized like this:`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=d9ae3c5f17a57a083bad8d46c58ae76c`,alt:`A visualization of a Greenberger-Horne-Zeilinger (GHZ) state.`,\"data-og-width\":`587`,width:`587`,\"data-og-height\":`345`,height:`345`,\"data-path\":`guides/_media/direct-api-submission-ghz-circuit.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=280\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=57cc5c05f46491ceef1fe3d639a8f50e 280w, https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=560\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=dddba7b8f1573d63086c95d215b51524 560w, https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=840\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=15741c4eaa25779ccd2698cf8923e68a 840w, https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=1100\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=930b26ba92cf7c957bf67b913826524a 1100w, https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=1650\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=64e5ac5457b75745f49dd04465f07c74 1650w, https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/guides/_media/direct-api-submission-ghz-circuit.png?w=2500\u0026fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=99efc6dd4353c592cc656ebd43bb1cd9 2500w`}),`\n`,_jsx(_components.p,{children:`In IonQ’s language-agnostic JSON circuit representation, the circuit looks like this:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qubits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gateset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"qis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"circuit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"h\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cnot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"control\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cnot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"control\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`submitting-a-quantum-circuit-as-a-job`,children:`Submitting a quantum circuit as a job`}),`\n`,_jsxs(Note,{children:[`For the purposes of this guide we’ll use `,_jsx(_components.code,{children:`curl`}),` on the command line, but in the real world example, you’d likely want to use an `,_jsx(_components.a,{href:`/sdks/index`,children:`SDK`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Before submitting our circuit, we need to provide some additional information. This includes specifying the circuit type, the number of times the circuit should be executed (shots), and the desired backend for the job (e.g., `,_jsx(_components.code,{children:`simulator`}),` or `,_jsx(_components.code,{children:`qpu.forte-1`}),`). We can also assign a name to the job for easier reference.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`For a full list of options that can be passed to this resource, check out the API reference for `,_jsx(_components.a,{href:`/api-reference/v0.4/jobs/create-job`,children:`POST /jobs`}),`.`]})}),`\n`,_jsx(_components.p,{children:`In this case, we’ll submit a job to the simulator so that we get our results quickly:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ionq.circuit.v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello many worlds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shots\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"backend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"simulator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qubits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gateset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"qis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"circuit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"h\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cnot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"control\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cnot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"control\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Paste this in your text editor of choice and then save it using a memorable name—something like `,_jsx(_components.code,{children:`ghz-job.json`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`We’re now ready to submit our job to the IonQ Quantum Cloud API. We’ll use a `,_jsx(_components.code,{children:`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 `,_jsx(_components.code,{children:`backend`}),` key the value `,_jsx(_components.code,{children:`simulator`}),`, which sends the job to our QPU simulator:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ionq.co/v0.4/jobs\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: apiKey `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$IONQ_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @ghz-job.json`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This will return a response similar to the following:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7135ca98-176f-48c9-8616-8f53ec505028\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The returned `,_jsx(_components.code,{children:`id`}),` can then be used to manage the submitted job, including `,_jsx(_components.a,{href:`/api-reference/v0.4/jobs/cancel-job`,children:`canceling it`}),` and `,_jsx(_components.a,{href:`/api-reference/v0.4/jobs/get-job`,children:`checking its status`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`retrieving-a-job-status`,children:`Retrieving a job status`}),`\n`,_jsxs(_components.p,{children:[`To retrieve the status of a job, we can use a `,_jsx(_components.code,{children:`GET`}),` request to its unique resource URL, identified by the job ID:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ionq.co/v0.4/jobs/{your-job-id}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: apiKey `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$IONQ_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[`Remember to replace `,_jsx(_components.code,{children:`{your-job-id}`}),` with the ID you just got back.`]}),`\n`,_jsxs(_components.p,{children:[`This request retrieves the current status of the job. Because we submitted the job to the simulator, it should be completed almost immediately. If you submitted the job to a QPU, you’ll need to wait for it to progress through the queue. The job status response to our `,_jsx(_components.code,{children:`GET`}),` request will resemble the following:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7135ca98-176f-48c9-8616-8f53ec505028\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"submitted_by\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"65e8b97c521dcf001299126b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello many worlds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"backend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"simulator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qubits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"circuits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gate_counts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"1q\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"2q\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost_usd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"428499cb-c392-4ab1-ad8e-c954a1a99ff5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-06-13T21:02:31Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"started_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-06-13T21:02:34Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-06-13T21:02:34Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"execution_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`78`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"predicted_execution_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shots\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"child_job_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`retrieving-job-results`,children:`Retrieving job results`}),`\n`,_jsx(_components.p,{children:`With the job completed, we can retrieve the results using the probabilities endpoint:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ionq.co/v0.4/jobs/{your-job-id}/results/probabilities\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: apiKey `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$IONQ_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This will return a dictionary containing the job results:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.4619140625`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.017578125`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0185546875`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0244140625`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0185546875`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.025390625`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0107421875`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"7\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.4228515625`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The results request provides a histogram representing the probabilities of each measured state across all 1024 shots. It’s important to note that this histogram is sparse, meaning it only includes data for outcomes that were actually measured.`}),`\n`,_jsx(_components.p,{children:`For example, if you ran 1024 shots of a 3-qubit circuit, there are 8 possible outcomes (000, 001, 010, 011, 100, 101, 110, 111). However, if only states 000, 011, and 111 were measured, the histogram would only contain entries for those states, omitting the others.`}),`\n`,_jsxs(_components.p,{children:[`Additionally, the output keys are little-endian integers: qubit `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsx(_components.mi,{children:`i`})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`i`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.6595em`}}),_jsx(_components.span,{className:`mord mathnormal`,children:`i`})]})})]}),` from the submitted program occupies the bit with value `,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsx(_components.mrow,{children:_jsxs(_components.msup,{children:[_jsx(_components.mn,{children:`2`}),_jsx(_components.mi,{children:`i`})]})}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`2^i`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`0.8247em`}}),_jsxs(_components.span,{className:`mord`,children:[_jsx(_components.span,{className:`mord`,children:`2`}),_jsx(_components.span,{className:`msupsub`,children:_jsx(_components.span,{className:`vlist-t`,children:_jsx(_components.span,{className:`vlist-r`,children:_jsx(_components.span,{className:`vlist`,style:{height:`0.8247em`},children:_jsxs(_components.span,{style:{top:`-3.063em`,marginRight:`0.05em`},children:[_jsx(_components.span,{className:`pstrut`,style:{height:`2.7em`}}),_jsx(_components.span,{className:`sizing reset-size6 size3 mtight`,children:_jsx(_components.span,{className:`mord mathnormal mtight`,children:`i`})})]})})})})})]})]})})]}),`, so the rightmost bit of the key’s binary form is qubit zero. For example, in a 3-qubit program, key `,_jsx(_components.code,{children:`3`}),` (binary `,_jsx(_components.code,{children:`011`}),`) means qubit 0 measured 1, qubit 1 measured 1, and qubit 2 measured 0, while key `,_jsx(_components.code,{children:`4`}),` (binary `,_jsx(_components.code,{children:`100`}),`) means only qubit 2 measured 1.`]}),`\n`,_jsx(Heading,{level:`2`,id:`getting-job-cost-information`,children:`Getting job cost information`}),`\n`,_jsx(_components.p,{children:`API v0.4 also provides a dedicated endpoint to retrieve detailed billing information for a job:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ionq.co/v0.4/jobs/{your-job-id}/cost\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: apiKey `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$IONQ_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This will return cost details including estimated and actual costs in USD.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`additional-resources`,children:`Additional Resources`}),`\n`,_jsxs(_components.p,{children:[`If you’re working on your own tools to interact with the API, the full `,_jsx(_components.a,{href:`/api-reference/v0.4`,children:`API Reference`}),` has details on HTTP verbs and endpoints, expected response formats, and other features not covered in this guide.`]}),`\n`,_jsxs(_components.p,{children:[`Additionally, our `,_jsx(_components.a,{href:`https://ionq.com/best-practices`,children:`best practices page`}),` provides detailed instructions for getting the most out of our trapped-ion systems, and our `,_jsx(_components.a,{href:`/guides/qpu-submission-checklist`,children:`QPU submission checklist`}),` is great to run through before submitting a job to one of our QPUs.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Direct API Submissions","description":"Learn how to submit jobs directly to the IonQ API v0.4","href":"/guides/direct-api-submission"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you begin","slug":"before-you-begin","depth":2,"children":[]},{"title":"Writing a quantum circuit","slug":"writing-a-quantum-circuit","depth":2,"children":[]},{"title":"Submitting a quantum circuit as a job","slug":"submitting-a-quantum-circuit-as-a-job","depth":2,"children":[]},{"title":"Retrieving a job status","slug":"retrieving-a-job-status","depth":2,"children":[]},{"title":"Retrieving job results","slug":"retrieving-job-results","depth":2,"children":[]},{"title":"Getting job cost information","slug":"getting-job-cost-information","depth":2,"children":[]},{"title":"Additional Resources","slug":"additional-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/ionq/76975e31ca3d94be/survey-popup.js"],"subdomain":"ionq","siteName":"IonQ Quantum Cloud Documentation","title":"Direct API Submissions - IonQ Quantum Cloud Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-13T02:13:23.219Z","originalFileLocation":"guides/direct-api-submission.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to submit jobs directly to the IonQ API v0.4\">\u003cmeta data-mint-head name=\"application-name\" content=\"IonQ Quantum Cloud Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Direct API Submissions - IonQ Quantum Cloud Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to submit jobs directly to the IonQ API v0.4\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"IonQ Quantum Cloud Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ionq.com/guides/direct-api-submission\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ionq.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Direct+API+Submissions\u0026amp;description=Learn+how+to+submit+jobs+directly+to+the+IonQ+API+v0.4\u0026amp;theme=f6791b5e02266258dbd08105\u0026amp;signature=a7c4a1cdc3ad58da6294d69af7738aa34b2076a752700ea89d627db474e0f47a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Direct API Submissions - IonQ Quantum Cloud Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to submit jobs directly to the IonQ API v0.4\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ionq.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Direct+API+Submissions\u0026amp;description=Learn+how+to+submit+jobs+directly+to+the+IonQ+API+v0.4\u0026amp;theme=f6791b5e02266258dbd08105\u0026amp;signature=a7c4a1cdc3ad58da6294d69af7738aa34b2076a752700ea89d627db474e0f47a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ionq/kNvIbD7sfYoz1On3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"IonQ Quantum Cloud Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF5000\">\u003cmeta data-mint-head name=\"og:logo\" content=\"/media/branding/ionq-logo-light.png\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ionq.com/guides/direct-api-submission\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/direct-api-submission.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ionq.com/#organization\",\"name\":\"IonQ Quantum Cloud Documentation\",\"url\":\"https://docs.ionq.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ionq/KP8cXNscCAA57Ku7/media/branding/ionq-logo-light.png?fit=max\u0026auto=format\u0026n=KP8cXNscCAA57Ku7\u0026q=85\u0026s=11cad3438352638e3454cd778e5edbd2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ionq.com#website\",\"name\":\"IonQ Quantum Cloud Documentation\",\"url\":\"https://docs.ionq.com\",\"publisher\":{\"@id\":\"https://docs.ionq.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ionq.com/guides/direct-api-submission#webpage\",\"url\":\"https://docs.ionq.com/guides/direct-api-submission\",\"name\":\"Direct API Submissions\",\"description\":\"Learn how to submit jobs directly to the IonQ API v0.4\",\"dateModified\":\"2026-08-13T02:13:23.219Z\",\"isPartOf\":{\"@id\":\"https://docs.ionq.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ionq.com/guides/direct-api-submission#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ionq.com/guides/direct-api-submission#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.ionq.com/guides/managing-api-keys\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Direct API Submissions\",\"item\":\"https://docs.ionq.com/guides/direct-api-submission\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ionq.com/guides/direct-api-submission#article\",\"headline\":\"Direct API Submissions\",\"name\":\"Direct API Submissions\",\"description\":\"Learn how to submit jobs directly to the IonQ API v0.4\",\"url\":\"https://docs.ionq.com/guides/direct-api-submission\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ionq.com/guides/direct-api-submission#webpage\"},\"dateModified\":\"2026-08-13T02:13:23.219Z\",\"publisher\":{\"@id\":\"https://docs.ionq.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ionq.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"IonQ Quantum Cloud Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"IonQ Quantum Cloud Documentation","nav":{"global":{"anchors":[{"anchor":"Join our Slack","icon":"slack","href":"https://join.slack.com/t/ionqcommunity/shared_invite/zt-2ohj4fkvb-ErVKebhkwaP7S~lt2Gq0_w"},{"anchor":"Example Notebooks","icon":"github","href":"https://github.com/ionq-samples/"},{"anchor":"Other Resources","icon":"book-open-cover","href":"https://ionq.com/resources"}]},"tabs":[{"tab":"Home","groups":[{"group":"Introduction","pages":[{"title":"IonQ Documentation","sidebarTitle":"IonQ Documentation","mode":"wide","href":""}]},{"group":"Features","pages":[{"title":"Simulation with Noise Models","href":"/features/simulation-with-noise-models"},{"title":"Native Gates","href":"/features/getting-started-with-native-gates"},{"title":"Error Mitigation - Debiasing","href":"/features/error-mitigation-debiasing"}]},{"group":"Guides","pages":[{"title":"Managing API keys","href":"/guides/managing-api-keys"},{"title":"Job Cost and Usage","description":"Estimate job cost and track credit usage.","href":"/guides/job-cost-and-usage"},{"title":"Direct API Submissions","href":"/guides/direct-api-submission"},{"title":"QPU Submission Checklist","description":"Things to do before submitting to IonQ's hardware systems.","href":"/guides/qpu-submission-checklist"},{"title":"QAOA solve with Fire Opal","href":"/guides/qaoa-solve-with-fire-opal"}]},{"group":"User Manual","pages":[{"title":"Your Account","href":"/user-manual/accounts"},{"title":"Backends","href":"/user-manual/backends"},{"title":"Jobs","href":"/user-manual/jobs"},{"title":"Organizations","href":"/user-manual/organizations"},{"title":"Projects","href":"/user-manual/projects"},{"title":"Platform Systems","mode":"wide","href":"/user-manual/platform-systems"},{"title":"Glossary","href":"/user-manual/glossary"}]},{"group":"Access Partners","pages":[{"title":"Amazon Braket","href":"/partners/amazon-braket"}]},{"group":"Integrations","pages":[{"title":"Connecting a SAML Identity Provider","href":"/guides/connecting-saml-identity-providers"}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks"}]},{"tab":"API v0.4 (Latest)","pages":[{"title":"API v0.4 (Latest)","href":"/api-reference/v0.4/introduction"}]},{"tab":"API v0.3","pages":[{"title":"API v0.3","href":"/api-reference/v0.3/introduction"}]}]},"title":"Direct API Submissions - IonQ Quantum Cloud Documentation","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-CVZVK4hN.js","lightbox-handle-r17bVUz3.js"]}