# How do I use the quantum searching algorithm to loop search through a datafile in qiskit?

I have a localhost index.html has a table contains names and address and balances etc... also there is a search bar on the home page to go through the pages, the interesting thing is, there is loooot of pages like 100 million pages (no kidding) it pretty crazy huge, i heard a quantum algorithm can search through a list much more quickly than an algorithm limited by the plodding pace of classical physics. I was wondering if it is possible to search through all these pages? or maybe just some of them? for instance i want to loop search through the pages for any names contains some funds on the balance section and the script will save the output on excel or txt file e.g:

Name: Alan jackson City/Town: Wadebridge Balance: 0.00000$Name: Leonard maguire City/Town: Paris Balance: 1445.00000$

Name: Ricardo gonzalez City/Town: San paolo Balance: 0.00000$output: leonard maguire has a 1445$ on the balance.

and then the script continues to search for more and save the output on the same file! if it possible can someone help me with the python script using Qiskit?

sorry for my english. Thank you so much.

Currently the state of quantum computers is not advanced enough; while you can run Grover's algorithm on the existing quantum computers, you will not be able to benefit from this in the problem you're describing.

Note that the power of Grover's algorithm is in searching an unordered list; for the problem you're describing, it seems a much better solution is constructing some kind of index or search tree and using it for queries.

• thanks mate! understood Apr 23 at 18:40

i heard a quantum algorithm can search through a list much more quickly than an algorithm limited by the plodding pace of classical physics

Grover's algorithm, also known as the quantum search algorithm, solves the unstructured search problem in $$O(\sqrt{N})$$ operations while in classical computation this problem cannot be solved in fewer than $$O(N)$$ operations.

By unstructured search problem we mean that we can't makes any assumptions about the structure of the search space, or at least we don't know how to make use of it.

In your case, there is a lot a structure in the search space that can be used to speedup the search process. Classical database engines are built and optimized to handle this amount of data. For example, you could achieve an exponential speedup by creating database indexes[1]. Big data technologies like Apache Hive[2] and Spark SQL[3] can efficiently handle amount of data much larger than what you've mentioned.

Can we use quantum computers to implement these classical techniques quantumly in a way that gives us a quadratic speedup? probably. But quantum computing is far from achieving this from both hardware and software perspectives.

• Thank you very much, So it is not possible in the meantime! I will create an index or a search tree and use i for the queries. Just like what the first comment said. Apr 23 at 18:40
• To get a detailed classical solution for your problem, you can ask about it on Stack Overflow Apr 23 at 19:20