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…



Frank Zickert | Quantum Machine Learning

You're interested in quantum computing and machine learning. But you don't know how to get started? Let me help