量子电子学报 ›› 2022, Vol. 39 ›› Issue (3): 439-445.doi: 10.3969/j.issn.1007-5461.2022.03.016

• 量子光学 • 上一篇    下一篇

基于 Cirq 的Deutsch-Jozsa 电路综合算法

戴娟∗, 李志强, 杨冬晗   

  1. ( 扬州大学信息工程学院, 江苏扬州225100 )
  • 收稿日期:2020-09-15 修回日期:2020-10-12 出版日期:2022-05-28 发布日期:2022-05-28
  • 通讯作者: E-mail: yzdxdaij@163.com E-mail:yzdxdaij@163.com
  • 作者简介:戴娟( 1996 - ) 女, 江苏盐城人, 研究生, 主要从事量子电路综合方面的研究。E-mail: yzdxdaij@163.com
  • 基金资助:
    Supported by National Natural Science Foundation of China (国家自然科学基金, 61070240, 62071240), Natural Science Foundation of Universities in Jiangsu Province (江苏省高校基金, 10KJB520021)

Synthesis of Deutsch-Jozsa circuits based on Cirq

DAI Juan∗, LI Zhiqiang, YANG Donghan   

  1. ( College of Information Engineering, Yangzhou University, Yangzhou 225100, China )
  • Received:2020-09-15 Revised:2020-10-12 Published:2022-05-28 Online:2022-05-28

摘要: 研究Deutsch 问题的关键在于构建Oracle 电路和综合Deutsch 电路。利用Google 推出的Cirq 框架, 首 次提出了一个针对n 比特Deutsch-Jozsa 算法的电路综合算法。该算法根据输入的量子线数n, 随机生成f (x) 集 合, 从而构建Deutsch 电路并对其进行模拟。其中, 生成的f (x) 集合是常数函数或者平衡函数的概率是相等的。 在此基础上对综合算法进行了优化, 优化后的算法既减少了门的总数量和层数, 也简化了电路的结构, 电路模拟 的速度较优化前成倍数地加快, 当n=15 时, 优化后的模拟所需时间仅是优化前的1/6。

关键词: 量子信息, 量子电路综合, Deutsch-Jozsa 算法, Oracle 电路, Cirq, 电路优化

Abstract: The key to the study of Deutsch problem lies in constructing Oracle circuit and synthesizing Deutsch circuit. A circuit synthesis algorithm for n-bit Deutsch-Jozsa algorithm is proposed for the first time by using the Cirq framework introduced by Google. The algorithm generates f (x) set randomly according to the number of input quantum wires n, so as to construct Deutsch circuit and simulate it. According to the algorithm, the probability that the set of f (x) generated is a constant function or an equilibrium function is equal. On this basis, the synthesis algorithm is further optimized. The optimized algorithm not only reduces the total number of gates and layers, but also simplifies the structure of the circuit. The simulation speed of the circuit is faster than that before optimization by several times. For example, when n=15, the simulation time after optimization is only 1/6 of that before optimization.

Key words: quantum information, synthesis of quantum circuits, Deutsch-Jozsa algorithm, Oracle circuits; Cirq, circuit optimization

中图分类号: