This repository contains scripts, Jupyter notebooks, and scripts containing function libraries. This repository is designed to facilitate data preprocessing, model training, and testing for time series forecasting tasks with parametrized quantum circuits. It is reusable with different datasets, circuit architectures (MPS and 2-layer Ising currently implemented), and training hyperparameters. The code is optimized for GPU acceleration using the Jax library.
DataPreprocessing.py
: Python script for data preprocessing.DataPreprocessing.ipynb
: Jupyter notebook for data preprocessing.
Training.py
: Python script for training machine learning models.Training.ipynb
: Jupyter notebook for training machine learning models.
Testing.py
: Python script for testing trained models.Testing.ipynb
: Jupyter notebook for testing trained models.
DataPreprocessingFuncs.py
: Python script containing functions for data preprocessing.
TrainingFuncs.py
: Python script containing functions for training machine learning models.
TestingFuncs.py
: Python script containing functions for testing trained models.
The results
folder contains subfolders that store the results obtained from the Training and Testing stages. Each subfolder is named according to the dataset, architecture, and hyperparameters used in training and testing. This structure ensures reusability and facilitates interpretation of the outcomes.
- Installation:
- Clone this repository to your local machine.
- Ensure you have the necessary dependencies installed, including Jax, Jaxlib and Pennylane.
- Dataset Setup:
- Prepare your time series dataset in a compatible format: CSV file containing sequential data of interest in one column in consecutive rows.
- Use the provided data preprocessing utilities to modify your data to suit your specific use cases. Functionalities include calculating gradient, extracting dominant signals, and artificially adding noise and long-term trends.
- Model Training and Testing:
- Explore the Jupyter notebooks to understand the training process and experiment with different circuit architectures.
- Customize hyperparameters to explore training and model performance.
- Function Libraries:
- Utilize the function libraries in the Functions directory to extend the functionality or create your own custom scripts.
- Circuit Libraries:
- Add new circuit architectures in the Circuits directory.
If you have any questions, suggestions, or feedback, please feel free to contact Andrew Spiro at [email protected].