# Quantum LSTM model

**URL:** <https://discuss.pennylane.ai/t/quantum-lstm-model/2014>\
**Category:** PennyLane Help\
**Created:** [July 4, 2022, 7:23pm UTC](https://discuss.pennylane.ai/t/quantum-lstm-model/2014 "2022-07-04T19:23:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NikSchet](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nikschet/32/786_2.png) [@NikSchet](https://discuss.pennylane.ai/u/NikSchet)\
**Post date:** [July 4, 2022, 7:23pm UTC](https://discuss.pennylane.ai/t/quantum-lstm-model/2014/1 "2022-07-04T19:23:48Z")

</div>

Hello!

I am interested in QLSTM networks. I saw this [[qlstm/qlstm\_pennylane.py at main · rdisipio/qlstm · GitHub](https://github.com/rdisipio/qlstm/blob/main/qlstm_pennylane.py)]([http://QLSTM](http://QLSTM) pennylane) for this architecture

![QLSTM](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/0/0458b7e1b6e7e1af56ee5968a808206f25010926.png)

but I am afraid I am not sure how to use it. My dataset is pretty simple it has 6 features:

 ![dataset](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/3/38e5963238c92f08595775eb34d0cfd27a437a0f.png)

The question is about the data pre-processing steps in order to load them on the LSTM and further deployment.

Thank you in advance!

p.s. here is a description of the github code [A Quantum-Enhanced LSTM Layer. Using the PennyLane Quantum Machine… | by Riccardo Di Sipio | Towards Data Science](https://towardsdatascience.com/a-quantum-enhanced-lstm-layer-38a8c135dbfa)

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [July 5, 2022, 7:35pm UTC](https://discuss.pennylane.ai/t/quantum-lstm-model/2014/2 "2022-07-05T19:35:04Z")

</div>

Hi @NikSchet!

This [notebook](https://github.com/rdisipio/qlstm/blob/main/POS_tagging.ipynb) by the author of the repo can be very helpful in understanding how to input your data into the LSTM. Notice that he uses words instead of numbers so my suggestion would be to first run the notebook as-is and then try modifying the data little by little. I’m not sure what your data represents so it is important to be clear about the answer you’re trying to find before you input the data. In any case you will need to modify the training\_data, word\_to\_ix, ix\_to\_tag, and probably others too

I hope this was helpful and please let me know if you have any further questions!
