Iris Dataset

Easy

The classic Iris flower dataset for quantum classification

Dataset Overview
Key characteristics and specifications

Samples

150

Features

4 (Sepal, Petal)

Classes

3 (Iris Species)

Difficulty

Easy

This dataset contains measurements of iris flowers from three different species. Each flower is described by four features: sepal length, sepal width, petal length, and petal width. This is an ideal starting point for quantum machine learning as the feature space is moderate and the classification task is well-understood.

Dataset Visualization
Iris dataset scatter plot showing three species clusters
Why Only 2 Classes?
Understanding the binary classification approach

Classes Used in This VQC:

Class 0: Setosa(First iris species)
Class 1: Versicolor(Second iris species)
Class 2: Virginica(Excluded for binary classification)

The backend filters the dataset to keep only the first two classes using:mask = (y == 0) | (y == 1)

Quantum Encoding
How features are encoded into quantum states

Encoded state representation:

where
Each of the four features undergoes normalization:
where
is the mean and
is the standard deviation of the feature across all samples.
VQC Cost Function
Quantum optimization objective

where:

= number of training samples (150)
= VQC prediction for sample n
= true label (0 or 1)
= trainable parameters
Feature Statistics
Statistical properties of each feature

Sepal Length

Mean: 5.84 cm | Std Dev: 0.83 cm

Sepal Width

Mean: 3.06 cm | Std Dev: 0.43 cm

Petal Length

Mean: 3.76 cm | Std Dev: 1.76 cm

Petal Width

Mean: 1.20 cm | Std Dev: 0.76 cm