The Quantum Bit Comparator
Quantum computing doesn’t need to be hard to understand
Do you want to get started with Quantum Machine Learning? Have a look at Hands-On Quantum Machine Learning With Python.
You have two integers! Write a quantum algorithm that tells you which one is greater.
One of my fellow readers asked me a question this week. He also provided me with the answer. In 2007, David Sena Oliveira and Rubens Viana Ramos wrote a scientific paper called Quantum bit string comparator: Circuits and Applications. But apparently, a scientific paper is not always easy to understand.
Here’s the solution presented in this paper: “Given two 𝑛-partite of qubits quantum states |𝑎⟩|𝑏⟩ the quantum bit string comparator is a unitary evolution 𝑈𝐶𝑀𝑃 that works as shown in
This seemingly simple challenge reveals why quantum computing is not a beginner-friendly topic! Most lectures, scientific papers, books, and even blog posts treat quantum computing as an extension of quantum physics. They teach you about quantum superposition, where a particle exists in a complex linear combination of its basis states. They continue with entanglement, two particles sharing a state no matter how far apart they are. And they will teach you about quantum information theory.
These are all great topics — but they don’t help you write a meaningful quantum algorithm, like one that tells you which of two numbers is greater.
But even worse than what they teach is how they teach it. Most quantum computing instructors teach quantum computing with an abundance of math and physics. Of course, they do! They do it because they are physicists or mathematicians. And their course is an elective in a physics program. So they are essentially teaching future physicists.
Studying physics is the way to go if you want to understand how a quantum computer works. But guess what. You don’t need to understand how a quantum computer works to use one! Likewise, you don’t need to understand how a classical computer works to use one!
That’s why I’ve made it my mission to explain quantum computing and quantum machine learning in an accessible way. In a way that developers…