Chinese Journal of Quantum Electronics ›› 2022, Vol. 39 ›› Issue (3): 439-445.doi: 10.3969/j.issn.1007-5461.2022.03.016

• Quantum Optics • Previous Articles     Next Articles

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

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

CLC Number: