Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

A quantum algorithm for string matching

Journal Article · · npj Quantum Information

Abstract

Algorithms that search for a pattern within a larger data-set appear ubiquitously in text and image processing. Here, we present an explicit, circuit-level implementation of a quantum pattern-matching algorithm that matches a search string (pattern) of length M inside a longer text of length N . Our algorithm has a time complexity of $$$$\tilde{O}(\sqrt{N})$$$$ O ̃ ( N ) , while the space complexity remains modest at O ( N  +  M ). We report the quantum gate counts relevant for both pre-fault-tolerant and fault-tolerant regimes.

Sponsoring Organization:
USDOE
Grant/Contract Number:
SC0020312; SC0019040
OSTI ID:
1765937
Alternate ID(s):
OSTI ID: 1852787
Journal Information:
npj Quantum Information, Journal Name: npj Quantum Information Journal Issue: 1 Vol. 7; ISSN 2056-6387
Publisher:
Nature Publishing GroupCopyright Statement
Country of Publication:
United Kingdom
Language:
English

References (19)

Sublinear approximate string matching and biological applications journal November 1994
Pattern matching in a digitized image journal November 1994
Quantum Pattern Matching Fast on Average journal August 2015
Applications of approximate string matching to 2D shape recognition journal December 1993
String matching in O(n+m) quantum time journal February 2003
Automated optimization of large quantum circuits with continuous parameters journal May 2018
Ground-state energy estimation of the water molecule on a trapped-ion quantum computer journal April 2020
Occurrence of the potent mutagens 2- nitrobenzanthrone and 3-nitrobenzanthrone in fine airborne particles journal January 2019
Toward the first quantum simulation with quantum speedup journal September 2018
Quantum amplitude amplification and estimation book January 2002
Single-step implementation of high-fidelity n -bit Toffoli gates journal February 2020
Quantum template matching journal July 2001
Advantages of using relative-phase Toffoli gates with an application to multiple control Toffoli optimization journal February 2016
Matched filtering of gravitational waves from inspiraling compact binaries: Computational cost and template placement journal June 1999
Quantum Random Access Memory journal April 2008
Exact String Matching Algorithms: Survey, Issues, and Future Research Directions journal January 2019
Fast Pattern Matching in Strings journal June 1977
The Complexity of Pattern Matching for a Random String journal August 1979
A Subexponential-Time Quantum Algorithm for the Dihedral Hidden Subgroup Problem journal January 2005

Similar Records

The diphoton $$q_T$$ spectrum at N$$^3$$LL$$^\prime $$ + NNLO
Journal Article · Thu Oct 14 00:00:00 EDT 2021 · European Physical Journal. C, Particles and Fields · OSTI ID:1825784

PANDA as midrapidity detector for a future HESR Collider at FAIR
Journal Article · Mon Jun 01 00:00:00 EDT 2020 · European Physical Journal. A · OSTI ID:1800792

Ion trap long-range XY model for quantum state transfer and optimal spatial search
Journal Article · Mon Jun 12 00:00:00 EDT 2023 · Quantum Science and Technology · OSTI ID:1984726

Related Subjects