Giter VIP home page Giter VIP logo

trainable-embedding-qml's Introduction

Trainable-Embedding-QML

Implementation of Quantum Random Access Coding (QRAC) and Trainable Embedding (TE) based on our preprinted paper here

Run experiment

To run the experiment provided in the paper, please take a look at configs/expriment_config.yaml. In experiment_config.yaml, the structure is

<dataset 1 (exp_name)>
    - <method 1 (sub_exp_name)>
        - param 1
        - param 2
    - <method 2>
        - param 1
        - param 2

<dataset 2>
...

which there are 2 levels, exp_name and sub_exp_name. To run all expriment in the dataset, please run the python script run_exp.py with the following argument

python run_exp --exp_name <dataset_name>

For example, to run all breast cancer dataset experiments

python run_exp --exp_name bc

If you want to run a single experiment, please specify the sub_exp_name. For example, we run the QRAC method on breast cancer.

python run_exp.py --exp_name bc --sub_exp_name qrac

Run custom experiment

Ther are 4 files for different experiment

parity_check.py - Parity function problem
bc.py - Breast cancer
titanic.py - Titanic Survival
mnist.py - MNIST handwritten digit

The parameter for each experiment can be listed using --help.

Run on real device (NEW!)

6 bits parity check

run_exp.py --exp_name pc_6 --sub_exp_name te_pc_real_device

Please update detail at this line

100 epochs Titanic Survival

run_exp.py --exp_name ts --sub_exp_name te_reg_ts_real

Please update detail at this line

You can change the parameters in config/experiment_config.yaml.

Citation

@article{Thumwanit2021TrainableDF,
  title={Trainable Discrete Feature Embeddings for Variational Quantum Classifier},
  author={Napat Thumwanit and Chayaphol Lortararprasert and Hiroshi Yano and Raymond H. Putra},
  journal={ArXiv},
  year={2021},
  volume={abs/2106.09415}
}

trainable-embedding-qml's People

Contributors

barnrang avatar tiigerchayaphol 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.