Grover's algorithm is a popular introductory algorithm in quantum computing that "finds" one or more elements in a list.1
It uses amplitude amplification to increase the probability of measuring the state that's to be searched for. In all, it's "pointless": you need to know which states you're looking for before you look for them.
That said, it's a classical introductory algorithm. I had to implement for my quantum computing class in the second semester of 2024. I wrote two versions that implement a statevector simulation:
-
A "classical" version using
numpy. Quite fast. Does not add noise. Essentially large matrices underneath. -
A
qiskitversion, IBM's quantum computing library, that it's more or less the same thing when you think about it, but you could add noise if you wanted to.
Out of sheer curiosity, I wanted to run my first implementation (the
lightweight one, as it only uses numpy) on a web browser, entirely
client-side. Python web apps depend on the server's processing, but that seems
a bit unnecessary here: the client's computer can do all the calculations! No
need for another computer to do it.
I found PyScript and decided to give it a go. My plan was to deploy this web app on Google Cloud Platform instance I had thanks to some Education credits I've received from another class, but those expired. Thankfully, this project can be served as a static website, so GitHub Pages will do.
None!
You just need to host the docs directory somewhere. It's a static website.
Luis Torres
Copyright (c) 2024 (luismtorresv)

