Dynamic quantum circuits with mid-circuit measurement and classical feedforward are essential for near-term algorithms such as error mitigation, adaptive phase estimation, and Variational Quantum Eigensolvers (VQE), yet transpiling these programs across frameworks remains challenging due to inconsistent support for control flow and measurement semantics. We present a transpilation pipeline that converts OpenQASM 3.0 programs with classical control structures (conditionals and bounded loops) into optimized CUDA-Q C++ kernels, leveraging CUDA-Q's native mid-circuit measurement and host-language control flow to translate dynamic patterns without static circuit expansion. Our open-source framework is validated on comprehensive test suites derived from IBM Quantum's classical feedforward guide, including conditional reset, if-else branching, multi-bit predicates, and sequential feedforward, and on VQE-style parameterized circuits with runtime parameter optimization. Experiments show that the resulting CUDA-Q kernels reduce circuit depth by avoiding branch duplication, improve execution efficiency via low-latency classical feedback, and enhance code readability by directly mapping OpenQASM 3.0 control structures to C++ control flow, thereby bridging OpenQASM 3.0's portable circuit specification with CUDA-Q's performance-oriented execution model for NISQ-era applications requiring dynamic circuit capabilities.


翻译:中测量与经典前馈的动态量子电路对于近期算法(如误差缓解、自适应相位估计和变分量子本征求解器)至关重要,但由于各框架对控制流与测量语义的支持不一致,跨框架编译此类程序仍颇具挑战。我们提出一种编译流水线,可将含经典控制结构(条件语句与有界循环)的OpenQASM 3.0程序转换为优化的CUDA-Q C++内核,利用CUDA-Q原生的中测量与宿主语言控制流,在不进行静态电路扩展的前提下实现动态模式的转换。本开源框架基于IBM量子经典前馈指南的完整测试集(包括条件重置、if-else分支、多位谓词与顺序前馈)以及含运行时参数优化的VQE型参数化电路进行验证。实验表明,生成的CUDA-Q内核通过避免分支复制降低了电路深度,借助低延迟经典反馈提升了执行效率,并通过将OpenQASM 3.0控制结构直接映射为C++控制流增强了代码可读性,从而为需要动态电路能力的近中期量子(NISQ)时代应用,架起了OpenQASM 3.0可移植电路规范与CUDA-Q面向性能的执行模型之间的桥梁。

0
下载
关闭预览

相关内容

【2022新书】给工程师的量子机器学习简介,204页pdf
专知会员服务
55+阅读 · 2022年5月22日
专知会员服务
37+阅读 · 2021年9月12日
【精通OpenCV 4】Mastering OpenCV 4 - Third Edition 随书代码
专知会员服务
40+阅读 · 2019年11月13日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
论文浅尝 | XQA:一个跨语言开放域问答数据集
开放知识图谱
26+阅读 · 2019年9月11日
资源 | 清华大学开源OpenKE:知识表示学习平台
机器之心
10+阅读 · 2017年11月4日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
3+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
9+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
6+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
8+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
6+阅读 · 5月29日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员