gopalm-ai / qosf-qgan

Exploring learnability and optimal hyperparameters of various quantum generative adversarial networks and quantum neural networks using Pennylane.

Home Page:https://pavanjay.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exploring the learnability of QGANs

This project is an explorative dive into the realm of quantum generative adversarial networks under the context of $DIS stock price prediction. Starting with a simple parameterized quantum circuit, to a quantum Wasserstein generative adversarial network, all notebooks are included in the repo. Through several numerical experiments, we hoped to take small empirical stabs at a few prevalent questions in quantum machine learning like: which hyperparameters are optimal for quantum generative adversarial learning, and how do you overcome vanishing gradients?

With regards to the application of learning consecutive equity prices, we built a proof-of-concept quantum Wasserstein generative adversarial network accompanied with a traditional quantum generative adversarial network and a simple quantum neural network to accomplish the task of predicting the next four days of prices given fifteen prior days of price data. We evaluate quantum model capacity, convergence characteristics, training efficency, and more on the basis of 7 hyperparameters we tuned which were recorded in the hyperparameter tuning logs.

Don't know where to start? Try out a friendly introduction to quantum generative adversarial networks!

Would also like to express my gratitude to my QOSF mentor Yunong Shi from AWS Braket who helped give direction throughout this project! Many thanks!

Repo structure

To document the complete journey venturing into the space of QGANs, I've uploaded all the notebooks along the way which guided my decisions along the way.

  • ./QGANs explained.md: Learn what QGANs are all about — An accessible introduction to quantum generative adversarial networks.
  • ./QNN Approach/: Preliminary approach — Here we evaluate the upper bound of the number of data samples a simple quantum neural network can learn/memorize and a naive attempt to see how a simple parameterized quantum circuit could fit to predict DIS stock prices.
  • ./Conditional QGAN.ipynb/: QGAN approach — Quantum generative adversarial network used to learn n batches of $DIS data samples. Used for hyperparameter tuning.
  • ./Conditional QWGAN.ipynb: Final iteration on QGAN approach — An advanced quantum generative adversarial network architecture leveraging the Wasserstein metric to determine applicability in learning sequential data. Includes a thorough explanation of classical WGANs and the Wasserstein metric!
  • ./Hyperparameter_tuning_logs.pdf: Hyperparameter logs — A notion pdf with record of various hyperparameter configurations and the resulting effect on loss and accuracy.
  • ./data: Data fetching and processing into dataset

If any of the notebooks fail to load on GitHub, enter the GitHub notebook URL here and you will see it load

Trained examples

Final model architecture

References

About

Exploring learnability and optimal hyperparameters of various quantum generative adversarial networks and quantum neural networks using Pennylane.

https://pavanjay.com/


Languages

Language:Jupyter Notebook 100.0%