Page 8 - 《软件学报》2025年第8期
P. 8

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
                 2025,36(8):3431−3443 [doi: 10.13328/j.cnki.jos.007343] [CSTR: 32375.14.jos.007343]  http://www.jos.org.cn
                 ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563



                                                                                *
                 Fast-USYN: 从酉矩阵到高质量量子电路的快速合成

                 谭思危,    卢丽强,    郎聪亮,    陈明帅,    尹建伟


                 (浙江大学 计算机科学与技术学院, 浙江 杭州 310027)
                 通信作者: 卢丽强, E-mail: liqianglu@zju. edu. cn; 尹建伟, E-mail: zjuyjw@zju.edu.cn

                 摘 要: 当前的量子程序一般由量子电路表示, 由多个量子门组成. 如果程序包含了被直接表示为酉矩阵的门, 需
                 要将这些量子门转化为基本门所构成的量子电路. 该步骤被称为量子电路合成. 然而, 当前的合成方法可能会生成
                 包含数千个门的量子电路. 这些量子电路的质量较低, 在部署到真实含噪声的量子硬件时非常容易输出错误的结
                 果. 此外, 在保证门数量较小的情况下, 当量子比特数量增至                8  时, 量子电路合成需要数周甚至数月的时间. 在这项
                 工作中, 提出一种量子电路合成方法, 实现从酉矩阵到高质量量子电路的快速合成. 首先介绍一种迭代方法, 通过
                 插入电路模块来逼近目标酉矩阵. 在迭代中, 提出一种具有奖励机制的前瞻策略减少冗余量子门. 在量子电路合成
                 的加速过程中, 为了减少候选电路模块的空间, 提出一种剪枝方法, 首先描述每个候选电路模块的闭包来刻画电路
                 的表示空间, 然后基于模块的表示空间重叠率进行剪枝, 以此构建一个小而高质量的候选集合. 此外, 为了减少搜
                 索最优门参数的开销, 将选定的候选与目标酉矩阵打包成统一电路, 然后通过计算其在基态上的期望来快速获得
                 近似距离. 实验证明, 与当前的最优的量子电路合成方法                 QuCT  和  QFAST  相比, 该方法在  5–8  量子比特量子电路
                 合成中实现了减少门数量为原有方法的              37.04%–62.50%, 同时实现  3.7–20.6  倍的加速.
                 关键词: 量子计算; 量子软件; 量子程序; 编译; 程序合成
                 中图法分类号: TP311

                 中文引用格式: 谭思危, 卢丽强, 郎聪亮, 陈明帅, 尹建伟. Fast-USYN: 从酉矩阵到高质量量子电路的快速合成 . 软件学报, 2025,
                 36(8): 3431–3443. http://www.jos.org.cn/1000-9825/7343.htm
                 英文引用格式: Tan SW, Lu LQ, Lang CL, Chen MS, Yin JW. Fast-USYN: Fast Synthesis from Unitary Matrices to High-quality Quantum
                 Circuits. Ruan Jian Xue Bao/Journal of Software, 2025, 36(8): 3431–3443 (in Chinese). http://www.jos.org.cn/1000-9825/7343.htm

                 Fast-USYN: Fast Synthesis from Unitary Matrices to High-quality Quantum Circuits
                 TAN Si-Wei, LU Li-Qiang, LANG Cong-Liang, CHEN Ming-Shuai, YIN Jian-Wei
                 (College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China)
                 Abstract:  Current  quantum  programs  are  generally  represented  by  quantum  circuits,  including  various  quantum  gates.  If  the  program
                 contains gates that are directly represented as unitary matrices, these gates need to be transformed into quantum circuits composed of basic
                 gates. This step is called quantum circuit synthesis. However, current synthesis methods may generate circuits with thousands of gates. The
                 quality of these quantum circuits is low and they are very likely to output incorrect results when deployed to real noisy quantum hardware.
                 When  the  number  of  qubits  is  increased  to  8  while  ensuring  a  small  number  of  gates,  the  quantum  circuit  synthesis  takes  weeks  or  even
                 months. This study proposes a quantum circuit synthesis method, realizing the fast synthesis from unitary matrices to high-quality quantum
                 circuits.  Firstly,  an  iterative  method  is  introduced  to  approximate  the  target  unitary  matrix  by  inserting  circuit  modules.  During  the
                 iteration,  a  look-ahead  strategy  with  a  reward  mechanism  is  proposed  to  reduce  redundant  quantum  gates.  In  the  acceleration  process  of
                 quantum  circuit  synthesis,  the  study  proposes  a  pruning  method  to  reduce  the  space  of  candidate  circuit  modules.  The  method  first


                 *    基金项目: 国家重点研发计划  (2023YFF0905200); 中央高校基本科研业务费专项资金   (226-2024-00051, 226-2024-00140); 浙江尖兵项
                  目  (2023C01036)
                  本文由“形式化方法与应用”专题特约编辑陈明帅研究员、田聪教授、熊英飞副教授推荐.
                  收稿时间: 2024-08-21; 修改时间: 2024-10-14; 采用时间: 2024-11-26; jos 在线出版时间: 2024-12-10
                  CNKI 网络首发时间: 2025-04-21
   3   4   5   6   7   8   9   10   11   12   13