GithubHelp home page GithubHelp logo

quvance / quantum-gan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jundeli/quantum-gan

0.0 0.0 0.0 4.22 MB

PyTorch and PennyLane implementation of Quantum GAN with Hybrid Generator.

License: MIT License

Shell 0.22% Python 84.57% Jupyter Notebook 15.21%

quantum-gan's Introduction

Quantum GAN with Hybrid Generator

PennyLane and Pytorch implementation of QGAN-HG: Quantum generative models for small molecule drug discovery, based on MolGAN (https://arxiv.org/abs/1805.11973)
This library refers to the following source code.

For details see Quantum Generative Models for Small Molecule Drug Discovery by Junde Li, Rasit Topaloglu, and Swaroop Ghosh.

Dependencies

Structure

  • data: should contain your datasets. If you run download_dataset.sh the script will download the dataset used for the paper (then you should run data/sparse_molecular_dataset.py to conver the dataset in a graph format used by MolGAN models).
  • models: Class for Models.

Training

python main.py --quantum True --layer 2 --qubits 10 --complexity 'hr'

If you want to run classical MolGAN, please set quantum argument to False. But you can still train reduced models by setting complexity to 'hr'-highly reduced (around 2% of original generator papameters), 'mr'-moderately reduced (around 15%), or 'nr'-no reduce. Layer and qubits can adjust expressive power of variational quantum circuit.

python p2_qgan_hg.py

Run 'p2_qgan_hg'.py or 'p4_qgan_hg.py' for implementing patched quantum GAN with hybrid generator for 2 pathes and 4 patches, respectively.

Demo

You can see generated small molecules with pretrined models which are included in qgan-hg/models. Quantum circuit parameters are shown in gen_weights.csv. Inference can be done on either PennyLane quantum simulator or real IBM quantum computers.

qgan-hg-demo.ipynb 

Below are some generated molecules:

Citation

@ARTICLE{2021arXiv210103438L,
       author = {{Li}, Junde and {Topaloglu}, Rasit and {Ghosh}, Swaroop},
        title = "{Quantum Generative Models for Small Molecule Drug Discovery}",
      journal = {arXiv e-prints},
     keywords = {Computer Science - Emerging Technologies, Computer Science - Machine Learning, Quantum Physics},
         year = 2021,
        month = jan,
          eid = {arXiv:2101.03438},
        pages = {arXiv:2101.03438},
archivePrefix = {arXiv},
       eprint = {2101.03438},
 primaryClass = {cs.ET},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021arXiv210103438L},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

quantum-gan's People

Contributors

jundeli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.