Extending C++ for Heterogeneous Quantum-Classical Computing

Thien Nguyen, Anthony Santana, Tyler Kharazi, D. Claudino, H. Finkel, A. McCaskey
{"title":"Extending C++ for Heterogeneous Quantum-Classical Computing","authors":"Thien Nguyen, Anthony Santana, Tyler Kharazi, D. Claudino, H. Finkel, A. McCaskey","doi":"10.1145/3462670","DOIUrl":null,"url":null,"abstract":"We present qcor—a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context. Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language agnostic manner, as well as a hardware-agnostic, retargetable compiler workflow targeting a number of physical and virtual quantum computing backends. qcor leverages novel Clang plugin interfaces and builds upon the XACC system-level quantum programming framework to provide a state-of-the-art integration mechanism for quantum-classical compilation that leverages the best from the community at-large. qcor translates quantum kernels ultimately to the XACC intermediate representation, and provides user-extensible hooks for quantum compilation routines like circuit optimization, analysis, and placement. This work details the overall architecture and compiler workflow for qcor, and provides a number of illuminating programming examples demonstrating its utility for near-term variational tasks, quantum algorithm expression, and feed-forward error correction schemes.","PeriodicalId":365166,"journal":{"name":"ACM Transactions on Quantum Computing","volume":"47 30 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"30","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Quantum Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3462670","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 30

Abstract

We present qcor—a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context. Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language agnostic manner, as well as a hardware-agnostic, retargetable compiler workflow targeting a number of physical and virtual quantum computing backends. qcor leverages novel Clang plugin interfaces and builds upon the XACC system-level quantum programming framework to provide a state-of-the-art integration mechanism for quantum-classical compilation that leverages the best from the community at-large. qcor translates quantum kernels ultimately to the XACC intermediate representation, and provides user-extensible hooks for quantum compilation routines like circuit optimization, analysis, and placement. This work details the overall architecture and compiler workflow for qcor, and provides a number of illuminating programming examples demonstrating its utility for near-term variational tasks, quantum algorithm expression, and feed-forward error correction schemes.
异构量子经典计算的c++扩展
我们提出了qcor-a语言扩展到c++和编译器实现,使异构量子经典编程,编译和执行在一个单一的源上下文中。我们的工作提供了一个一流的c++编译器,支持以量子语言不可知的方式进行高级量子内核(函数)表达式,以及一个针对许多物理和虚拟量子计算后端的硬件不可知、可重定向的编译器工作流。qcor利用新颖的Clang插件接口,并建立在XACC系统级量子编程框架的基础上,为量子经典编译提供了最先进的集成机制,利用了整个社区的最佳技术。qcor最终将量子内核转换为XACC中间表示,并为量子编译例程(如电路优化、分析和放置)提供用户可扩展的钩子。这项工作详细介绍了qcor的整体架构和编译器工作流程,并提供了一些有启发性的编程示例,展示了它在近期变分任务、量子算法表达式和前馈纠错方案中的实用性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信