Abstract
Quantum Bit String Comparators (QBSC) operate on two sequences of n-qubits, enabling the determination of their relationships, such as equality, greater than, or less than. This is analogous to the way conditional statements are used in programming languages. Consequently, QBSCs play a crucial role in various algorithms that can be executed or adapted for quantum computers. The development of efficient and generalized comparators for any \(n\)-qubit length has long posed a challenge, as they have a high-cost footprint and lead to quantum delays.
Comparators that are efficient are associated with inputs of fixed length. As a result, comparators without a generalized circuit cannot be employed at a higher level, though they are well-suited for problems with limited size requirements. In this paper, we introduce a generalized design for the comparison of two \(n\)-qubit logic states using just two ancillary bits. The design is examined on the basis of qubit requirements, ancillary bit usage, quantum cost, quantum delay, gate operations, and circuit complexity, and is tested comprehensively on various input lengths. The work allows for sufficient flexibility in the design of quantum algorithms, which can accelerate quantum algorithm development.
Reference12 articles.
1. Zhuang, Xi-Ning and Chen, Zhao-Yun and Xue, Cheng and Wu, Yu-Chun and Guo, Guo-Ping, “Quantum Encoding and Analysis on Continuous Stochastic Process”, 2022.
2. David Sena Oliveira and Rubens Viana Ramos, Quantum bit string comparator: circuits and applications, Quantum Comput. Comput, vol. 7, no. 1, pp. 17-26, 2007.
3. Nikitas Stamatopoulos, Daniel J Egger, Yue Sun, Christa Zoufal, Raban Iten, Ning Shen, Stefan Woerner. Option pricing using quantum computers. Quantum, 4:291, 2020. Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften.
4. Yewei Yuan, Chao Wang, Bei Wang, Zhao-Yun Chen, Meng-Han Dou, Yu-Chun Wu, and Guo-Ping Guo, An Improved QFT-Based Quantum Comparator and Extended Modular Arithmetic Using One Ancilla Qubit, arXiv preprint arXiv:2305.09106, (2023).
5. Wang, Dong; Liu, Z-H; Zhu, W-N; Li, S-Z. Design of quantum comparator based on extended general Toffoli gates with multiple targets. Publisher: Guojia Kexue Jishu Bu, Xinan Xinxi Zhongxin, 132 Shengli Lu Chongqing, China ... Computer Science, 39(9), 302–306, 2012.