Design of Quantum Comparator Based on Extended General Toffoli Gates with Multiple Targets

By employing extended general Toffoli gates with multiple targets,a constructive method of classical quantum information comparator was presented.Further its correctness was proved theoretically.Based on which an application of quantum comparator working in the quantum search algorithm was given.Compared with the other like quantum comparators,our comparator uses less ancilla qubits so that the required related quantum resources can be saved.By setting the control conditions of the extended general Toffoli gates with multiple targets,the subsequent gates can not work any longer after obtaining the comparison result in our comparator.Thus the efficiency is improved,and the error rate is reduced and the robustness of comparator is enhanced.