Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Quantum Reservoirs as External Decision Layers for LLMs: Evidence from RAG and Agentic Systems

Maksym Husarov

Published Sep 20, 2026• 0 citations
Publisher

Abstract

I evaluated whether a quantum AI reservoir can improve the decisions produced by retrieval-augmented generation (RAG) and tool-using Agentic workflows. Two complementary experiments used the same five workflow variants: RAG, RAG + QR, Agentic, Agentic + QR, and LLM + QR. Each experiment contained 201 main tasks and three repeats, yielding 6,030 answers overall. The first experiment used synthetic planning scenarios; the second used numerical quantities extracted from quantum-domain books and technical papers. In the designated first repeat, QR increased complete structured success from 75.1% to 90.5% for synthetic RAG and from 27.4% to 52.2% for synthetic Agentic. On real-source tasks, the corresponding rates increased from 46.8% to 57.7% and from 34.3% to 55.7%. Both paired improvements were positive in every repeat of both experiments. LLM + QR achieved 94.0% on synthetic tasks and 54.7% on real-source tasks in the first repeat, exceeding both unassisted baselines in each experiment. The results support the integrated reservoir-guidance module as a useful addition to the evaluated decision workflows and motivate a simpler single-call architecture when all required evidence is available. The study evaluates a simulator-backed quantum/classical module; it does not establish quantum computational advantage or isolate the quantum component from its classical guidance components.

DOI
10.5281/zenodo.22864136

Related papers

Quantum AI Reservoirs with Optional Graph Context across LLM, RAG and Agentic Workflows

Maksym Husarov

This study evaluates an external simulator-backed quantum/classical guidance component with optional graph context across direct LLM advice, retrieval-augmented generation (RAG), and tool-using Agentic workflows. Three conditions are compared: Baseline, QR only, and QR + graph. The RAG and Agentic evaluation comprises 17 tasks, three conditions, and three repeats per workflow, producing 306 answers. A deterministic evaluator measures complete success through structured decision correctness, quotation validity, decisive-source coverage, and, for Agentic workflows, consistency with a simulated commit. Complete RAG success was 88.2% for Baseline, 92.2% for QR only, and 98.0% for QR + graph. Complete Agentic success was 62.7%, 54.9%, and 86.3%, respectively. Relative to QR only, graph context increased success by 5.9 percentage points in RAG and 31.4 points in Agentic. The combined configuration exceeded Agentic Baseline in all three repeats. Task-conditional bootstrap intervals support a clearer benefit in Agentic; the RAG intervals include zero. A separate single-request advisory comparison produced weighted LLM-review scores of 87.5, 95.0, and 95.0 out of 100. These exploratory scores are reported separately and are not accuracy percentages. The release includes the article and two public JSON supplements containing anonymized trial outcomes, summaries, evaluation settings, and advisory score vectors. Proprietary implementation, prompts, source passages, and model response texts are withheld. The findings concern the integrated guidance and evidence-acquisition system on the evaluated tasks. They do not establish quantum computational advantage, isolate the quantum component as the cause of improvement, or demonstrate general superiority. The main evaluation is a follow-up run on previously inspected tasks, not an unseen holdout.

•Oct 3, 2026•0 citations

External Quantum Reservoir Guidance for Complex AI-Assistant Tasks

Maksym Husarov

External Quantum Reservoir Assist is designed to help an AI assistant identify the core of a difficult request and organize a useful response by adding dynamically generated guidance through a REST or MCP integration. This study evaluates final answers from an archived experiment using one response pair from each of 50 synthetic scenario families. Thirty-nine pairs formed the primary complex decision-support group, while eleven provided routine, constraint-challenge, and technical-explanation controls. Within the primary group, reservoir-assisted answers were preferred in 17 cases, baseline answers in 8, with 13 ties and 1 unclear case. The tie-adjusted preference rate was 61.8% (95% family-bootstrap interval: 48.7–73.7%). The clearest descriptive gains were observed in actionability and validation guidance, while major-error flags occurred equally often in both conditions. Assistance increased total token usage by 32.9% and median paired estimated end-to-end time by 7.51 seconds. The results provide directional evidence that external reservoir guidance can improve practical decision support for selected complex AI-assistant tasks, while also demonstrating substantial uncertainty and operational overhead. The study does not establish general response superiority, reduced factual-error rates, or a quantum-specific advantage. The accompanying minimized dataset and executable analysis reproduce the reported statistics and figures without additional model calls.

•Sep 10, 2026•0 citations

Revisiting Quantum Code Generation: Where Should Domain Knowledge Live?

Oscar Novo, Oscar Bastidas-Jossa, Alberto Calvo +2 more

Recent advances in large language models (LLMs) have enabled the automation of an increasing number of programming tasks, including code generation for scientific and engineering domains. In rapidly evolving software ecosystems such as quantum software development, where frameworks expose complex abstractions, a central question is how best to incorporate domain knowledge into LLM-based assistants while preserving maintainability as libraries evolve. In this work, we study specialization strategies for Qiskit code generation using the Qiskit-HumanEval benchmark. We compare a parameter-specialized fine-tuned baseline introduced in prior work against a range of recent general-purpose LLMs enhanced with retrieval-augmented generation (RAG) and agent-based inference with execution feedback. Our results show that modern general-purpose LLMs consistently outperform the parameter-specialized baseline. While the fine-tuned model achieves approximately 47% pass@1 on Qiskit-HumanEval, recent general-purpose models reach 60-65% under zero-shot and retrieval-augmented settings, and up to 85% for the strongest evaluated model when combined with iterative execution-feedback agents -representing an improvement of more than 20% over zero-shot general-purpose performance and more than 35% over the parameter-specialized baseline. Agentic execution feedback yields the most consistent improvements, albeit at increased runtime cost, while RAG provides modest and model-dependent gains. These findings indicate that performance gains can be achieved without domain-specific fine-tuning, instead relying on inference-time augmentation, thereby enabling a more flexible and maintainable approach to LLM-assisted quantum software development.

cs.LGCross-listedarXiv:2603.22184•Mar 24, 2026•1 citation

Quantum Reservoir-Assisted Context Orchestration for Large Language Models: A 500-Prompt Paired Evaluation

Maksym Husarov

Large language models increasingly operate within systems that provide retrieved knowledge, policies, tool descriptions, workflow state, and other contextual signals. This work investigates Quantum Reservoir Assist, a pre-generation context-orchestration layer that uses a CUDA-Q-based quantum reservoir process to rank candidate contextual signals and construct dynamic decision-support guidance for an otherwise unchanged downstream language model. We evaluate the complete pipeline using a paired benchmark of 500 production-like prompts across ten categories, including architecture and system design, troubleshooting, multi-constraint reasoning, incident response, agent tool planning, security and reliability, and technical explanation. Both experimental paths use the same downstream LLM and generation settings. Across the benchmark, Quantum Reservoir Assist produced a mean absolute increase of approximately 0.172 in the system’s internal answer-readiness/accuracy proxy. The strongest mean proxy improvements occurred in troubleshooting, ambiguous or underspecified requests, conflicting constraints, security and reliability, and multi-constraint tasks. Reservoir assistance also introduced measurable operational overhead, including increased downstream token usage and substantial preprocessing latency under the CUDA-Q simulation configuration used in this experiment. The results demonstrate systematic effects of quantum-reservoir-assisted pre-generation context orchestration, but do not establish ground-truth answer-accuracy improvement or quantum computational advantage. The study therefore motivates controlled ablations against static guidance and classical context-ranking methods.

•Aug 26, 2026•0 citations

Quantum-Rag: Retrieval-Augmented Generation Framework for Quantum Circuit Code Generation

Nicholas Stapleton, Sharmin Afrose, Ethan Seefried +3 more

Generating correct and executable quantum circuit code remains a significant barrier for both newcomers and experienced practitioners in quantum computing. While Large Language Models (LLMs) have shown promise in classical code generation, their application to quantum programming is hampered by limited domain-specific training data and the rapidly evolving nature of quantum software frameworks. In this work, we present Quantum-RAG, an extended Retrieval-Augmented Generation framework that couples a domain-specialized language model with a curated, multi-source knowledge corpus to produce Qiskit-based quantum circuit code. Our three-stage pipeline ingests documentation, educational notebooks, and research literature into a dense retrieval index and augments the generation model with the most relevant context at inference time. Evaluated on the Qiskit HumanEval benchmark, QuantumRAG achieves a Pass@1 of 0.4132, a Pass@3 of 0.6291, and a Pass@5 of 0.7020, surpassing the domain-adapted GraniteQiskit baseline by 101%, 72%, and 47 % at each respective threshold. These results demonstrate that retrieval-augmented approaches can substantially improve quantum code generation without expensive model retraining.

IEEE Dallas Circuits and Systems Conference (DCAS)•Apr 10, 2026•2 citations

A Hybrid Quantum Fidelity-Based Semantic Retrieval Framework for Retrieval-Augmented Generation

J. Senthilkumar, D.R. Karthika

Retrieval-Augmented Generation (RAG) improves LLM factual accuracy via external retrieval, but existing frameworks rely on cosine similarity, leaving quantum overlap-based measures such as fidelity largely unexplored. QF-RAG is a hybrid quantum-classical retrieval architecture that estimates Quantum Fidelity Similarity (QFS) between amplitude-encoded embeddings via a Swap Test. Because fidelity equals squared cosine similarity for real unit vectors, QFS is fundamentally a score transformation, and we evaluate it entirely on real, handauthored text rather than synthetic vectors: 63 factual passages across 16 real-world topics (paraphrases, hard negatives, and noise documents) and 42 queries (standard, ambiguous, multihop), embedded with real TF-IDF vectors that are mean-centered so cosine similarity can take negative values, as dense embeddings do in practice. On this real corpus, 69.9% of query-document cosine similarities are negative, yet cosine and exact QFS agree on the Top-1 result for every query and produce identical Precision@5, Recall@5, MRR, and nDCG@5 to three decimal places, confirming that QFS preserves cosine's ranking quality on real text. With sufficient Swap Test shots, QFS recovers this same ceiling: MRR reaches 0.951 by$\mathrm{S}=1024$and 1.000 at the exact-fidelity limit, tracking the expected$\mathrm{O}(1 / \sqrt{ } \mathrm{S})$estimator convergence. A retrieval-to-generation test on the same real passages shows retrieval quality causally propagating to answer accuracy (93.8% at k=1). We further complement asymptotic complexity analysis with numbers computed and measured endto- end in code: an unoptimized amplitude-encoding synthesis needs O(d2) CNOT gates (349,525 at$\mathrm{d}=768)$, and we verify a tighter O(d) optimized bound (1,022), with exact memory accounting and a measured, extrapolated simulator runtime of 19.6 s per pair for state preparation at$\mathrm{d}=768$, dropping to 0.057 s with the optimized construction. QF-RAG is positioned as a rigorously specified, empirically evaluated hybrid architecture and evaluation framework for bringing quantum overlap measures into RAG retrieval, with a clear, quantified resource profile for near-term hardware.

•Aug 1, 2026•0 citations
I evaluated whether a quantum AI reservoir can improve the decisions produced by retrieval-augmented generation (RAG) and tool-using Agentic workflows. Two complementary experiments used the same five workflow variants: RAG, RAG + QR, Agentic, Agentic + QR, and LLM + QR. Each experiment contained 201 main tasks and three repeats, yielding 6,030 answers overall. The first experiment used synthetic planning scenarios; the second used numerical quantities extracted from quantum-domain books and technical papers. In the designated first repeat, QR increased complete structured success from 75.1% to 90.5% for synthetic RAG and from 27.4% to 52.2% for synthetic Agentic. On real-source tasks, the corresponding rates increased from 46.8% to 57.7% and from 34.3% to 55.7%. Both paired improvements were positive in every repeat of both experiments. LLM + QR achieved 94.0% on synthetic tasks and 54.7% on real-source tasks in the first repeat, exceeding both unassisted baselines in each experiment. The results support the integrated reservoir-guidance module as a useful addition to the evaluated decision workflows and motivate a simpler single-call architecture when all required evidence is available. The study evaluates a simulator-backed quantum/classical module; it does not establish quantum computational advantage or isolate the quantum component from its classical guidance components.
This study evaluates an external simulator-backed quantum/classical guidance component with optional graph context across direct LLM advice, retrieval-augmented generation (RAG), and tool-using Agentic workflows. Three conditions are compared: Baseline, QR only, and QR + graph. The RAG and Agentic evaluation comprises 17 tasks, three conditions, and three repeats per workflow, producing 306 answers. A deterministic evaluator measures complete success through structured decision correctness, quotation validity, decisive-source coverage, and, for Agentic workflows, consistency with a simulated commit. Complete RAG success was 88.2% for Baseline, 92.2% for QR only, and 98.0% for QR + graph. Complete Agentic success was 62.7%, 54.9%, and 86.3%, respectively. Relative to QR only, graph context increased success by 5.9 percentage points in RAG and 31.4 points in Agentic. The combined configuration exceeded Agentic Baseline in all three repeats. Task-conditional bootstrap intervals support a clearer benefit in Agentic; the RAG intervals include zero. A separate single-request advisory comparison produced weighted LLM-review scores of 87.5, 95.0, and 95.0 out of 100. These exploratory scores are reported separately and are not accuracy percentages. The release includes the article and two public JSON supplements containing anonymized trial outcomes, summaries, evaluation settings, and advisory score vectors. Proprietary implementation, prompts, source passages, and model response texts are withheld. The findings concern the integrated guidance and evidence-acquisition system on the evaluated tasks. They do not establish quantum computational advantage, isolate the quantum component as the cause of improvement, or demonstrate general superiority. The main evaluation is a follow-up run on previously inspected tasks, not an unseen holdout.
External Quantum Reservoir Assist is designed to help an AI assistant identify the core of a difficult request and organize a useful response by adding dynamically generated guidance through a REST or MCP integration. This study evaluates final answers from an archived experiment using one response pair from each of 50 synthetic scenario families. Thirty-nine pairs formed the primary complex decision-support group, while eleven provided routine, constraint-challenge, and technical-explanation controls. Within the primary group, reservoir-assisted answers were preferred in 17 cases, baseline answers in 8, with 13 ties and 1 unclear case. The tie-adjusted preference rate was 61.8% (95% family-bootstrap interval: 48.7–73.7%). The clearest descriptive gains were observed in actionability and validation guidance, while major-error flags occurred equally often in both conditions. Assistance increased total token usage by 32.9% and median paired estimated end-to-end time by 7.51 seconds. The results provide directional evidence that external reservoir guidance can improve practical decision support for selected complex AI-assistant tasks, while also demonstrating substantial uncertainty and operational overhead. The study does not establish general response superiority, reduced factual-error rates, or a quantum-specific advantage. The accompanying minimized dataset and executable analysis reproduce the reported statistics and figures without additional model calls.
Recent advances in large language models (LLMs) have enabled the automation of an increasing number of programming tasks, including code generation for scientific and engineering domains. In rapidly evolving software ecosystems such as quantum software development, where frameworks expose complex abstractions, a central question is how best to incorporate domain knowledge into LLM-based assistants while preserving maintainability as libraries evolve. In this work, we study specialization strategies for Qiskit code generation using the Qiskit-HumanEval benchmark. We compare a parameter-specialized fine-tuned baseline introduced in prior work against a range of recent general-purpose LLMs enhanced with retrieval-augmented generation (RAG) and agent-based inference with execution feedback. Our results show that modern general-purpose LLMs consistently outperform the parameter-specialized baseline. While the fine-tuned model achieves approximately 47% pass@1 on Qiskit-HumanEval, recent general-purpose models reach 60-65% under zero-shot and retrieval-augmented settings, and up to 85% for the strongest evaluated model when combined with iterative execution-feedback agents -representing an improvement of more than 20% over zero-shot general-purpose performance and more than 35% over the parameter-specialized baseline. Agentic execution feedback yields the most consistent improvements, albeit at increased runtime cost, while RAG provides modest and model-dependent gains. These findings indicate that performance gains can be achieved without domain-specific fine-tuning, instead relying on inference-time augmentation, thereby enabling a more flexible and maintainable approach to LLM-assisted quantum software development.
Large language models increasingly operate within systems that provide retrieved knowledge, policies, tool descriptions, workflow state, and other contextual signals. This work investigates Quantum Reservoir Assist, a pre-generation context-orchestration layer that uses a CUDA-Q-based quantum reservoir process to rank candidate contextual signals and construct dynamic decision-support guidance for an otherwise unchanged downstream language model. We evaluate the complete pipeline using a paired benchmark of 500 production-like prompts across ten categories, including architecture and system design, troubleshooting, multi-constraint reasoning, incident response, agent tool planning, security and reliability, and technical explanation. Both experimental paths use the same downstream LLM and generation settings. Across the benchmark, Quantum Reservoir Assist produced a mean absolute increase of approximately 0.172 in the system’s internal answer-readiness/accuracy proxy. The strongest mean proxy improvements occurred in troubleshooting, ambiguous or underspecified requests, conflicting constraints, security and reliability, and multi-constraint tasks. Reservoir assistance also introduced measurable operational overhead, including increased downstream token usage and substantial preprocessing latency under the CUDA-Q simulation configuration used in this experiment. The results demonstrate systematic effects of quantum-reservoir-assisted pre-generation context orchestration, but do not establish ground-truth answer-accuracy improvement or quantum computational advantage. The study therefore motivates controlled ablations against static guidance and classical context-ranking methods.
Generating correct and executable quantum circuit code remains a significant barrier for both newcomers and experienced practitioners in quantum computing. While Large Language Models (LLMs) have shown promise in classical code generation, their application to quantum programming is hampered by limited domain-specific training data and the rapidly evolving nature of quantum software frameworks. In this work, we present Quantum-RAG, an extended Retrieval-Augmented Generation framework that couples a domain-specialized language model with a curated, multi-source knowledge corpus to produce Qiskit-based quantum circuit code. Our three-stage pipeline ingests documentation, educational notebooks, and research literature into a dense retrieval index and augments the generation model with the most relevant context at inference time. Evaluated on the Qiskit HumanEval benchmark, QuantumRAG achieves a Pass@1 of 0.4132, a Pass@3 of 0.6291, and a Pass@5 of 0.7020, surpassing the domain-adapted GraniteQiskit baseline by 101%, 72%, and 47 % at each respective threshold. These results demonstrate that retrieval-augmented approaches can substantially improve quantum code generation without expensive model retraining.
Retrieval-Augmented Generation (RAG) improves LLM factual accuracy via external retrieval, but existing frameworks rely on cosine similarity, leaving quantum overlap-based measures such as fidelity largely unexplored. QF-RAG is a hybrid quantum-classical retrieval architecture that estimates Quantum Fidelity Similarity (QFS) between amplitude-encoded embeddings via a Swap Test. Because fidelity equals squared cosine similarity for real unit vectors, QFS is fundamentally a score transformation, and we evaluate it entirely on real, handauthored text rather than synthetic vectors: 63 factual passages across 16 real-world topics (paraphrases, hard negatives, and noise documents) and 42 queries (standard, ambiguous, multihop), embedded with real TF-IDF vectors that are mean-centered so cosine similarity can take negative values, as dense embeddings do in practice. On this real corpus, 69.9% of query-document cosine similarities are negative, yet cosine and exact QFS agree on the Top-1 result for every query and produce identical Precision@5, Recall@5, MRR, and nDCG@5 to three decimal places, confirming that QFS preserves cosine's ranking quality on real text. With sufficient Swap Test shots, QFS recovers this same ceiling: MRR reaches 0.951 byS=1024\mathrm{S}=1024S=1024and 1.000 at the exact-fidelity limit, tracking the expectedO(1/S)\mathrm{O}(1 / \sqrt{ } \mathrm{S})O(1/​S)estimator convergence. A retrieval-to-generation test on the same real passages shows retrieval quality causally propagating to answer accuracy (93.8% at k=1). We further complement asymptotic complexity analysis with numbers computed and measured endto- end in code: an unoptimized amplitude-encoding synthesis needs O(d2) CNOT gates (349,525 atd=768)\mathrm{d}=768)d=768), and we verify a tighter O(d) optimized bound (1,022), with exact memory accounting and a measured, extrapolated simulator runtime of 19.6 s per pair for state preparation atd=768\mathrm{d}=768d=768, dropping to 0.057 s with the optimized construction. QF-RAG is positioned as a rigorously specified, empirically evaluated hybrid architecture and evaluation framework for bringing quantum overlap measures into RAG retrieval, with a clear, quantified resource profile for near-term hardware.