FLAP Journal 2025 Journal Article
Intermediate-qudit Assisted Improved Quantum Algorithm for String Matching with an Advanced Decomposition of Fredkin Gate
- Amit Saha
- Om Khanna
The string-matching problem has a broad variety of applications due to its pattern-matching ability. The circuit-level implementation of a quantum string-matching algorithm, which matches a search string (pattern) of length M inside a longer text of length N, has already been demonstrated in the literature to outperform its classical counterparts in terms of time complexity and space complexity. Higher-dimensional quantum computing is becoming more and more common as a result of its powerful storage and processing capabilities. In this article, we have shown an improved quantum circuit implementation for the string-matching problem with the help of higher-dimensional intermediate temporary qudits. It is also shown that with the help of intermediate qudits not only the complexity of depth can be reduced but also query complexity can be reduced for a quantum algorithm, for the first time to the best √ of our knowledge. Our algorithm has an improved √ query complexity of O( N − M + 1) with overall time complexity O N − M + 1 ((log (N − M + 1) log N ) + log(M )) as compared to the state-of-the-art work √ which has a query complexity of √ 2 O( N ) with overall time complexity O N (log N ) + log(M ), while the ancilla count also reduces to N2 from N2 + M. The cost of the state-of-the- art quantum circuits for string-matching problem is colossal due to a huge number of Fredkin gates and multi-controlled Toffoli gates. We have exhibited