Posts

Showing posts from June, 2023

The simplest quantum binary classifier

Image
How the simplest quantum binary classifier looks like? While searching in internet for the smallest quantum classifier I came across the article from Maria Schuld “Building the world’s smallest quantum classifier” (1) and, based on the circuit proposed there, I thought an even smaller classifier could be built. Here I show a simple variational circuit that can be applied to a 2-feature dataset for binary classification. Though the example is questionable for practical purposes, it gives interesting insights on how to apply quantum computing to machine learning. The circuit is composed of two parts: the embedding, which transforms the classical data into quantum states, and the ansatz, which is parametrized, and the parameters are optimized using a particle swarm optimization algorithm (2). The circuit and the findings follow. First, we need a dataset! Instead of searching for real datasets which must be cleaned, normalized, etc… I’ve created one. The dataset contains 60 samples, each s...