Skip to content
/ QLSTM Public

Official repository of paper "Modified Quantum Long-Short Term Memory with Variational Quantum Circuits for PV Power Forecasting"

License

Notifications You must be signed in to change notification settings

HT0710/QLSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modified Quantum Long-Short Term Memory with Variational Quantum Circuits for PV Power Forecasting

CLSTM drawio

Table of Contents

Introduction

This repository presents a hybrid AI model that integrates Quantum Machine Learning (QML) and Deep Learning to deliver fast, cost-efficient, and highly accurate photovoltaic (PV) power forecasting. By embedding Variational Quantum Circuits (VQCs) within a modified Long Short-Term Memory (LSTM) framework, we propose a model that not only improves prediction accuracy but also significantly reduces computational resources and time compared to classical ML and deep learning counterparts.

Requirements

Project is tested with Python >= 3.10

pip install -r requirements.txt

Configuration

Most of the configuration for this project can be changed in /qlstm/configs/:

  • train.yaml for training
  • callbacks.yaml for logging and training behavior

To change training model:

  1. Use or create new model class in qlstm/models
  2. Import and define your model at line 42 in qlstm/train.py.
  3. Change model config in qlstm/configs/train.yaml

For datasets with difference structure:

  1. Create a custom data module at qlstm/modules/data.py inherited from CustomDataModule class.
  2. Import and define your custom data module at line 39 in qlstm/train.py.
  3. Change data config in qlstm/configs/train.yaml

Train

Modify the configurations in qlstm/configs/train.yaml then run:

python qlstm/train.py

With CLI:

python qlstm/train.py -h

Example:

python qlstm/train.py trainer.accelerator=cpu optimizer=0.001

Logging

Note: Use full path

tensorboard --logdir /home/USER/.../QLSTM/lightning_logs

Demo App

Built with Gradio.

Launch local:

python app/app.py

Launch public:

python app/app.py --share
# or
python app/app.py -s

License

This project is licensed under the MIT License. See LICENSE for more details.

Contact

Open an issue: New issue

Mail: pthung7102002@gmail.com


About

Official repository of paper "Modified Quantum Long-Short Term Memory with Variational Quantum Circuits for PV Power Forecasting"

Topics

Resources

License

Stars

Watchers

Forks

Languages