Skip to content

Quantum algorithm implementation for welknown Pattern Matching problem

Notifications You must be signed in to change notification settings

khantiRindani/QuantumPatternMatching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course Project of Quantum Computing which made it to IBM-Q awards.

Problem Statement:

We are modeling String Pattern matching problem in quantum world.

String Pattern Matching is a classical world problem where we need to find occurences of the pattern in a given string.

There are two variants of it explained by below examples:

  1. Exact Matching:
    String: collar
    Pattern: olla
    Answer: olla is matched at index 1 of the original string
  2. Closest Matching:
    String: collar
    Pattern: ola
    Answer: There is no exact substring match but substring ol and la have closest pattern matching

The quantum version is used in genme sequence with each charcter matching a protein alias with sequence forming like RHT

Here, for the scope of this problem, we are using binary symbols. So, our sequences will look like: String: 1110 Pattern: 10

Approach:

  1. Initialization with state super-position
  2. Mark the exact pattern “p” through the Oracle
  3. Grover Search to find out matching q-bits
  4. Amplitude Amplification to increase probability of likely result
  5. Measurement
  6. Results
Screenshot 2024-01-05 at 9 51 32 AM

Solution:

We can build orcale as black-box to tackle any pattern or custom made for a specific pattern and use it against all the incoming strings.

The codes written as solution are here: link

Demo and Tutorial:

link

About

Quantum algorithm implementation for welknown Pattern Matching problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published