Giter VIP home page Giter VIP logo

entangled-meanings's Introduction

Entangled-Meanings

GitHub repo for the IEEE QCE24 poster with the same title.

Classification Tasks

Environment

pennylane 0.36.0
numpy 1.26.4 (PCA, tsne and LDA used)
scikit-learn 1.4.2
gensim 4.1.2 (Word2Vec used)
spacy 3.7.2
umap-learn 0.5.5 (UMAP used)
scipy 1.12.0 (must use version < 1.13.0, otherwise there will be conflicts with gensim)

Datasets

The lambeq dataset is stored in /Datasets/lambeq.txt and the Amazon dataset is stored in /Datasets/small_amazon_reviews.txt.

We load the lambeq dataset and vectorize the text using the python script /Datasets/lambeq_data_loader, while for the Amazon review dataset we use /Datasets/amazon_data_loader

Quantum Encoding Algorithms

We implemented amplitude encoding and the divide-and-conquer encoding from A divide-and-conquer algorithm for quantum state preparation. The code for amplitude encoding is in /QuantumEncodings/amp_enc.py, and the code for divide-and-conquer encoding is in /QuantumEncodings/dc_enc.py.

The code for the training process is in /quantum_classifier.py, by calling the main() function.

Dimension Reduction

We applied dimension reductions like tsne, PCA, UMAP and LDA in the python script /get_class_results.py. And by executing get_class_results.py, we can get the results in Table 1 in the poster.

Results

The results in Table 1 in the poster is stored in /classification_results.csv.

Ambiguity Resolution

All the code and results for the ambiguity resolution task in the poster are in the jupyter notebook /disambiguation.ipynb.

Environment

qiskit 1.1.1
qiskit-aer 0.14.2
qiskit-machine-learning 0.7.2
numpy 1.26.4

entangled-meanings's People

Contributors

chizhang24 avatar

Watchers

 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.