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.
This paper presents a new technique of magnitudecomparator for quantum bit string comparison. In the proposedmethod, the comparison between two quantum bit strings isperformed with the optimum number of operations. We have alsoshown that the proposed technique has time complexityO(( + )), whereas the best known existing technique hasO(nlog n),where n is the number of quantum bits. In addition, wehave proposed another technique to produce a compact quantumcomparator circuit. We have also introduced three new quantumgates with unique unitary matrices which represent the proposedquantum circuit more compactly than the existing quantumgates. The proposed comparator circuit has been designed usingthe proposed quantum bit comparator circuit named MidpointQubits Comparison (MQC) Circuit and another proposedquantum bit comparator circuit named Rest Qubits Comparison(RQC) Circuit. The comparative study shows that the proposedcomparator circuit outperforms the existing comparators; e.g.,the proposed 64-qubit comparator improves 7.19% on number ofquantum gates, area and delay; and 50.39% on garbage outputsover the existing best one
In this paper, we study the string matching problem. We design a quantum string-matching algorithm for noisy intermediate-scale quantum (NISQ) computers, given the current leading quantum processing units (QPUs) having no more than a few hundred qubits [16]. We also compare the performance of classic algorithms and quantum algorithms under various combinations. Our study provides a comprehensive and quantitative guide for users to choose appropriate classic or quantum algorithms for their string matching problems.