PennyLaneAI / qml

Introductions to key concepts in quantum programming, as well as tutorials and implementations from cutting-edge quantum computing research.
https://pennylane.ai/qml
Apache License 2.0
548 stars 188 forks source link

[DEMO] A Quantum-Enhanced LSTM Layer #191

Closed rdisipio closed 3 years ago

rdisipio commented 3 years ago

General information

Name Riccardo Di Sipio

Affiliation (optional) Ideal.com (O5 Systems)


Demo information

Title [DEMO] A Quantum-Enhanced LSTM Layer

Abstract In Natural Language Processing, documents are usually presented as sequences of words. One of the most successful techniques to manipulate this kind of data is the Recurrent Neural Network architecture, and in particular a variant called Long Short-Term Memory (LSTM). Using the PennyLane library and its PyTorch interface, one can easily define a LSTM network where Variational Quantum Circuits (VQCs) replace linear operations. An application to Part-of-Speech tagging is presented in this tutorial.

Relevant links GitHub repository: https://github.com/rdisipio/qlstm Post on Towards Data Science: https://towardsdatascience.com/a-quantum-enhanced-lstm-layer-38a8c135dbfa

josh146 commented 3 years ago

Thanks for the contributed demo @rdisipio! It looks great.

Someone from the team will get back to you shortly with details on adding it to the community page.

rdisipio commented 3 years ago

Thanks! I also added a Jupyter notebook to the repository and a plot that shows a comparison between the losses for the two cases (they were shown in two separate plots in the first iteration).

co9olguy commented 3 years ago

Hi @rdisipio, thanks for the contribution! I've made a card for the website. Let me know if you spot any issues.

image

rdisipio commented 3 years ago

Looks good to me!

co9olguy commented 3 years ago

Thanks @rdisipio. Has now been merged; should be visible online shortly!