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

International Journal of Computational Science and Engineering Research

Quantum-Enhanced Retrieval-Augmented Generation for Hallucination Reduction in Large Language Models

Praveenkumar Seepana

Published Aug 3, 2026• 0 citations
Publisher

Abstract

Although the performance of LLMs on a wide variety of natural language processing problems demonstrates remarkable ability, hallucinated responses are introduced as one of the key weaknesses of LLMs, especially in knowledge-intensive applications, where fidelity to facts is paramount. While effective in reducing hallucinations, the context retrieved during the RAG operations is still very often suboptimal with respect to the external documents used in the retrieval stage, and being based on cosine similarity and nearest-neighbour search, these models typically do not return optimal context to support factual generation. The authors propose a five-stage solution, called Quantum-Enhanced Retrieval-Augmented Generation (QERAG), which combines the use of a quantum-inspired probability amplitude document ranking, a Context Utility Score (CUS) optimisation engine, and a Hallucination Verification Agent (HVA) based on a formal Hallucination Reduction Index (HRI). The Quantum Relevance Score (QRS) uses interference based, Amplitude Encoding on candidate Document Sets to yield a normalised relevance distribution that emphasises the relatively higher value generated in the discriminative context as compared to other locally similar passages in a document set. QERAG outperforms Standard LLM and Traditional RAG models on all five Natural benchmark across response accuracy, with a score of 92.8% vs. 74.3%, and hallucination rate, 4.3% vs. 18.2%, respectively. They achieve a significant overall improvement by using quantum-inspired retrieval layer, which achieves a 3.5-percentage-point reduction in hallucination rate when compared to cosine-similarity RAG, with this single layer showing more reduction than the rest of the pipeline layers. The results of an ablation study show the individual contribution of every pipeline stage, and the quantum-inspired retrieval layer exhibits the greatest reduction of a 3.5 percentage points over cosine-similarity RAG.

DOI
10.63328/ijcser-v3ri3p6

Related papers

Quantum Synergy in Retrieval-Augmented Generation for Contextual Enhancement

K. Adithi, R. K. Kapilavani

Abstract Retrieval-Augmented Generation (RAG) has emerged as a powerful framework in natural language processing (NLP), integrating retrieval mechanisms with generative models to enhance information accuracy and contextual relevance. However, classical retrieval techniques face scalability bottlenecks and computational inefficiencies when handling large datasets. In this work, we introduce GroQ-Enhanced RAG (QRAG), a hybrid quantum-classical framework that leverages Grover’s search algorithm and GroQ-Rank (QAOA-based ranking) to enhance retrieval efficiency and optimization. QRAG employs Grover’s algorithm to accelerate query processing and utilizes GroQ for combinatorial ranking optimization, significantly reducing computational overhead. Empirical evaluations demonstrate that QRAG reduces retrieval latency by 40–50% compared to traditional RAG while improving response accuracy and scalability. By integrating quantum search and optimization techniques, GroQ-powered QRAG sets a new benchmark for efficient, high-fidelity information retrieval in NLP. While this study applies QRAG to RAG-based architectures, the proposed framework can be extended to other AI-driven retrieval-intensive applications, highlighting the transformative potential of quantum computing in large-scale language processing and information retrieval tasks.

•May 8, 2025•1 citation

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•0 citations

On the Representational Limits of Quantum-Inspired 1024-D Document Embeddings: An Experimental Evaluation Framework

Dario Maio

Text embeddings are central to modern information retrieval and Retrieval-Augmented Generation (RAG). While dense models derived from Large Language Models (LLMs) dominate current practice, recent work has explored quantum-inspired alternatives motivated by the geometric properties of Hilbert-like spaces and their potential to encode richer semantic structure. This paper presents an experimental framework for constructing quantum-inspired 1024-dimensional document embeddings based on overlapping windows and multi-scale aggregation. The pipeline combines semantic projections (e.g., EigAngle), circuit-inspired feature mappings, and optional teacher-student distillation, together with a fingerprinting mechanism for reproducibility and controlled evaluation. We introduce a set of diagnostic tools for hybrid retrieval, including static and dynamic interpolation between BM25 and embedding-based scores, candidate union strategies, and a conceptual alpha-oracle that provides an upper bound for score-level fusion. Experiments on controlled corpora of Italian and English documents across technical, narrative, and legal domains, using synthetic queries, show that BM25 remains a strong baseline, teacher embeddings provide stable semantic structure, and standalone quantum-inspired embeddings exhibit weak and unstable ranking signals. Distillation yields mixed effects, improving alignment in some cases but not consistently enhancing retrieval performance, while hybrid retrieval can recover competitive results when lexical and embedding-based signals are combined. Overall, the results highlight structural limitations in the geometry of quantum-inspired embeddings, including distance compression and ranking instability, and clarify their role as auxiliary components rather than standalone retrieval representations.

cs.IRCross-listedarXiv:2604.09430•Apr 13, 2026

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

Maksym Husarov

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.

•Sep 20, 2026•0 citations

Model-Driven Quantum Code Generation Using Large Language Models and Retrieval-Augmented Generation

Nazanin Siavash, Armin Moin

This paper introduces a novel research direction for model-to-text/code transformations by leveraging Large Language Models (LLMs) that can be enhanced with Retrieval-Augmented Generation (RAG) pipelines. The focus is on quantum and hybrid quantum-classical software systems, where model-driven approaches can help reduce the costs and mitigate the risks associated with the heterogeneous platform landscape and lack of developers' skills. We validate one of the proposed ideas regarding generating code out of UML model instances of software systems. This Python code uses a well-established library, called Qiskit, to execute on gate-based or circuit-based quantum computers. The RAG pipeline that we deploy incorporates sample Qiskit code from public GitHub repositories. Experimental results show that well-engineered prompts can improve CodeBLEU scores by up to a factor of four, yielding more accurate and consistent quantum code. However, the proposed research direction can go beyond this through further investigation in the future by conducting experiments to address our other research questions and ideas proposed here, such as deploying software system model instances as the source of information in the RAG pipelines, or deploying LLMs for code-to-code transformations, for instance, for transpilation use cases.

arXiv:2508.21097•ACM/IEEE International Conference on Model Driven Engineering Languages and Systems (MODELS)•Oct 5, 2025•4 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•0 citations
Although the performance of LLMs on a wide variety of natural language processing problems demonstrates remarkable ability, hallucinated responses are introduced as one of the key weaknesses of LLMs, especially in knowledge-intensive applications, where fidelity to facts is paramount. While effective in reducing hallucinations, the context retrieved during the RAG operations is still very often suboptimal with respect to the external documents used in the retrieval stage, and being based on cosine similarity and nearest-neighbour search, these models typically do not return optimal context to support factual generation. The authors propose a five-stage solution, called Quantum-Enhanced Retrieval-Augmented Generation (QERAG), which combines the use of a quantum-inspired probability amplitude document ranking, a Context Utility Score (CUS) optimisation engine, and a Hallucination Verification Agent (HVA) based on a formal Hallucination Reduction Index (HRI). The Quantum Relevance Score (QRS) uses interference based, Amplitude Encoding on candidate Document Sets to yield a normalised relevance distribution that emphasises the relatively higher value generated in the discriminative context as compared to other locally similar passages in a document set. QERAG outperforms Standard LLM and Traditional RAG models on all five Natural benchmark across response accuracy, with a score of 92.8% vs. 74.3%, and hallucination rate, 4.3% vs. 18.2%, respectively. They achieve a significant overall improvement by using quantum-inspired retrieval layer, which achieves a 3.5-percentage-point reduction in hallucination rate when compared to cosine-similarity RAG, with this single layer showing more reduction than the rest of the pipeline layers. The results of an ablation study show the individual contribution of every pipeline stage, and the quantum-inspired retrieval layer exhibits the greatest reduction of a 3.5 percentage points over cosine-similarity RAG.
Abstract Retrieval-Augmented Generation (RAG) has emerged as a powerful framework in natural language processing (NLP), integrating retrieval mechanisms with generative models to enhance information accuracy and contextual relevance. However, classical retrieval techniques face scalability bottlenecks and computational inefficiencies when handling large datasets. In this work, we introduce GroQ-Enhanced RAG (QRAG), a hybrid quantum-classical framework that leverages Grover’s search algorithm and GroQ-Rank (QAOA-based ranking) to enhance retrieval efficiency and optimization. QRAG employs Grover’s algorithm to accelerate query processing and utilizes GroQ for combinatorial ranking optimization, significantly reducing computational overhead. Empirical evaluations demonstrate that QRAG reduces retrieval latency by 40–50% compared to traditional RAG while improving response accuracy and scalability. By integrating quantum search and optimization techniques, GroQ-powered QRAG sets a new benchmark for efficient, high-fidelity information retrieval in NLP. While this study applies QRAG to RAG-based architectures, the proposed framework can be extended to other AI-driven retrieval-intensive applications, highlighting the transformative potential of quantum computing in large-scale language processing and information retrieval tasks.
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.
Text embeddings are central to modern information retrieval and Retrieval-Augmented Generation (RAG). While dense models derived from Large Language Models (LLMs) dominate current practice, recent work has explored quantum-inspired alternatives motivated by the geometric properties of Hilbert-like spaces and their potential to encode richer semantic structure. This paper presents an experimental framework for constructing quantum-inspired 1024-dimensional document embeddings based on overlapping windows and multi-scale aggregation. The pipeline combines semantic projections (e.g., EigAngle), circuit-inspired feature mappings, and optional teacher-student distillation, together with a fingerprinting mechanism for reproducibility and controlled evaluation. We introduce a set of diagnostic tools for hybrid retrieval, including static and dynamic interpolation between BM25 and embedding-based scores, candidate union strategies, and a conceptual alpha-oracle that provides an upper bound for score-level fusion. Experiments on controlled corpora of Italian and English documents across technical, narrative, and legal domains, using synthetic queries, show that BM25 remains a strong baseline, teacher embeddings provide stable semantic structure, and standalone quantum-inspired embeddings exhibit weak and unstable ranking signals. Distillation yields mixed effects, improving alignment in some cases but not consistently enhancing retrieval performance, while hybrid retrieval can recover competitive results when lexical and embedding-based signals are combined. Overall, the results highlight structural limitations in the geometry of quantum-inspired embeddings, including distance compression and ranking instability, and clarify their role as auxiliary components rather than standalone retrieval representations.
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 paper introduces a novel research direction for model-to-text/code transformations by leveraging Large Language Models (LLMs) that can be enhanced with Retrieval-Augmented Generation (RAG) pipelines. The focus is on quantum and hybrid quantum-classical software systems, where model-driven approaches can help reduce the costs and mitigate the risks associated with the heterogeneous platform landscape and lack of developers' skills. We validate one of the proposed ideas regarding generating code out of UML model instances of software systems. This Python code uses a well-established library, called Qiskit, to execute on gate-based or circuit-based quantum computers. The RAG pipeline that we deploy incorporates sample Qiskit code from public GitHub repositories. Experimental results show that well-engineered prompts can improve CodeBLEU scores by up to a factor of four, yielding more accurate and consistent quantum code. However, the proposed research direction can go beyond this through further investigation in the future by conducting experiments to address our other research questions and ideas proposed here, such as deploying software system model instances as the source of information in the RAG pipelines, or deploying LLMs for code-to-code transformations, for instance, for transpilation use cases.
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.