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.
Project is tested with Python >= 3.10
pip install -r requirements.txtMost of the configuration for this project can be changed in /qlstm/configs/:
train.yamlfor trainingcallbacks.yamlfor logging and training behavior
To change training model:
- Use or create new model class in
qlstm/models - Import and define your model at line 42 in
qlstm/train.py. - Change model config in
qlstm/configs/train.yaml
For datasets with difference structure:
- Create a custom data module at
qlstm/modules/data.pyinherited fromCustomDataModuleclass. - Import and define your custom data module at line 39 in
qlstm/train.py. - Change data config in
qlstm/configs/train.yaml
Modify the configurations in qlstm/configs/train.yaml then run:
python qlstm/train.pyWith CLI:
python qlstm/train.py -hExample:
python qlstm/train.py trainer.accelerator=cpu optimizer=0.001Note: Use full path
tensorboard --logdir /home/USER/.../QLSTM/lightning_logsBuilt with Gradio.
Launch local:
python app/app.pyLaunch public:
python app/app.py --share
# or
python app/app.py -sThis project is licensed under the MIT License. See LICENSE for more details.
Open an issue: New issue
Mail: pthung7102002@gmail.com
