{ "algorithm": "lr-qaoa", "code": "from qiskit import QuantumCircuit\n# ... verified internals inlined here ...\nMANIFEST = {'algorithm': 'lr-qaoa', 'n_qubits': 8, 'qasm': '...'}\n", "language": "python", "note": "Run: pip install qiskit qiskit-aer qiskit-ibm-runtime networkx numpy; python the_file.py. The haiqu_run + haiqu_full variants additionally need `pip install haiqu-sdk` and HAIQU_API_KEY; the two baselines run without them.", "steps": [ { "id": "show_recipe", "intent": "User reads what is about to execute before any side effects.", "render_after": [], "render_before": [ "Paste the `code` field as a fenced Python block.", "Point out the EDIT-HERE region." ], "title": "Show the recipe code" } ]}
Return a complete, runnable Python script for one algorithm.
Use this tool when the user wants to run an algorithm, see its code, asks
“how do I run LR-QAOA”, “give me the code”, “show me a noise-mitigation
benchmark”, or “benchmark this on a noisy device”. Get the key from
list_haiqu_algorithms first if the user did not give an exact one.
The returned code is self-contained: it runs the algorithm across four
variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full
Haiqu stack with error mitigation) on one problem instance and prints an
approximation-ratio comparison. The user can run it as-is or edit the
clearly marked EDIT-HERE block (graph, layers, shots, device) to change
the problem. The two Haiqu variants require the user’s Haiqu API key; the
two baselines run with only open-source packages.
Args:
algorithm_key: Algorithm identifier from list_haiqu_algorithms
(e.g. “lr-qaoa”).
GET
/
ai
/
qakb
/
algorithms
/
{algorithm_key}
/
recipe
Get Haiqu Algorithm Recipe
curl --request GET \ --url 'https://api.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY='
{ "algorithm": "lr-qaoa", "code": "from qiskit import QuantumCircuit\n# ... verified internals inlined here ...\nMANIFEST = {'algorithm': 'lr-qaoa', 'n_qubits': 8, 'qasm': '...'}\n", "language": "python", "note": "Run: pip install qiskit qiskit-aer qiskit-ibm-runtime networkx numpy; python the_file.py. The haiqu_run + haiqu_full variants additionally need `pip install haiqu-sdk` and HAIQU_API_KEY; the two baselines run without them.", "steps": [ { "id": "show_recipe", "intent": "User reads what is about to execute before any side effects.", "render_after": [], "render_before": [ "Paste the `code` field as a fenced Python block.", "Point out the EDIT-HERE region." ], "title": "Show the recipe code" } ]}
A self-contained, runnable Python script for one algorithm,
plus a per-algorithm demo orchestration plan.
algorithm
string
required
Algorithm key the recipe is for.
code
string
required
Complete, copy-pasteable Python script. Runs locally and on Haiqu.
note
string
required
How to run it + which variants need a Haiqu API key.
language
string
default:python
Source language of the recipe.
steps
RecipeStep · object[]
Ordered demo plan. The orchestrating LLM should walk these in order, rendering the indicated artifacts inline. The plan is algorithm-agnostic in shape; algorithm-specific render content comes from sandbox-side hooks the recipe defines (compute_results, format_headline).
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Haiqu","description":"Haiqu is a quantum computing software company building a full-stack quantum intelligence platform for enterprise, research, and developer teams.\n\nHaiqu helps quantum R\u0026D teams move from application ideas to executable prototypes and run frontier quantum workloads on real quantum hardware. The platform combines agentic R\u0026D workflows, Haiqu SDK optimization, and runtime orchestration to improve quantum application development, circuit performance, and execution cost. AI agents: The agent orientation is installed to ``haiqu/sdk/AGENTS.md``, and can also be found at https://github.com/haiqu-ai/haiqu-sdk/blob/main/haiqu/sdk/AGENTS.md","colors":{"primary":"#000000","light":"#CDE9F7","dark":"#092382"},"logo":{"light":"https://mintcdn.com/haiqu/naR3-ajV6yLCfg5I/logo/logo-text-black.svg?fit=max\u0026auto=format\u0026n=naR3-ajV6yLCfg5I\u0026q=85\u0026s=2010ac2de39f76a994323bd9afa6aec1","dark":"https://mintcdn.com/haiqu/naR3-ajV6yLCfg5I/logo/logo-text-white.svg?fit=max\u0026auto=format\u0026n=naR3-ajV6yLCfg5I\u0026q=85\u0026s=826f72d62ee230ca75fe7311455a4012"},"favicon":"https://mintcdn.com/haiqu/QnjSg02a6HjnZweN/logo/logo_black.svg?fit=max\u0026auto=format\u0026n=QnjSg02a6HjnZweN\u0026q=85\u0026s=ff388300b90ced457ceff179ec9ca3a9","navbar":{"links":[{"href":"https://feedback.haiqu.ai","label":"Support"}],"primary":{"type":"button","label":"Request Platform Demo","href":"https://haiqu.ai/contactform"}},"footer":{"socials":{"github":"https://github.com/haiqu-ai","linkedin":"https://linkedin.com/company/haiquai"}},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"SuisseIntlMono","weight":400,"source":"fonts/SuisseIntlMono-Regular-WebS.woff2","format":"woff2"},"body":{"family":"Softcore","weight":400,"source":"fonts/Softcore-Regular.woff2","format":"woff2"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"haiqu","hasAudioNarration":false,"actualSubdomain":"haiqu","customDomains":["docs.haiqu.ai"],"gitSource":{"type":"github","owner":"haiqu-ai","repo":"sdk-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af2f96b0d36c20f767f431f","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":178},{"language":"default","tag":"SDK Reference","count":34},{"language":"default","tag":"Guides","count":31},{"language":"default","tag":"Core features","count":17},{"language":"default","tag":"Data loading","count":9},{"language":"default","tag":"Dashboard","count":8},{"language":"default","tag":"Core platform functions","count":8},{"language":"default","tag":"Circuit Execution","count":5},{"language":"default","tag":"SKQD","count":5},{"language":"default","tag":"Catalog","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"SkandiaSN\";src:url(\"/fonts/SkandiaSN-Regular.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"SkandiaSN\";src:url(\"/fonts/SkandiaSN-Bold.woff2\") format(\"woff2\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Softcore\";src:url(\"/fonts/Softcore-Regular.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Softcore\";src:url(\"/fonts/Softcore-RegularItalic.woff2\") format(\"woff2\");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:\"Softcore\";src:url(\"/fonts/Softcore-Bold.woff2\") format(\"woff2\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Softcore\";src:url(\"/fonts/Softcore-BoldItalic.woff2\") format(\"woff2\");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:\"SuisseIntlMono\";src:url(\"/fonts/SuisseIntlMono-Regular-WebS.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"SuisseIntlMono\";src:url(\"/fonts/SuisseIntlMono-Regular-WebXL.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}code,pre,.code{font-family:\"SuisseIntlMono\", monospace}:root{--primary-light: 196 213 255;--primary-color: #000000;--light-color: #C4D5FF;--dark-color: #093188;--font-family-suisse-intl-mono: \"SuisseIntlMono\", monospace;--font-family-skandia-sn: \"SkandiaSN\", sans-serif;--font-family-softcore: \"Softcore\", sans-serif}@import url('/styles/navbar.css');@import url('/styles/main.css');@import url('/styles/footer.css');@import url('/styles/content.css');h1,h2,h3,h4,h5,h6{font-family:var(--font-family-suisse-intl-mono)}.case-studies .card-group .card{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0;padding:1.25rem 1.5rem;border:1px solid rgba(0, 0, 0, 0.12);border-radius:1rem}.case-studies .card-group .card:hover{border-color:#000000}.case-studies .card-group .card>[data-component-part=\"card-content-container\"],.case-studies .card-group .card>[data-component-part=\"card-content-container\"]>a,.case-studies .card-group .card>[data-component-part=\"card-content-container\"]>a>.w-full{display:contents}"},{"filePath":"styles/content.css","content":".sidebar-group-header{padding-left:0}#sidebar-title{text-transform:uppercase;letter-spacing:1px;font-size:12px}.sidebar-group>li{font-family:var(--font-family-suisse-intl-mono);font-size:10px;letter-spacing:1px;text-transform:uppercase}.sidebar-group>li>a{padding:9px!important;border-radius:5px!important;line-height:1.5}.eyebrow{font-family:var(--font-family-suisse-intl-mono);font-size:10px;letter-spacing:1px;text-transform:uppercase}[data-callout-type=\"check\"],[data-callout-type=\"tip\"],[data-callout-type=\"note\"]{background-color:var(--light-color)!important;border-color:var(--dark-color)!important}[data-callout-type=\"check\"] strong,[data-callout-type=\"tip\"] strong,[data-callout-type=\"note\"] strong,[data-component-part=\"callout-content\"] h3{color:var(--dark-color)!important}[data-callout-type=\"check\"]>div,[data-callout-type=\"check\"] svg,[data-callout-type=\"tip\"]>div,[data-callout-type=\"tip\"] svg,[data-callout-type=\"note\"]>div,[data-callout-type=\"note\"] svg{color:var(--dark-color)!important}"},{"filePath":"styles/footer.css","content":"#footer{padding:1rem 0}"},{"filePath":"styles/main.css","content":"#navbar~div:has(#content-container){max-width:92rem;padding:0 3rem}#content-container:has([data-page-title=\"Changelog\"]){max-width:50rem;margin:0 auto}.changelog-inline-dates .update{flex-direction:column!important;align-items:stretch!important;gap:0!important}.changelog-inline-dates [data-component-part=\"update-content\"]>*{min-width:0;overflow-wrap:anywhere}.changelog-inline-dates .update:first-child{padding-top:0}.changelog-inline-dates .update>div,.changelog-inline-dates [data-component-part=\"update-content\"]{display:contents}.changelog-inline-dates .update>div:first-child>.absolute,.changelog-inline-dates [data-component-part=\"update-description\"]{display:none}.changelog-inline-dates [data-component-part=\"update-content\"]>:not(h1,h2,h3,h4){margin-bottom:0!important}.changelog-inline-dates [data-component-part=\"update-content\"]>h1{order:-1;margin-bottom:0.5rem}.changelog-inline-dates [data-name=\"frame\"]{max-width:48rem;margin-inline:auto}.changelog-inline-dates [data-component-part=\"update-label\"]{align-self:flex-start;padding:0;background:none;font-family:var(--font-family-suisse-intl-mono);font-size:12px;letter-spacing:1px;text-transform:uppercase}#content{margin:32px 0 0 0}.main-page-title-block h1{font-family:var(--font-family-softcore);font-weight:200;font-size:34px;margin-top:0}.main-page-title-block p{font-family:var(--font-family-softcore);font-weight:400;font-size:15px}.card-group .card{border:0;border-radius:0}.card-group .card>[data-component-part=\"card-content-container\"]{padding:1rem 0}.card-group .card>[data-component-part=\"card-content-container\"] h2{font-weight:400;margin-bottom:1rem;font-size:14px;letter-spacing:1px}.card-group .card>[data-component-part=\"card-content-container\"] [data-component-part=\"card-content\"]{font-family:var(--font-family-skandia-sn);font-weight:400;font-size:14px}#quick-navigation{background-color:var(--dark-color);color:#ffffff;font-size:10px;letter-spacing:1px;border:0;border-radius:5px!important;padding:9px;line-height:1.5;padding:10px;display:inline-block;text-transform:uppercase;font-weight:400}"},{"filePath":"styles/navbar.css","content":"#search-bar-entry{background-color:#F1EFED;border:0;box-shadow:none;height:32px;border-radius:6px;text-transform:uppercase;font-family:var(--font-family-suisse-intl-mono)}#search-bar-entry>div>div{font-size:10px;color:var(--primary-color);letter-spacing:1px}#search-bar-entry svg{display:none}#search-bar-entry>span{font-size:10px;color:var(--primary-color);letter-spacing:1px}#assistant-entry{text-transform:uppercase;font-family:var(--font-family-suisse-intl-mono);border-radius:5px!important;padding:7px 9px;height:32px;letter-spacing:1px}#assistant-entry>span{font-size:10px;line-height:1.5}nav a,nav button{text-transform:uppercase;font-family:var(--font-family-suisse-intl-mono);font-size:10px;letter-spacing:1px}#topbar-cta-button>a{font-size:10px;border:0;border-radius:5px!important;padding:9px;line-height:1.5;letter-spacing:1px}#topbar-cta-button>a>span{border-radius:5px}#topbar-cta-button>a svg{display:none}.nav-tabs>a{text-transform:uppercase;font-family:var(--font-family-suisse-intl-mono);font-size:10px;font-weight:400;text-shadow:none;letter-spacing:1px}#mobile-nav button>span,[role=\"menu\"]>a{font-family:var(--font-family-suisse-intl-mono);letter-spacing:1px;text-transform:uppercase;font-size:10px}#navbar button span,#navbar button div{text-transform:uppercase;font-family:var(--font-family-suisse-intl-mono);letter-spacing:1px;font-size:10px!important}"}]}
{"page":{"pagePath":"api-reference/get-haiqu-algorithm-recipe","slug":"/api-reference/get-haiqu-algorithm-recipe","pageMetadata":{"title":"Get Haiqu Algorithm Recipe","description":"Return a complete, runnable Python script for one algorithm.\n\nUse this tool when the user wants to run an algorithm, see its code, asks\n\"how do I run LR-QAOA\", \"give me the code\", \"show me a noise-mitigation\nbenchmark\", or \"benchmark this on a noisy device\". Get the key from\n``list_haiqu_algorithms`` first if the user did not give an exact one.\n\nThe returned ``code`` is self-contained: it runs the algorithm across four\nvariants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full\nHaiqu stack with error mitigation) on one problem instance and prints an\napproximation-ratio comparison. The user can run it as-is or edit the\nclearly marked EDIT-HERE block (graph, layers, shots, device) to change\nthe problem. The two Haiqu variants require the user's Haiqu API key; the\ntwo baselines run with only open-source packages.\n\nArgs:\n algorithm_key: Algorithm identifier from ``list_haiqu_algorithms``\n (e.g. \"lr-qaoa\").","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/qakb/algorithms/{algorithm_key}/recipe","href":"/api-reference/get-haiqu-algorithm-recipe","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Return a complete, runnable Python script for one algorithm.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this tool when the user wants to run an algorithm, see its code, asks\\n“how do I run LR-QAOA”, “give me the code”, “show me a noise-mitigation\\nbenchmark”, or “benchmark this on a noisy device”. Get the key from\\n\", _jsx(_components.code, {\n children: \"list_haiqu_algorithms\"\n }), \" first if the user did not give an exact one.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The returned \", _jsx(_components.code, {\n children: \"code\"\n }), \" is self-contained: it runs the algorithm across four\\nvariants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full\\nHaiqu stack with error mitigation) on one problem instance and prints an\\napproximation-ratio comparison. The user can run it as-is or edit the\\nclearly marked EDIT-HERE block (graph, layers, shots, device) to change\\nthe problem. The two Haiqu variants require the user’s Haiqu API key; the\\ntwo baselines run with only open-source packages.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Args:\\nalgorithm_key: Algorithm identifier from \", _jsx(_components.code, {\n children: \"list_haiqu_algorithms\"\n }), \"\\n(e.g. “lr-qaoa”).\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Haiqu Algorithm Recipe","description":"Return a complete, runnable Python script for one algorithm.\n\nUse this tool when the user wants to run an algorithm, see its code, asks\n\"how do I run LR-QAOA\", \"give me the code\", \"show me a noise-mitigation\nbenchmark\", or \"benchmark this on a noisy device\". Get the key from\n``list_haiqu_algorithms`` first if the user did not give an exact one.\n\nThe returned ``code`` is self-contained: it runs the algorithm across four\nvariants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full\nHaiqu stack with error mitigation) on one problem instance and prints an\napproximation-ratio comparison. The user can run it as-is or edit the\nclearly marked EDIT-HERE block (graph, layers, shots, device) to change\nthe problem. The two Haiqu variants require the user's Haiqu API key; the\ntwo baselines run with only open-source packages.\n\nArgs:\n algorithm_key: Algorithm identifier from ``list_haiqu_algorithms``\n (e.g. \"lr-qaoa\").","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/qakb/algorithms/{algorithm_key}/recipe","href":"/api-reference/get-haiqu-algorithm-recipe","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/haiqu/cc26807bbccf8c6c/preload-fonts.js"],"openApiReferenceData":{"operation":{"summary":"Get Haiqu Algorithm Recipe","description":"Return a complete, runnable Python script for one algorithm.\n\nUse this tool when the user wants to run an algorithm, see its code, asks\n\"how do I run LR-QAOA\", \"give me the code\", \"show me a noise-mitigation\nbenchmark\", or \"benchmark this on a noisy device\". Get the key from\n``list_haiqu_algorithms`` first if the user did not give an exact one.\n\nThe returned ``code`` is self-contained: it runs the algorithm across four\nvariants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full\nHaiqu stack with error mitigation) on one problem instance and prints an\napproximation-ratio comparison. The user can run it as-is or edit the\nclearly marked EDIT-HERE block (graph, layers, shots, device) to change\nthe problem. The two Haiqu variants require the user's Haiqu API key; the\ntwo baselines run with only open-source packages.\n\nArgs:\n algorithm_key: Algorithm identifier from ``list_haiqu_algorithms``\n (e.g. \"lr-qaoa\").","operationId":"get_haiqu_algorithm_recipe","security":["6b8a9652-a969-40d2-aa95-eac1c96ba859","792bae4c-6da4-4ee3-8c8d-88951717abd6"],"parameters":["4d512e4c-1aa0-46e5-bfb1-70929e60024c"],"responses":{"200":"8c0cfd0e-a97f-409a-8cb7-61e32f646155","422":"0ae10c8c-f50b-4215-ab15-a7cf93886f7a"},"method":"get","type":"path","servers":[],"path":"/ai/qakb/algorithms/{algorithm_key}/recipe","baseUrlOptions":[],"title":"Get Haiqu Algorithm Recipe","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"4d512e4c-1aa0-46e5-bfb1-70929e60024c":{"name":"algorithm_key","in":"path","required":true,"schema":{"type":"string","title":"Algorithm Key","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"responses":{"8c0cfd0e-a97f-409a-8cb7-61e32f646155":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"algorithm":{"type":"string","title":"Algorithm","description":"Algorithm key the recipe is for.","isRequired":true,"uniqueKey":"algorithm","typeLabel":"string"},"code":{"type":"string","title":"Code","description":"Complete, copy-pasteable Python script. Runs locally and on Haiqu.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"note":{"type":"string","title":"Note","description":"How to run it + which variants need a Haiqu API key.","isRequired":true,"uniqueKey":"note","typeLabel":"string"},"language":{"type":"string","title":"Language","description":"Source language of the recipe.","default":"python","uniqueKey":"language","typeLabel":"string"},"steps":{"items":{"properties":{"id":{"type":"string","title":"Id","description":"Stable step identifier (e.g. 'show_recipe', 'exec_recipe', 'submit_baseline_ideal'). The orchestrating LLM uses these to track progress and reference steps in subsequent turns.","isRequired":true,"uniqueKey":"steps.items.[INDEX].id","typeLabel":"string"},"title":{"type":"string","title":"Title","description":"Short human-readable title.","isRequired":true,"uniqueKey":"steps.items.[INDEX].title","typeLabel":"string"},"intent":{"type":"string","title":"Intent","description":"One-sentence explanation of why this step exists.","isRequired":true,"uniqueKey":"steps.items.[INDEX].intent","typeLabel":"string"},"render_before":{"items":{"type":"string","uniqueKey":"steps.items.[INDEX].render_before.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Render Before","description":"Discrete items to render in chat BEFORE the step's tool call. Each item is one instruction (a code block to paste, a tool payload to render, etc.).","uniqueKey":"steps.items.[INDEX].render_before","typeLabel":"string[]"},"render_after":{"items":{"type":"string","uniqueKey":"steps.items.[INDEX].render_after.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Render After","description":"Discrete items to render AFTER the step's tool call returns. Include the experiment dashboard URL on every step that touches an experiment so the user can drill in mid-run.","uniqueKey":"steps.items.[INDEX].render_after","typeLabel":"string[]"}},"type":"object","required":["id","title","intent"],"title":"RecipeStep","description":"One step in the demo orchestration plan returned alongside a recipe.\n\nThe orchestrating LLM walks ``RecipeResponse.steps`` in order. For each\nstep it renders the ``render_before`` items, makes any tool call implied\nby the step, then renders the ``render_after`` items. Algorithm-specific\ncontent (top bitstrings vs. decoded string vs. expectation value) is not\nencoded here; the step instructions point the LLM at sandbox-side hooks\n(``compute_results``, ``format_headline``) that each recipe defines.","uniqueKey":"steps.items.[INDEX]","typeLabel":"RecipeStep · object"},"type":"array","title":"Steps","description":"Ordered demo plan. The orchestrating LLM should walk these in order, rendering the indicated artifacts inline. The plan is algorithm-agnostic in shape; algorithm-specific render content comes from sandbox-side hooks the recipe defines (``compute_results``, ``format_headline``).","uniqueKey":"steps","typeLabel":"RecipeStep · object[]"}},"type":"object","required":["algorithm","code","note"],"title":"RecipeResponse","description":"A self-contained, runnable Python script for one algorithm,\nplus a per-algorithm demo orchestration plan.","examples":[{"algorithm":"lr-qaoa","code":"from qiskit import QuantumCircuit\n# ... verified internals inlined here ...\nMANIFEST = {'algorithm': 'lr-qaoa', 'n_qubits': 8, 'qasm': '...'}\n","language":"python","note":"Run: pip install qiskit qiskit-aer qiskit-ibm-runtime networkx numpy; python the_file.py. The haiqu_run + haiqu_full variants additionally need `pip install haiqu-sdk` and HAIQU_API_KEY; the two baselines run without them.","steps":[{"id":"show_recipe","intent":"User reads what is about to execute before any side effects.","render_after":[],"render_before":["Paste the `code` field as a fenced Python block.","Point out the EDIT-HERE region."],"title":"Show the recipe code"}]}],"uniqueKey":"","typeLabel":"RecipeResponse · object"},"examples":{"Example":{"title":"Example","value":{"algorithm":"lr-qaoa","code":"from qiskit import QuantumCircuit\n# ... verified internals inlined here ...\nMANIFEST = {'algorithm': 'lr-qaoa', 'n_qubits': 8, 'qasm': '...'}\n","language":"python","note":"Run: pip install qiskit qiskit-aer qiskit-ibm-runtime networkx numpy; python the_file.py. The haiqu_run + haiqu_full variants additionally need `pip install haiqu-sdk` and HAIQU_API_KEY; the two baselines run without them.","steps":[{"id":"show_recipe","intent":"User reads what is about to execute before any side effects.","render_after":[],"render_before":["Paste the `code` field as a fenced Python block.","Point out the EDIT-HERE region."],"title":"Show the recipe code"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"0ae10c8c-f50b-4215-ab15-a7cf93886f7a":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6b8a9652-a969-40d2-aa95-eac1c96ba859":{"APIKeyQuery":{"type":"apiKey","in":"query","name":"HAIQU_API_KEY","scopes":[],"schemeName":"APIKeyQuery"}},"792bae4c-6da4-4ee3-8c8d-88951717abd6":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"authorization","scopes":[],"schemeName":"APIKeyHeader"}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"query","name":"HAIQU_API_KEY","scopes":[],"schemeName":"APIKeyQuery"},"schema":{"title":"HAIQU_API_KEY","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyQuery","name":"HAIQU_API_KEY"}],"title":"APIKeyQuery"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"authorization","scopes":[],"schemeName":"APIKeyHeader"},"schema":{"title":"authorization","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"authorization"}],"title":"APIKeyHeader"}]},"originalFileLocation":"https://api.haiqu.ai/openapi.json"},"subdomain":"haiqu","siteName":"Haiqu","title":"Get Haiqu Algorithm Recipe - Haiqu","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T09:20:14.409Z","originalFileLocation":"api-reference/get-haiqu-algorithm-recipe.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=\"system\"}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=\"Return a complete, runnable Python script for one algorithm. Use this tool when the user wants to run an algorithm, see its code, asks \u0026quot;how do I run LR-QAOA\u0026quot;, \u0026quot;give me the code\u0026quot;, \u0026quot;show me a noise-mitigation benchmark\u0026quot;, or \u0026quot;benchmark this on a noisy device\u0026quot;. Get the key from list_haiqu_algorithms first if the user did not give an exact one. The returned code is self-contained: it runs the algorithm across four variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full Haiqu stack with error mitigation) on one problem instance and prints an approximation-ratio comparison. The user can run it as-is or edit the clearly marked EDIT-HERE block (graph, layers, shots, device) to change the problem. The two Haiqu variants require the user\u0026#x27;s Haiqu API key; the two baselines run with only open-source packages. Args: algorithm_key: Algorithm identifier from list_haiqu_algorithms (e.g. \u0026quot;lr-qaoa\u0026quot;).\">\u003cmeta data-mint-head name=\"application-name\" content=\"Haiqu\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_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/haiqu/oEFiEtbJmeciuADt/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Haiqu Algorithm Recipe - Haiqu\">\u003cmeta data-mint-head property=\"og:description\" content=\"Return a complete, runnable Python script for one algorithm. Use this tool when the user wants to run an algorithm, see its code, asks \u0026quot;how do I run LR-QAOA\u0026quot;, \u0026quot;give me the code\u0026quot;, \u0026quot;show me a noise-mitigation benchmark\u0026quot;, or \u0026quot;benchmark this on a noisy device\u0026quot;. Get the key from list_haiqu_algorithms first if the user did not give an exact one. The returned code is self-contained: it runs the algorithm across four variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full Haiqu stack with error mitigation) on one problem instance and prints an approximation-ratio comparison. The user can run it as-is or edit the clearly marked EDIT-HERE block (graph, layers, shots, device) to change the problem. The two Haiqu variants require the user\u0026#x27;s Haiqu API key; the two baselines run with only open-source packages. Args: algorithm_key: Algorithm identifier from list_haiqu_algorithms (e.g. \u0026quot;lr-qaoa\u0026quot;).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Haiqu\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://haiqu.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Get+Haiqu+Algorithm+Recipe\u0026amp;description=Return+a+complete%2C+runnable+Python+script+for+one+algorithm.%0A%0AUse+this+tool+when+the+user+wants+to+run+an+algorithm%2C+see+its+code%2C+asks%0A%22how+do+I+run+LR-QAOA%22%2C+\u0026amp;theme=b45bed329f6ae428ea806877\u0026amp;signature=f2f70d8cc193a719546f7ec3d96d61ad7d6ea2f4e9c8fa1e0a01e0f162ea2be6\">\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=\"Get Haiqu Algorithm Recipe - Haiqu\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Return a complete, runnable Python script for one algorithm. Use this tool when the user wants to run an algorithm, see its code, asks \u0026quot;how do I run LR-QAOA\u0026quot;, \u0026quot;give me the code\u0026quot;, \u0026quot;show me a noise-mitigation benchmark\u0026quot;, or \u0026quot;benchmark this on a noisy device\u0026quot;. Get the key from list_haiqu_algorithms first if the user did not give an exact one. The returned code is self-contained: it runs the algorithm across four variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full Haiqu stack with error mitigation) on one problem instance and prints an approximation-ratio comparison. The user can run it as-is or edit the clearly marked EDIT-HERE block (graph, layers, shots, device) to change the problem. The two Haiqu variants require the user\u0026#x27;s Haiqu API key; the two baselines run with only open-source packages. Args: algorithm_key: Algorithm identifier from list_haiqu_algorithms (e.g. \u0026quot;lr-qaoa\u0026quot;).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://haiqu.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Get+Haiqu+Algorithm+Recipe\u0026amp;description=Return+a+complete%2C+runnable+Python+script+for+one+algorithm.%0A%0AUse+this+tool+when+the+user+wants+to+run+an+algorithm%2C+see+its+code%2C+asks%0A%22how+do+I+run+LR-QAOA%22%2C+\u0026amp;theme=b45bed329f6ae428ea806877\u0026amp;signature=f2f70d8cc193a719546f7ec3d96d61ad7d6ea2f4e9c8fa1e0a01e0f162ea2be6\">\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/haiqu/oEFiEtbJmeciuADt/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Haiqu\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/get-haiqu-algorithm-recipe.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.haiqu.ai/#organization\",\"name\":\"Haiqu\",\"url\":\"https://docs.haiqu.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/haiqu/naR3-ajV6yLCfg5I/logo/logo-text-black.svg?fit=max\u0026auto=format\u0026n=naR3-ajV6yLCfg5I\u0026q=85\u0026s=2010ac2de39f76a994323bd9afa6aec1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.haiqu.ai#website\",\"name\":\"Haiqu\",\"url\":\"https://docs.haiqu.ai\",\"publisher\":{\"@id\":\"https://docs.haiqu.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe#webpage\",\"url\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe\",\"name\":\"Get Haiqu Algorithm Recipe\",\"description\":\"Return a complete, runnable Python script for one algorithm. Use this tool when the user wants to run an algorithm, see its code, asks \\\"how do I run LR-QAOA\\\", \\\"give me the code\\\", \\\"show me a noise-mitigation benchmark\\\", or \\\"benchmark this on a noisy device\\\". Get the key from list_haiqu_algorithms first if the user did not give an exact one. The returned code is self-contained: it runs the algorithm across four variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full Haiqu stack with error mitigation) on one problem instance and prints an approximation-ratio comparison. The user can run it as-is or edit the clearly marked EDIT-HERE block (graph, layers, shots, device) to change the problem. The two Haiqu variants require the user's Haiqu API key; the two baselines run with only open-source packages. Args: algorithm_key: Algorithm identifier from list_haiqu_algorithms (e.g. \\\"lr-qaoa\\\").\",\"dateModified\":\"2026-10-23T09:20:14.409Z\",\"isPartOf\":{\"@id\":\"https://docs.haiqu.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.haiqu.ai/api-reference/submit-circuit\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Haiqu Algorithm Recipe\",\"item\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe#apireference\",\"headline\":\"Get Haiqu Algorithm Recipe\",\"name\":\"Get Haiqu Algorithm Recipe\",\"description\":\"Return a complete, runnable Python script for one algorithm. Use this tool when the user wants to run an algorithm, see its code, asks \\\"how do I run LR-QAOA\\\", \\\"give me the code\\\", \\\"show me a noise-mitigation benchmark\\\", or \\\"benchmark this on a noisy device\\\". Get the key from list_haiqu_algorithms first if the user did not give an exact one. The returned code is self-contained: it runs the algorithm across four variants (ideal baseline, noisy baseline, transpiled-on-Haiqu run, full Haiqu stack with error mitigation) on one problem instance and prints an approximation-ratio comparison. The user can run it as-is or edit the clearly marked EDIT-HERE block (graph, layers, shots, device) to change the problem. The two Haiqu variants require the user's Haiqu API key; the two baselines run with only open-source packages. Args: algorithm_key: Algorithm identifier from list_haiqu_algorithms (e.g. \\\"lr-qaoa\\\").\",\"url\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe\",\"mainEntityOfPage\":{\"@id\":\"https://docs.haiqu.ai/api-reference/get-haiqu-algorithm-recipe#webpage\"},\"dateModified\":\"2026-10-23T09:20:14.409Z\",\"publisher\":{\"@id\":\"https://docs.haiqu.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.haiqu.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Haiqu\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Haiqu\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/get-haiqu-algorithm-recipe.md","siteName":"Haiqu","nav":{"global":null,"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":""}]},{"tab":"Haiqu AgenticOS","pages":[{"title":"Haiqu AgenticOS","href":"/agentic-os"}]},{"tab":"Guides","versions":[{"version":"1.7.0","groups":[{"group":"Quick Start","pages":[{"title":"Get Started","href":"/quickstart/qs_intro"},{"title":"Local Installation","href":"/quickstart/qs_local"},{"title":"Update the SDK","href":"/quickstart/update-the-sdk"},{"title":"AI Assisted Development","href":"/quickstart/ai-assisted-development"}]},{"group":"Core features","pages":[{"title":"SDK Overview","href":"/core_features/overview"},{"title":"Dashboard Overview","href":"/dashboard-overview"},{"title":"Distribution Loading","href":"/core_features/data_loading_dist"},{"title":"Data Loading","href":"/core_features/data_loading_vect"},{"title":"Feature embedding","href":"/core_features/data_loading_isom"},{"title":"Compression","href":"/core_features/compression"},{"title":"Working with Haiqu Circuits","href":"/core_features/haiqu_circuits"},{"title":"Transpilation","href":"/core_features/transpilation"},{"title":"Measuring in different bases","href":"/core_features/readout_bases"},{"title":"Error Mitigation","href":"/core_features/error_shield"},{"title":"Variational algorithms","href":"/core_features/qml"},{"title":"SU(2)-equivariant gates","href":"/core_features/equivariant_gates"},{"title":"Optimization \u0026 Postprocessing","href":"/core_features/postprocessing"},{"title":"Experiment Tracking","href":"/core_features/exp_tracking"},{"title":"Experiment Sharing","href":"/core_features/experiment-sharing"},{"title":"Circuit Analytics","href":"/core_features/circ_analytics"},{"title":"Job Performance Metrics","href":"/core_features/quality"}]},{"group":"Hybrid programs","pages":[{"title":"Overview","href":"/hybrid/overview"},{"title":"Building and running flows","href":"/hybrid/flows"}]},{"group":"Integrations","pages":[{"title":"IBM Quantum","href":"/integrations/ibm"},{"title":"Amazon Braket","href":"/integrations/amazon"},{"title":"IonQ Cloud","href":"/integrations/ionq"},{"title":"IQM Resonance","href":"/integrations/iqm"}]},{"group":"Catalog","pages":[{"title":"QML building blocks","href":"/catalog/qml_building_blocks"},{"title":"Benchmarks data sheet","href":"/catalog/datasheet"},{"title":"Characteristic Functions","href":"/catalog/characteristic_functions"},{"title":"Multivariate Probability Distributions","href":"/catalog/multivariate_distributions"}]}]}]},{"tab":"Dashboard","pages":[{"title":"Dashboard","href":"/dashboard/overview"}]},{"tab":"SDK Reference","versions":[{"version":"1.7.0","groups":[{"group":"Core platform functions","pages":[{"title":"Login","href":"/reference/core/login"},{"title":"Init or Update Experiment","href":"/reference/core/init"},{"title":"Log Objects","href":"/reference/core/log"},{"title":"List Objects","href":"/reference/core/list"},{"title":"Get Objects","href":"/reference/core/get"},{"title":"Draw","href":"/reference/core/draw"},{"title":"Credentials Helpers","href":"/reference/core/credentials_helpers"},{"title":"Health Check","href":"/reference/core/health_check"}]},{"group":"Data loading","pages":[{"title":"Distribution Loading","href":"/reference/data/distribution"},{"title":"Multivariate Distribution Loading","href":"/reference/data/multivariate_distribution"},{"title":"Vector Loading","href":"/reference/data/vector"},{"title":"Block-wise Vector Loading","href":"/reference/data/block_vector"},{"title":"Entangled Manifold Embedding","href":"/reference/data/entangled_manifold_embedding"},{"title":"MPS Loading","href":"/reference/data/mps_loading"},{"title":"Function Loading","href":"/reference/data/function"},{"title":"Fourier Loading","href":"/reference/data/fourier"},{"title":"Circuit Synthesis Options","href":"/reference/data/synthesis_options"}]},{"group":"Middleware","pages":[{"title":"State Compression","href":"/reference/middleware/compression"},{"title":"Observable Backpropagation","href":"/reference/middleware/observable-backpropagation"}]},{"group":"Circuit Execution","pages":[{"title":"Flow","href":"/reference/run/flow"},{"title":"Hybrid Program","href":"/reference/run/hybrid_program"},{"title":"Run","href":"/reference/run/run"},{"title":"Statevector Run","href":"/reference/run/statevector_run"},{"title":"Transpile","href":"/reference/run/transpile"}]},{"group":"Optimization","pages":[{"title":"Problem Formulations","href":"/reference/optimization/problem"},{"title":"Postprocessing","href":"/reference/optimization/postprocessing"}]},{"group":"Variational Algorithms","pages":[{"title":"Variational Quantum Optimization","href":"/reference/qml/variational"},{"title":"SU(2)-equivariant gates","href":"/reference/qml/equivariant"},{"title":"Pretrain","href":"/reference/qml/pretrain"}]},{"group":"SKQD","pages":[{"title":"Postprocessing","href":"/reference/skqd/postprocess_skqd"},{"title":"Configuration recovery","href":"/reference/skqd/configuration_recovery"},{"title":"Hubbard Model","href":"/reference/skqd/hubbard"},{"title":"SIAM Model","href":"/reference/skqd/siam"},{"title":"SKQD Helpers","href":"/reference/skqd/helpers"}]}]}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Submit Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /circuits","href":"/api-reference/submit-circuit"},{"title":"Transpile Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /circuits/transpile","href":"/api-reference/transpile-circuit"},{"title":"Build Lr Qaoa Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /circuits/lr_qaoa","href":"/api-reference/build-lr-qaoa-circuit"},{"title":"Backpropagate Observables","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /circuits/{circuit_id}/backpropagate_observables","href":"/api-reference/backpropagate-observables"},{"title":"Compute Analytics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /circuits/{circuit_id}/compute_analytics/{analytics_type}","href":"/api-reference/compute-analytics"},{"title":"Get Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /circuits/{circuit_id}","href":"/api-reference/get-circuit"},{"title":"Delete Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json delete /circuits/{circuit_id}","href":"/api-reference/delete-circuit"},{"title":"Get Circuit By Hash","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/circuits/{circuit_hash}","href":"/api-reference/get-circuit-by-hash"},{"title":"Post Metrics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /experiments/{experiment_id}/circuits/{circuit_hash}/metrics","href":"/api-reference/post-metrics"},{"title":"Get Analytics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /circuits/{circuit_id}/metrics","href":"/api-reference/get-analytics"},{"title":"Get Metrics Evolution","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /circuits/{circuit_id}/metrics_evolution","href":"/api-reference/get-metrics-evolution"},{"title":"Collect Csp Report","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /csp","href":"/api-reference/collect-csp-report"},{"title":"List Devices Endpoint","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /devices","href":"/api-reference/list-devices-endpoint"},{"title":"Get Device Endpoint","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /devices/{device_id}","href":"/api-reference/get-device-endpoint"},{"title":"Get Device Gate Map","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /devices/{device_id}/gate_map","href":"/api-reference/get-device-gate-map"},{"title":"List Experiments","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments","href":"/api-reference/list-experiments"},{"title":"Create Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /experiments","href":"/api-reference/create-experiment"},{"title":"Init Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /experiments/init","href":"/api-reference/init-experiment"},{"title":"Get Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}","href":"/api-reference/get-experiment"},{"title":"Update Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json put /experiments/{experiment_id}","href":"/api-reference/update-experiment"},{"title":"Delete Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json delete /experiments/{experiment_id}","href":"/api-reference/delete-experiment"},{"title":"Post Metrics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /experiments/{experiment_id}/metrics","href":"/api-reference/post-metrics-1"},{"title":"List Circuits","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/circuits","href":"/api-reference/list-circuits"},{"title":"List Jobs","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/jobs","href":"/api-reference/list-jobs"},{"title":"List Artifacts","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/artifacts","href":"/api-reference/list-artifacts"},{"title":"Get Artifact","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/artifacts/{artifact_name}","href":"/api-reference/get-artifact"},{"title":"Submit Local Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /jobs","href":"/api-reference/submit-local-job"},{"title":"Post Metrics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /experiments/{experiment_id}/jobs/{job_id}/metrics","href":"/api-reference/post-metrics-2"},{"title":"Get Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /jobs/{job_id}","href":"/api-reference/get-job"},{"title":"Get Local Job By Hash","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /experiments/{experiment_id}/jobs/{job_hash}","href":"/api-reference/get-local-job-by-hash"},{"title":"Cancel Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /jobs/{job_id}/cancel","href":"/api-reference/cancel-job"},{"title":"Restart Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /jobs/{job_id}/restart","href":"/api-reference/restart-job"},{"title":"Get User","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /user","href":"/api-reference/get-user"},{"title":"Data Loading","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /data_loading","href":"/api-reference/data-loading"},{"title":"Data Loading Estimates","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /data_loading_estimates","href":"/api-reference/data-loading-estimates"},{"title":"Flow","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /flow","href":"/api-reference/flow"},{"title":"Run","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /run","href":"/api-reference/run"},{"title":"Compression","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /compression","href":"/api-reference/compression"},{"title":"Compression Estimates","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /compression_estimates","href":"/api-reference/compression-estimates"},{"title":"Postprocess Counts","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /postprocess","href":"/api-reference/postprocess-counts"},{"title":"Variational","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /variational","href":"/api-reference/variational"},{"title":"Pretraining","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /pretraining","href":"/api-reference/pretraining"},{"title":"Postprocess Skqd","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /postprocess_skqd","href":"/api-reference/postprocess-skqd"},{"title":"Create New Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/create_new_experiment","href":"/api-reference/create-new-experiment"},{"title":"List Experiments Mcp","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/","href":"/api-reference/list-experiments-mcp"},{"title":"Get Experiment By Name","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/by_name/{experiment_name}","href":"/api-reference/get-experiment-by-name"},{"title":"Get Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}","href":"/api-reference/get-experiment-1"},{"title":"Update Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json put /ai/{experiment_id}","href":"/api-reference/update-experiment-1"},{"title":"Get Experiment Url On Dashboard By Name","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/dashboard_url_by_name/{experiment_name}","href":"/api-reference/get-experiment-url-on-dashboard-by-name"},{"title":"List Circuits In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/circuits","href":"/api-reference/list-circuits-in-experiment"},{"title":"List Jobs","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/jobs","href":"/api-reference/list-jobs-1"},{"title":"Log Artifact In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/{experiment_id}/log_artifact","href":"/api-reference/log-artifact-in-experiment"},{"title":"List Artifacts In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifacts","href":"/api-reference/list-artifacts-in-experiment"},{"title":"Get Artifact In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifact","href":"/api-reference/get-artifact-in-experiment"},{"title":"Get Artifact Content In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifact/content","href":"/api-reference/get-artifact-content-in-experiment"},{"title":"Get Artifact Download Url In Experiment","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifact/download_url","href":"/api-reference/get-artifact-download-url-in-experiment"},{"title":"Submit Circuit For Analytics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/submit_circuit_for_analytics","href":"/api-reference/submit-circuit-for-analytics"},{"title":"Backpropagate Observables Mcp","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/backpropagate_observables","href":"/api-reference/backpropagate-observables-mcp"},{"title":"Get Circuit By Id","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/circuit/{circuit_id}","href":"/api-reference/get-circuit-by-id"},{"title":"Get Circuit Metrics Evolution","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/circuit/{circuit_id}/metrics_evolution","href":"/api-reference/get-circuit-metrics-evolution"},{"title":"Compute Circuit Analytics","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/compute_circuit_analytics","href":"/api-reference/compute-circuit-analytics"},{"title":"List Children Circuits","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/circuit/{circuit_id}/children","href":"/api-reference/list-children-circuits"},{"title":"List Jobs For Circuit","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/circuit/{circuit_id}/jobs","href":"/api-reference/list-jobs-for-circuit"},{"title":"Transpile Circuits","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/transpile_circuits","href":"/api-reference/transpile-circuits"},{"title":"Get Job Results And Status","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/jobs/{job_id}/results","href":"/api-reference/get-job-results-and-status"},{"title":"Cancel Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/jobs/{job_id}/cancel","href":"/api-reference/cancel-job-1"},{"title":"Restart Job","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/jobs/{job_id}/restart","href":"/api-reference/restart-job-1"},{"title":"List Qpus And Simulators","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/list_qpus_and_simulators","href":"/api-reference/list-qpus-and-simulators"},{"title":"Get Device Details","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/device/{device_id}","href":"/api-reference/get-device-details"},{"title":"Run Circuits On Qpu Or Simulator","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/run_circuits_on_qpu_or_simulator","href":"/api-reference/run-circuits-on-qpu-or-simulator"},{"title":"Compress Circuit With State Compression","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/compress_circuit_with_state_compression","href":"/api-reference/compress-circuit-with-state-compression"},{"title":"Estimate State Compression","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/estimate_state_compression","href":"/api-reference/estimate-state-compression"},{"title":"Load Classical Data With Data Loading","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/load_classical_data_with_data_loading","href":"/api-reference/load-classical-data-with-data-loading"},{"title":"Estimate Data Loading","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/estimate_data_loading","href":"/api-reference/estimate-data-loading"},{"title":"List Haiqu Algorithms","description":"List the available quantum algorithms in the catalog.\n\nUse this tool when the user asks any of: \"what quantum algorithms can\nI run?\", \"what demos / examples are available?\", \"show me a quantum\nbenchmark\", or names an algorithm family (\"do you have QAOA / VQE /\noptimization?\").\n\nReturns ALL algorithms in the catalog (not only the runnable ones), each\nwith a ``runnable`` flag. When picking an algorithm for an actual demo\nvia ``get_haiqu_algorithm_recipe``, filter to ``runnable=True``; entries\nwith ``runnable=False`` are roadmap items that have a directory + meta\nbut no shipped recipe yet.\n\nMatch the user's phrasing to a key when they name a family (e.g. \"QAOA\"\n-> \"lr-qaoa\"). If they ask for a non-runnable algorithm by name, tell\nthem it's planned but not demo-ready, and offer a runnable alternative.","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/qakb/algorithms","href":"/api-reference/list-haiqu-algorithms"},{"title":"Get Haiqu Algorithm Recipe","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /ai/qakb/algorithms/{algorithm_key}/recipe","href":"/api-reference/get-haiqu-algorithm-recipe"},{"title":"Build Lr Qaoa Circuit Mcp","description":"Build and store a linear-ramp QAOA circuit for a QUBO problem.\n\nUse this tool to turn a combinatorial optimization problem into a runnable\ncircuit without writing QASM. Generation is synchronous: the circuit is\nstored and returned immediately, with core analytics already computed.\n\nWhen to Use:\n - Call this when the user has a QUBO or MaxCut-style problem in LP format\n and wants to run QAOA on it.\n - Call this instead of ``submit_circuit_for_analytics`` when Haiqu should\n construct the ansatz rather than the caller.\n\nConstraints:\n - ``lp_problem`` must parse as an LP-format QUBO with binary variables.\n - ``alphas`` and ``betas`` must each have length ``p`` when supplied. Omit\n both to use the linear ramp defined by ``delta``.\n - Nothing is executed here. Run the returned ``id`` with\n ``run_circuits_on_qpu_or_simulator``.\n\nNotes:\n - The linear-ramp schedule needs no classical outer loop, which is what\n makes LR-QAOA cheap compared with parameter-optimized QAOA.\n - Keep the same ``lp_problem`` string for\n ``postprocess_measurement_counts`` so the objective matches.\n\nArgs:\n user: Authenticated user resolved from the API key.\n data: Problem definition, layer count, and optional schedule.\n db: Active database session.\n\nReturns:\n The stored circuit enriched with MCP context text.\n\nRaises:\n HTTPException: Raised with ``404`` when the experiment is not available to\n the caller, or ``500`` when circuit generation fails.","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/build_lr_qaoa_circuit","href":"/api-reference/build-lr-qaoa-circuit-mcp"},{"title":"Postprocess Measurement Counts","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/postprocess_measurement_counts","href":"/api-reference/postprocess-measurement-counts"},{"title":"Run Variational Workload","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/run_variational_workload","href":"/api-reference/run-variational-workload"},{"title":"Postprocess Skqd Samples","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/postprocess_skqd_samples","href":"/api-reference/postprocess-skqd-samples"},{"title":"Run Hybrid Flow","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/run_hybrid_flow","href":"/api-reference/run-hybrid-flow"},{"title":"Notify Certificate Code","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /certificate-codes/{code}/notify","href":"/api-reference/notify-certificate-code"},{"title":"Root","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /","href":"/api-reference/root"},{"title":"Version","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /version","href":"/api-reference/version"},{"title":"Get Benchmarks","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /help/benchmarks","href":"/api-reference/get-benchmarks"},{"title":"Health Live","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /health/live","href":"/api-reference/health-live"},{"title":"Health Ready","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /health/ready","href":"/api-reference/health-ready"},{"title":"Health Auth","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /health/auth","href":"/api-reference/health-auth"},{"title":"Mcp Meta","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json get /mcp/meta","href":"/api-reference/mcp-meta"}]}]},{"tab":"Publications","pages":[{"title":"Publications","href":"/publications"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq"}]}]},"basePath":"","title":"Get Haiqu Algorithm Recipe - Haiqu","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}