arXiv:2603.27836quant-phcs.CL2026-03被引 1

用大模型自动把经典机器学习代码转成量子代码,让量子人工智能开发更简单。

Q-Bridge: Code Translation for Quantum Machine Learning via LLMs

  • 基于自迭代流程构建可验证的代码转换框架,生成大规模数据集
  • 通过微调实现高效、准确的量子代码生成,保持结构对齐与正确性
  • 适合想快速入门量子机器学习的开发者和研究者使用

大型语言模型在弥合经典机器学习与量子机器学习之间差距方面展现出潜力。然而,缺乏标准化的高质量数据集和稳健的翻译框架限制了该领域进展。我们提出 Q-Bridge,一个由大模型引导的代码转换框架,可系统性地将经典机器学习(CML)实现转化为可执行的量子机器学习(QML)变体。该方法基于自迭代流程,逐步扩展经验证的种子代码库,构建大规模数据集 CML-2-QML,包含可验证与不可验证的代码对。Q-Bridge 模型采用监督式 LoRA 微调,实现可扩展且内存高效的训练,能在多种架构上生成忠实且可解释的量子代码。实证分析证实了直接从 CML 到 QML 转换的可行性,并揭示了两类范式间的一致结构对齐。案例研究进一步表明,Q-Bridge 可保持确定性正确性,同时支持创造性架构探索。本工作建立了首个可复现的基于大模型的量子代码转换框架与数据集,为可扩展的量子人工智能发展奠定基础。

原文摘要 · Abstract (English)

Large language models have recently shown potential in bridging the gap between classical machine learning and quantum machine learning. However, the lack of standardized, high-quality datasets and robust translation frameworks limits progress in this domain. We introduce Q-Bridge, an LLM-guided code translation framework that systematically converts CML implementations into executable QML variants. Our approach builds on a self-involving pipeline that iteratively expands a verified seed codebase into a large-scale dataset, CML-2-QML, integrating verifiable and unverifiable code pairs. The Q-Bridge model is fine-tuned using supervised LoRA adaptation for scalable and memory-efficient training, achieving faithful and interpretable quantum code generation across diverse architectures. Empirical analysis confirms the feasibility of direct CML-to-QML translation and reveals consistent structural alignment between classical and quantum paradigms. Case studies further demonstrate that Q-Bridge can maintain deterministic correctness and also enable creative architectural exploration. This work establishes the first reproducible framework and dataset for LLM-driven quantum code translation, offering a foundation for scalable quantum AI development.

代码转换量子机器学习大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。