https://github.com/splch/ionq-ml-demo
https://github.com/splch/ionq-ml-demo
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/splch/ionq-ml-demo
- Owner: splch
- Created: 2023-09-16T08:21:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-19T05:03:43.000Z (almost 3 years ago)
- Last Synced: 2025-04-02T03:51:31.721Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 12.2 MB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IonQ Machine Learning Demo
## Description
This repository contains code for a hybrid quantum-classical machine learning classifier. The model is trained on the red wine quality dataset and utilizes both classical neural networks and quantum neural networks (QNNs) from Qiskit.
**Ansatz**:

**Decision Boundary:**

## Installation
Navigate to the project directory:
```bash
cd ionq-ml-demo
```
Create a virtual environment (optional):
```bash
python3 -m venv .venv
```
Activate the virtual environment:
```bash
source .venv/bin/activate # On Unix or MacOS
.venv\Scripts\Activate # On Windows
```
Install the required packages:
```bash
pip install -r requirements.txt
```
## Usage
1. Open the `main.ipynb` Jupyter Notebook:
```bash
jupyter notebook main.ipynb
```
2. Run the cells in the notebook to train the model. The trained model will be saved as `model.pt`.
3. To use the model in your applications, you can load it using PyTorch's `torch.load()` method.