Skip to content

Ivan-Sergeyev/qml-time-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Machine Learning for Time Series Forecasting

This repository presents a hybrid quantum-classical machine learning approach to time series forecasting, integrating classical machine learning techniques with quantum circuits. This project aims to explore the potential of quantum machine learning (QML) in predictive analytics, offering a novel solution for complex forecasting challenges.

Currently, the project works with two models: the classical LSTM model and its hybrid quantum-classical analog called HQCLSTM from this paper; the models are compared on the AAPL Stock dataset.

Table of Contents

Repository Structure

├── data/  # Datasets used in the project
├── evaluation/  # Saved results of model evaluation
├── models/  # Saved trained models
├── src/  # Source code
│   └── qml_time_series.ipynb  # Main Jupyter notebook
├── training/  # Saved results of model training
├── LICENSE.md  # License file
└── README.md  # Project README file

Getting Started

To simply browse the project, you can view the main Jupyter notebook here on GitHub, on Google Colab, or locally.

To run and edit the project, the easiest way to get started is to import the repository to Google Colab following these steps.

  1. Get a copy of the project: git clone it or download and unpack the .zip archive.
  2. Save the project to your Google Drive:
    1. Using the web interface: use the 'folder upload' function.
    2. Using the app: save the project to a folder that is synced with your drive.
  3. Open the main Jupyter notebook on Google Colab:
    1. Open the 'Recent' or 'Google Drive' tab
    2. Search for qml_time_series.ipynb
    3. Open the notebook.

Colab is the preferred option because of how importing the ML packages works and how much computational power is needed to train the models, especially the quantum ones. Running everything locally may be possible, but I have not tested it and cannot offer any support in case you try to do it.

Main Notebook

The core of this project is in the main Jupyter notebook. It covers data loading, preprocessing, model architecture (both classical and quantum), training, evaluation, and result visualization.

Dependencies

All prerequisite libraries are installed at the beginning of the notebook, most notably including:

Colab may require you to restart the session and re-run the notebook to make sure all dependencies are installed properly.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Time series forecasting model combining classical machine learning and quantum circuits.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors