5_QML_Classifier
Quantum Machine Learning (QML) Classifier
Description
This project implements a Quantum Machine Learning (QML) classifier to perform a classification task on a classical dataset. It uses a Variational Quantum Classifier (VQC), which is a hybrid quantum-classical algorithm.
This implementation uses Qiskit Machine Learning to build and train the QML classifier on a subset of the Iris dataset.
Setup
-
Install Python: Make sure you have Python 3.6 or later installed.
-
Install Qiskit and Scikit-learn: Open your terminal or command prompt and install the necessary libraries:
bash pip install qiskit pip install qiskit-machine-learning pip install scikit-learn
How to Run
-
Navigate to this directory in your terminal.
-
Run the
qml_classifier.pyscript:bash python qml_classifier.pyThe script will load the Iris dataset, preprocess it, build a VQC, train it on the training data, and then evaluate its performance on the test data, printing the accuracy.