Backpropagate observables through a circuit to shorten what must be run.
Use this tool to move part of the computation from the circuit into the
observable: Haiqu rewrites each observable through the tail of the circuit and
stores a correspondingly shortened circuit. Running the shorter circuit with
the rewritten observable estimates the same expectation value with less
hardware noise.
When to Use:
Call this when the user wants expectation values from a circuit that is
too deep to run faithfully on hardware.
Call this before run_circuits_on_qpu_or_simulator for
expectation-value workloads, and pass the returned circuit and
observable together.
Constraints:
Backpropagation is synchronous and runs no quantum job.
Each input observable yields one output circuit, returned under the same
key you gave the observable: run optimized_circuit_ids[name] with
backpropagated_observables[name].
Truncation budgets trade accuracy for depth. Without
max_error_total or max_error_per_slice the rewritten observable
can grow large.
Notes:
Pauli coefficients are given and returned as (pauli, real, imaginary)
triples, one per term — not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and
run_circuits_on_qpu_or_simulator take.
Compare the returned circuits against the input with
get_circuit_by_id to show how much depth was removed.
Args:
user: Authenticated user resolved from the API key.
data: Circuit identifier, observables, and optional truncation budgets.
db: Active database session.
Returns:
The generated circuit IDs with their rewritten observables.
Raises:
HTTPException: Raised with 404 when the circuit is not available to
the caller, 422 when an observable cannot be parsed, or 501
when the backpropagation dependency is unavailable.
Define payload for backpropagating observables through a circuit.
Attributes:
circuit_id: Circuit to backpropagate through.
observables: Observables to rewrite, keyed by caller-chosen names. Each is
a list of (pauli, real, imaginary) terms.
max_qwc_groups: Optional cap on qubit-wise-commuting groups.
max_error_total: Optional total truncation error budget.
max_error_per_slice: Optional per-slice truncation error budget.
circuit_id
string
required
observables
Observables · object
required
Observables to backpropagate, keyed by a name you choose. Each observable is a list of Pauli terms given as [pauli_string, real_coefficient, imaginary_coefficient], for example {"energy": [["ZZ", 1.0, 0.0], ["XX", 0.5, 0.0]]}. The results come back under the same keys.
Show child attributes
max_qwc_groups
integer | null
Optional cap on the number of qubit-wise-commuting groups retained.
max_error_total
number | null
Optional total truncation error budget across the backpropagation.
max_error_per_slice
number | null
Optional truncation error budget per circuit slice.
Response
Successful Response
Represent the outcome of an observable backpropagation.
Attributes:
optimized_circuit_ids: Circuit produced for each input observable, keyed by
the input's name.
backpropagated_observables: Rewritten observables as
(pauli, real, imaginary) term lists, keyed by the input's name.
context: Summary of what was produced and the next step.
optimized_circuit_ids
Optimized Circuit Ids · object
required
Show child attributes
backpropagated_observables
Backpropagated Observables · object
required
Show child attributes
context
string
required
{"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"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/backpropagate-observables-mcp","slug":"/api-reference/backpropagate-observables-mcp","pageMetadata":{"title":"Backpropagate Observables Mcp","description":"Backpropagate observables through a circuit to shorten what must be run.\n\nUse this tool to move part of the computation from the circuit into the\nobservable: Haiqu rewrites each observable through the tail of the circuit and\nstores a correspondingly shortened circuit. Running the shorter circuit with\nthe rewritten observable estimates the same expectation value with less\nhardware noise.\n\nWhen to Use:\n - Call this when the user wants expectation values from a circuit that is\n too deep to run faithfully on hardware.\n - Call this before ``run_circuits_on_qpu_or_simulator`` for\n expectation-value workloads, and pass the returned circuit and\n observable together.\n\nConstraints:\n - Backpropagation is synchronous and runs no quantum job.\n - Each input observable yields one output circuit, returned under the same\n key you gave the observable: run ``optimized_circuit_ids[name]`` with\n ``backpropagated_observables[name]``.\n - Truncation budgets trade accuracy for depth. Without\n ``max_error_total`` or ``max_error_per_slice`` the rewritten observable\n can grow large.\n\nNotes:\n - Pauli coefficients are given and returned as ``(pauli, real, imaginary)``\n triples, one per term -- not as the parallel ``(pauli_strings,\n coefficients)`` lists that ``run_variational_workload`` and\n ``run_circuits_on_qpu_or_simulator`` take.\n - Compare the returned circuits against the input with\n ``get_circuit_by_id`` to show how much depth was removed.\n\nArgs:\n user: Authenticated user resolved from the API key.\n data: Circuit identifier, observables, and optional truncation budgets.\n db: Active database session.\n\nReturns:\n The generated circuit IDs with their rewritten observables.\n\nRaises:\n HTTPException: Raised with ``404`` when the circuit is not available to\n the caller, ``422`` when an observable cannot be parsed, or ``501``\n when the backpropagation dependency is unavailable.","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/backpropagate_observables","href":"/api-reference/backpropagate-observables-mcp","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 li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Backpropagate observables through a circuit to shorten what must be run.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Use this tool to move part of the computation from the circuit into the\\nobservable: Haiqu rewrites each observable through the tail of the circuit and\\nstores a correspondingly shortened circuit. Running the shorter circuit with\\nthe rewritten observable estimates the same expectation value with less\\nhardware noise.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"When to Use:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Call this when the user wants expectation values from a circuit that is\\ntoo deep to run faithfully on hardware.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Call this before \", _jsx(_components.code, {\n children: \"run_circuits_on_qpu_or_simulator\"\n }), \" for\\nexpectation-value workloads, and pass the returned circuit and\\nobservable together.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Constraints:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Backpropagation is synchronous and runs no quantum job.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Each input observable yields one output circuit, returned under the same\\nkey you gave the observable: run \", _jsx(_components.code, {\n children: \"optimized_circuit_ids[name]\"\n }), \" with\\n\", _jsx(_components.code, {\n children: \"backpropagated_observables[name]\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Truncation budgets trade accuracy for depth. Without\\n\", _jsx(_components.code, {\n children: \"max_error_total\"\n }), \" or \", _jsx(_components.code, {\n children: \"max_error_per_slice\"\n }), \" the rewritten observable\\ncan grow large.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Notes:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Pauli coefficients are given and returned as \", _jsx(_components.code, {\n children: \"(pauli, real, imaginary)\"\n }), \"\\ntriples, one per term — not as the parallel \", _jsx(_components.code, {\n children: \"(pauli_strings, coefficients)\"\n }), \" lists that \", _jsx(_components.code, {\n children: \"run_variational_workload\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"run_circuits_on_qpu_or_simulator\"\n }), \" take.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Compare the returned circuits against the input with\\n\", _jsx(_components.code, {\n children: \"get_circuit_by_id\"\n }), \" to show how much depth was removed.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Args:\\nuser: Authenticated user resolved from the API key.\\ndata: Circuit identifier, observables, and optional truncation budgets.\\ndb: Active database session.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Returns:\\nThe generated circuit IDs with their rewritten observables.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Raises:\\nHTTPException: Raised with \", _jsx(_components.code, {\n children: \"404\"\n }), \" when the circuit is not available to\\nthe caller, \", _jsx(_components.code, {\n children: \"422\"\n }), \" when an observable cannot be parsed, or \", _jsx(_components.code, {\n children: \"501\"\n }), \"\\nwhen the backpropagation dependency is unavailable.\"]\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":"Backpropagate Observables Mcp","description":"Backpropagate observables through a circuit to shorten what must be run.\n\nUse this tool to move part of the computation from the circuit into the\nobservable: Haiqu rewrites each observable through the tail of the circuit and\nstores a correspondingly shortened circuit. Running the shorter circuit with\nthe rewritten observable estimates the same expectation value with less\nhardware noise.\n\nWhen to Use:\n - Call this when the user wants expectation values from a circuit that is\n too deep to run faithfully on hardware.\n - Call this before ``run_circuits_on_qpu_or_simulator`` for\n expectation-value workloads, and pass the returned circuit and\n observable together.\n\nConstraints:\n - Backpropagation is synchronous and runs no quantum job.\n - Each input observable yields one output circuit, returned under the same\n key you gave the observable: run ``optimized_circuit_ids[name]`` with\n ``backpropagated_observables[name]``.\n - Truncation budgets trade accuracy for depth. Without\n ``max_error_total`` or ``max_error_per_slice`` the rewritten observable\n can grow large.\n\nNotes:\n - Pauli coefficients are given and returned as ``(pauli, real, imaginary)``\n triples, one per term -- not as the parallel ``(pauli_strings,\n coefficients)`` lists that ``run_variational_workload`` and\n ``run_circuits_on_qpu_or_simulator`` take.\n - Compare the returned circuits against the input with\n ``get_circuit_by_id`` to show how much depth was removed.\n\nArgs:\n user: Authenticated user resolved from the API key.\n data: Circuit identifier, observables, and optional truncation budgets.\n db: Active database session.\n\nReturns:\n The generated circuit IDs with their rewritten observables.\n\nRaises:\n HTTPException: Raised with ``404`` when the circuit is not available to\n the caller, ``422`` when an observable cannot be parsed, or ``501``\n when the backpropagation dependency is unavailable.","deprecated":null,"version":null,"openapi":"https://api.haiqu.ai/openapi.json post /ai/backpropagate_observables","href":"/api-reference/backpropagate-observables-mcp","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/haiqu/cc26807bbccf8c6c/preload-fonts.js"],"openApiReferenceData":{"operation":{"summary":"Backpropagate Observables Mcp","description":"Backpropagate observables through a circuit to shorten what must be run.\n\nUse this tool to move part of the computation from the circuit into the\nobservable: Haiqu rewrites each observable through the tail of the circuit and\nstores a correspondingly shortened circuit. Running the shorter circuit with\nthe rewritten observable estimates the same expectation value with less\nhardware noise.\n\nWhen to Use:\n - Call this when the user wants expectation values from a circuit that is\n too deep to run faithfully on hardware.\n - Call this before ``run_circuits_on_qpu_or_simulator`` for\n expectation-value workloads, and pass the returned circuit and\n observable together.\n\nConstraints:\n - Backpropagation is synchronous and runs no quantum job.\n - Each input observable yields one output circuit, returned under the same\n key you gave the observable: run ``optimized_circuit_ids[name]`` with\n ``backpropagated_observables[name]``.\n - Truncation budgets trade accuracy for depth. Without\n ``max_error_total`` or ``max_error_per_slice`` the rewritten observable\n can grow large.\n\nNotes:\n - Pauli coefficients are given and returned as ``(pauli, real, imaginary)``\n triples, one per term -- not as the parallel ``(pauli_strings,\n coefficients)`` lists that ``run_variational_workload`` and\n ``run_circuits_on_qpu_or_simulator`` take.\n - Compare the returned circuits against the input with\n ``get_circuit_by_id`` to show how much depth was removed.\n\nArgs:\n user: Authenticated user resolved from the API key.\n data: Circuit identifier, observables, and optional truncation budgets.\n db: Active database session.\n\nReturns:\n The generated circuit IDs with their rewritten observables.\n\nRaises:\n HTTPException: Raised with ``404`` when the circuit is not available to\n the caller, ``422`` when an observable cannot be parsed, or ``501``\n when the backpropagation dependency is unavailable.","operationId":"backpropagate_observables","requestBody":"06fde04d-32ea-4f2d-8680-79cb8a94c310","responses":{"200":"b5650288-da01-413d-b259-a34ede3c0d47","422":"91c0e31a-926d-4be8-bc7c-de3fddd4be21"},"security":["cb130ac1-1912-4d35-b4ec-9376c4e9b48a","b9ca4c33-0ea7-49f3-a797-71d6cee1b07d"],"method":"post","type":"path","servers":[],"path":"/ai/backpropagate_observables","baseUrlOptions":[],"title":"Backpropagate Observables Mcp","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"circuit_id":{"type":"string","title":"Circuit Id","isRequired":true,"uniqueKey":"circuit_id","typeLabel":"string"},"observables":{"additionalProperties":{"items":{"type":"object","_tupleOriginal":true,"properties":{"[0]":{"type":"string","uniqueKey":"observables.additionalProperties.items.[INDEX].[0]","typeLabel":"string"},"[1]":{"type":"number","uniqueKey":"observables.additionalProperties.items.[INDEX].[1]","typeLabel":"number"},"[2]":{"type":"number","uniqueKey":"observables.additionalProperties.items.[INDEX].[2]","typeLabel":"number"}},"uniqueKey":"observables.additionalProperties.items.[INDEX]","typeLabel":"tuple"},"type":"array","uniqueKey":"observables.additionalProperties","typeLabel":"tuple[]"},"type":"object","minProperties":1,"title":"Observables","description":"Observables to backpropagate, keyed by a name you choose. Each observable is a list of Pauli terms given as `[pauli_string, real_coefficient, imaginary_coefficient]`, for example `{\"energy\": [[\"ZZ\", 1.0, 0.0], [\"XX\", 0.5, 0.0]]}`. The results come back under the same keys.","isRequired":true,"uniqueKey":"observables","typeLabel":"Observables · object"},"max_qwc_groups":{"oneOf":[{"type":"integer","title":"Max Qwc Groups","description":"Optional cap on the number of qubit-wise-commuting groups retained.","uniqueKey":"max_qwc_groups.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Qwc Groups","description":"Optional cap on the number of qubit-wise-commuting groups retained.","uniqueKey":"max_qwc_groups.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_qwc_groups","typeLabel":"integer | null"},"max_error_total":{"oneOf":[{"type":"number","title":"Max Error Total","description":"Optional total truncation error budget across the backpropagation.","uniqueKey":"max_error_total.oneOf.0","typeLabel":"number"},{"type":"null","title":"Max Error Total","description":"Optional total truncation error budget across the backpropagation.","uniqueKey":"max_error_total.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_error_total","typeLabel":"number | null"},"max_error_per_slice":{"oneOf":[{"type":"number","title":"Max Error Per Slice","description":"Optional truncation error budget per circuit slice.","uniqueKey":"max_error_per_slice.oneOf.0","typeLabel":"number"},{"type":"null","title":"Max Error Per Slice","description":"Optional truncation error budget per circuit slice.","uniqueKey":"max_error_per_slice.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_error_per_slice","typeLabel":"number | null"}},"type":"object","required":["circuit_id","observables"],"title":"ContextBackpropagationSubmitModel","description":"Define payload for backpropagating observables through a circuit.\n\nAttributes:\n circuit_id: Circuit to backpropagate through.\n observables: Observables to rewrite, keyed by caller-chosen names. Each is\n a list of ``(pauli, real, imaginary)`` terms.\n max_qwc_groups: Optional cap on qubit-wise-commuting groups.\n max_error_total: Optional total truncation error budget.\n max_error_per_slice: Optional per-slice truncation error budget.","examples":[{"circuit_id":"circ-123","max_error_total":0.01,"observables":{"energy":[["ZZ",1,0]]}}],"uniqueKey":"","typeLabel":"ContextBackpropagationSubmitModel · object"},"examples":{"Example":{"title":"Example","value":{"circuit_id":"circ-123","max_error_total":0.01,"observables":{"energy":[["ZZ",1,0]]}}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"b5650288-da01-413d-b259-a34ede3c0d47":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"optimized_circuit_ids":{"additionalProperties":{"type":"string","uniqueKey":"optimized_circuit_ids.additionalProperties","typeLabel":"string"},"type":"object","title":"Optimized Circuit Ids","isRequired":true,"uniqueKey":"optimized_circuit_ids","typeLabel":"Optimized Circuit Ids · object"},"backpropagated_observables":{"additionalProperties":{"items":{"type":"object","_tupleOriginal":true,"properties":{"[0]":{"type":"string","uniqueKey":"backpropagated_observables.additionalProperties.items.[INDEX].[0]","typeLabel":"string"},"[1]":{"type":"number","uniqueKey":"backpropagated_observables.additionalProperties.items.[INDEX].[1]","typeLabel":"number"},"[2]":{"type":"number","uniqueKey":"backpropagated_observables.additionalProperties.items.[INDEX].[2]","typeLabel":"number"}},"uniqueKey":"backpropagated_observables.additionalProperties.items.[INDEX]","typeLabel":"tuple"},"type":"array","uniqueKey":"backpropagated_observables.additionalProperties","typeLabel":"tuple[]"},"type":"object","title":"Backpropagated Observables","isRequired":true,"uniqueKey":"backpropagated_observables","typeLabel":"Backpropagated Observables · object"},"context":{"type":"string","title":"Context","isRequired":true,"uniqueKey":"context","typeLabel":"string"}},"type":"object","required":["optimized_circuit_ids","backpropagated_observables","context"],"title":"ContextBackpropagationResultModel","description":"Represent the outcome of an observable backpropagation.\n\nAttributes:\n optimized_circuit_ids: Circuit produced for each input observable, keyed by\n the input's name.\n backpropagated_observables: Rewritten observables as\n ``(pauli, real, imaginary)`` term lists, keyed by the input's name.\n context: Summary of what was produced and the next step.","uniqueKey":"","typeLabel":"ContextBackpropagationResultModel · object"},"examples":{"Example":{"title":"Example","value":{"optimized_circuit_ids":{},"backpropagated_observables":{},"context":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"91c0e31a-926d-4be8-bc7c-de3fddd4be21":{"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":{"cb130ac1-1912-4d35-b4ec-9376c4e9b48a":{"APIKeyQuery":{"type":"apiKey","in":"query","name":"HAIQU_API_KEY","scopes":[],"schemeName":"APIKeyQuery"}},"b9ca4c33-0ea7-49f3-a797-71d6cee1b07d":{"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":"Backpropagate Observables Mcp - Haiqu","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T09:20:14.253Z","originalFileLocation":"api-reference/backpropagate-observables-mcp.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=\"Backpropagate observables through a circuit to shorten what must be run. Use this tool to move part of the computation from the circuit into the observable: Haiqu rewrites each observable through the tail of the circuit and stores a correspondingly shortened circuit. Running the shorter circuit with the rewritten observable estimates the same expectation value with less hardware noise. When to Use: - Call this when the user wants expectation values from a circuit that is too deep to run faithfully on hardware. - Call this before run_circuits_on_qpu_or_simulator for expectation-value workloads, and pass the returned circuit and observable together. Constraints: - Backpropagation is synchronous and runs no quantum job. - Each input observable yields one output circuit, returned under the same key you gave the observable: run optimized_circuit_ids[name] with backpropagated_observables[name]. - Truncation budgets trade accuracy for depth. Without max_error_total or max_error_per_slice the rewritten observable can grow large. Notes: - Pauli coefficients are given and returned as (pauli, real, imaginary) triples, one per term -- not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and run_circuits_on_qpu_or_simulator take. - Compare the returned circuits against the input with get_circuit_by_id to show how much depth was removed. Args: user: Authenticated user resolved from the API key. data: Circuit identifier, observables, and optional truncation budgets. db: Active database session. Returns: The generated circuit IDs with their rewritten observables. Raises: HTTPException: Raised with 404 when the circuit is not available to the caller, 422 when an observable cannot be parsed, or 501 when the backpropagation dependency is unavailable.\">\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=\"Backpropagate Observables Mcp - Haiqu\">\u003cmeta data-mint-head property=\"og:description\" content=\"Backpropagate observables through a circuit to shorten what must be run. Use this tool to move part of the computation from the circuit into the observable: Haiqu rewrites each observable through the tail of the circuit and stores a correspondingly shortened circuit. Running the shorter circuit with the rewritten observable estimates the same expectation value with less hardware noise. When to Use: - Call this when the user wants expectation values from a circuit that is too deep to run faithfully on hardware. - Call this before run_circuits_on_qpu_or_simulator for expectation-value workloads, and pass the returned circuit and observable together. Constraints: - Backpropagation is synchronous and runs no quantum job. - Each input observable yields one output circuit, returned under the same key you gave the observable: run optimized_circuit_ids[name] with backpropagated_observables[name]. - Truncation budgets trade accuracy for depth. Without max_error_total or max_error_per_slice the rewritten observable can grow large. Notes: - Pauli coefficients are given and returned as (pauli, real, imaginary) triples, one per term -- not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and run_circuits_on_qpu_or_simulator take. - Compare the returned circuits against the input with get_circuit_by_id to show how much depth was removed. Args: user: Authenticated user resolved from the API key. data: Circuit identifier, observables, and optional truncation budgets. db: Active database session. Returns: The generated circuit IDs with their rewritten observables. Raises: HTTPException: Raised with 404 when the circuit is not available to the caller, 422 when an observable cannot be parsed, or 501 when the backpropagation dependency is unavailable.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Haiqu\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp\">\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=Backpropagate+Observables+Mcp\u0026amp;description=Backpropagate+observables+through+a+circuit+to+shorten+what+must+be+run.%0A%0AUse+this+tool+to+move+part+of+the+computation+from+the+circuit+into+the%0Aobservable%3A+Ha\u0026amp;theme=b45bed329f6ae428ea806877\u0026amp;signature=db906543d716f693680e62e0a4b6e7eacf49aae26ed15bace9a912a531523751\">\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=\"Backpropagate Observables Mcp - Haiqu\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Backpropagate observables through a circuit to shorten what must be run. Use this tool to move part of the computation from the circuit into the observable: Haiqu rewrites each observable through the tail of the circuit and stores a correspondingly shortened circuit. Running the shorter circuit with the rewritten observable estimates the same expectation value with less hardware noise. When to Use: - Call this when the user wants expectation values from a circuit that is too deep to run faithfully on hardware. - Call this before run_circuits_on_qpu_or_simulator for expectation-value workloads, and pass the returned circuit and observable together. Constraints: - Backpropagation is synchronous and runs no quantum job. - Each input observable yields one output circuit, returned under the same key you gave the observable: run optimized_circuit_ids[name] with backpropagated_observables[name]. - Truncation budgets trade accuracy for depth. Without max_error_total or max_error_per_slice the rewritten observable can grow large. Notes: - Pauli coefficients are given and returned as (pauli, real, imaginary) triples, one per term -- not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and run_circuits_on_qpu_or_simulator take. - Compare the returned circuits against the input with get_circuit_by_id to show how much depth was removed. Args: user: Authenticated user resolved from the API key. data: Circuit identifier, observables, and optional truncation budgets. db: Active database session. Returns: The generated circuit IDs with their rewritten observables. Raises: HTTPException: Raised with 404 when the circuit is not available to the caller, 422 when an observable cannot be parsed, or 501 when the backpropagation dependency is unavailable.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://haiqu.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Backpropagate+Observables+Mcp\u0026amp;description=Backpropagate+observables+through+a+circuit+to+shorten+what+must+be+run.%0A%0AUse+this+tool+to+move+part+of+the+computation+from+the+circuit+into+the%0Aobservable%3A+Ha\u0026amp;theme=b45bed329f6ae428ea806877\u0026amp;signature=db906543d716f693680e62e0a4b6e7eacf49aae26ed15bace9a912a531523751\">\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/backpropagate-observables-mcp\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/backpropagate-observables-mcp.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/backpropagate-observables-mcp#webpage\",\"url\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp\",\"name\":\"Backpropagate Observables Mcp\",\"description\":\"Backpropagate observables through a circuit to shorten what must be run. Use this tool to move part of the computation from the circuit into the observable: Haiqu rewrites each observable through the tail of the circuit and stores a correspondingly shortened circuit. Running the shorter circuit with the rewritten observable estimates the same expectation value with less hardware noise. When to Use: - Call this when the user wants expectation values from a circuit that is too deep to run faithfully on hardware. - Call this before run_circuits_on_qpu_or_simulator for expectation-value workloads, and pass the returned circuit and observable together. Constraints: - Backpropagation is synchronous and runs no quantum job. - Each input observable yields one output circuit, returned under the same key you gave the observable: run optimized_circuit_ids[name] with backpropagated_observables[name]. - Truncation budgets trade accuracy for depth. Without max_error_total or max_error_per_slice the rewritten observable can grow large. Notes: - Pauli coefficients are given and returned as (pauli, real, imaginary) triples, one per term -- not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and run_circuits_on_qpu_or_simulator take. - Compare the returned circuits against the input with get_circuit_by_id to show how much depth was removed. Args: user: Authenticated user resolved from the API key. data: Circuit identifier, observables, and optional truncation budgets. db: Active database session. Returns: The generated circuit IDs with their rewritten observables. Raises: HTTPException: Raised with 404 when the circuit is not available to the caller, 422 when an observable cannot be parsed, or 501 when the backpropagation dependency is unavailable.\",\"dateModified\":\"2026-10-23T09:20:14.253Z\",\"isPartOf\":{\"@id\":\"https://docs.haiqu.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.haiqu.ai/api-reference/submit-circuit\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backpropagate Observables Mcp\",\"item\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp#apireference\",\"headline\":\"Backpropagate Observables Mcp\",\"name\":\"Backpropagate Observables Mcp\",\"description\":\"Backpropagate observables through a circuit to shorten what must be run. Use this tool to move part of the computation from the circuit into the observable: Haiqu rewrites each observable through the tail of the circuit and stores a correspondingly shortened circuit. Running the shorter circuit with the rewritten observable estimates the same expectation value with less hardware noise. When to Use: - Call this when the user wants expectation values from a circuit that is too deep to run faithfully on hardware. - Call this before run_circuits_on_qpu_or_simulator for expectation-value workloads, and pass the returned circuit and observable together. Constraints: - Backpropagation is synchronous and runs no quantum job. - Each input observable yields one output circuit, returned under the same key you gave the observable: run optimized_circuit_ids[name] with backpropagated_observables[name]. - Truncation budgets trade accuracy for depth. Without max_error_total or max_error_per_slice the rewritten observable can grow large. Notes: - Pauli coefficients are given and returned as (pauli, real, imaginary) triples, one per term -- not as the parallel (pauli_strings, coefficients) lists that run_variational_workload and run_circuits_on_qpu_or_simulator take. - Compare the returned circuits against the input with get_circuit_by_id to show how much depth was removed. Args: user: Authenticated user resolved from the API key. data: Circuit identifier, observables, and optional truncation budgets. db: Active database session. Returns: The generated circuit IDs with their rewritten observables. Raises: HTTPException: Raised with 404 when the circuit is not available to the caller, 422 when an observable cannot be parsed, or 501 when the backpropagation dependency is unavailable.\",\"url\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp\",\"mainEntityOfPage\":{\"@id\":\"https://docs.haiqu.ai/api-reference/backpropagate-observables-mcp#webpage\"},\"dateModified\":\"2026-10-23T09:20:14.253Z\",\"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/backpropagate-observables-mcp.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","description":"Submit a QASM circuit and persist core analytics for MCP workflows.\n\nUse this tool when the caller has ``experiment_id`` plus ``circuit_qasm``\nand needs a persisted circuit before running, compressing, transpiling, or\ninspecting related jobs. The endpoint computes and stores core analytics\nsuch as qubit count, depth, and gate counts, and it deduplicates by circuit\nhash within the authenticated user and experiment scope.\n\nThe returned object is a ``ContextCircuitModel``, which represents a\npersisted Haiqu circuit entity for MCP and API workflows rather than a raw\nQiskit ``QuantumCircuit`` instance. This Haiqu model carries stable IDs,\nexperiment ownership, stored analytics, and MCP context so later tools can\nreference the circuit directly without serializing or passing around the\nin-memory Qiskit circuit object itself.\n\nWhen to Use:\n - Call this when a workflow starts from inline QASM and needs a stable\n ``circuit_id`` for later MCP tools.\n - Call this before ``run_circuits_on_qpu_or_simulator`` or\n ``compress_circuit_with_state_compression`` when the circuit is not\n already stored.\n\nLarge circuits:\n There is no practical size limit on ``circuit_qasm``; payloads of\n thousands of QASM lines (tens of KB) are normal. Submit the requested\n circuit exactly as generated -- never substitute a smaller instance\n because the payload looks large. Send the QASM once here and pass the\n returned ``circuit_id`` to every later transpilation, compression, or\n run call so the payload never needs to be re-sent.\n\nConstraints:\n - ``experiment_id`` must refer to an accessible experiment owned by the\n authenticated caller.\n - Circuit deduplication is hash-based within the caller and experiment\n scope, so this route may return an existing circuit instead of\n creating a new row.\n\nNotes:\n - The response is the full ``ContextCircuitModel`` object, not a\n lightweight acknowledgment wrapper.\n - For agent-facing output, surface ``id``, ``name``, and the key\n analytics fields instead of repeating the raw QASM payload.\n\nArgs:\n user: Authenticated user resolved from the API key.\n data: Circuit payload containing the parent experiment ID, QASM source,\n and optional MCP context text.\n db: Active database session.\n\nReturns:\n The created or reused circuit object.\n\nRaises:\n HTTPException: Raised with ``400`` when the QASM payload cannot be\n parsed, or ``404`` when the parent experiment is not available to\n the caller.","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","description":"Get one stored circuit by ID, including its analytics snapshot.\n\nUse this tool when the caller already holds a ``circuit_id`` and needs that\ncircuit alone. Prefer this over ``list_circuits_in_experiment`` for a single\nknown circuit, since listing an experiment returns every circuit it holds.\n\nWhen to Use:\n - Call this to read the analytics of a circuit produced by\n ``transpile_circuits``, ``compress_circuit_with_state_compression``,\n or ``load_classical_data_with_data_loading``.\n - Call this to compare a derived circuit against its parent after\n ``list_children_circuits`` returns child IDs.\n\nConstraints:\n - ``analytics`` reflects what has been computed so far and is ``null``\n until an analytics job has run for the circuit. Use\n ``compute_circuit_analytics`` to populate it.\n - The response carries stored metadata and analytics, not the QASM\n source.\n\nNotes:\n - For agent-facing output, surface ``name``, ``status``, and the key\n analytics fields such as qubits, depth, and two-qubit gate counts.\n - Access is granted when the caller can access the parent experiment.\n\nArgs:\n circuit_id: Circuit identifier from a prior MCP response.\n user: Authenticated user resolved from the API key.\n db: Active database session.\n\nReturns:\n The stored circuit object enriched with MCP context text.\n\nRaises:\n HTTPException: Raised with ``404`` when the circuit or its experiment is\n not available to the caller.","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","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","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":"Backpropagate Observables Mcp - 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"]}