ICHEC Quantum natural language processing (QNLP) toolkit
In this software suite we have developed a workflow to implement a hybridised classical-quantum model for representing language and representing sentence meanings in quantum states [1].
This work is based upon and inspired by the DisCo (also known as DisCoCat) formalism of Coecke et al. [2,3,4], wherein both compositional and distributional sentence structure and information is used to represent meaning. Following the work on Zeng and Coecke [4], we aimed to implement a modified approach to implement this model for quantum processors. Further details will follow shortly in the upcoming paper.
To build and run this software suite it is recommended to have the Intel compilers and Intel MPI libraries. We make use of the Intel Quantum Simulator (Intel-QS, qHiPSTER) [5,6] as the underlying simulator for our methods. If not available, the build can use GCC/Clang, provided the toolchain supports C++14 at a minimum (C++17 prefered). In addition, an MPI library is required. We have successfully used both MPICH and OpenMPI with non-Intel compiler builds.
This suite is primarily developed for Linux HPC systems, though it may also run on laptops/desktops. MacOS can be used, but some additional work is necessary.
All documentation for this project is available at https://ichec.github.io/QNLP
Example runnable scripts are available in the modules/py/scripts
directory. C++ demos and tests are available under demos
and modules/tests
respectively. Jupyter notebooks are available at modules/py/nb
.
If using this work in any way as part of your research, please feel free to cite us as: "A hybrid classical-quantum workflow for natural language processing" by O'Riordan et al, Mach. Learn.: Sci. Technol. (2020). DOI: https://doi.org/10.1088/2632-2153/abbd2e