Quantum Natural Language Processing

lambeq

Quantum Natural Language Processing (QNLP) is a very young area of research, aimed at the design and implementation of NLP models that exploit certain quantum phenomena such as superposition, entanglement, and interference to perform language-related tasks on quantum hardware. The advent of the first quantum machines, known as noisy intermediate-scale quantum (NISQ) computers, has already allowed researchers to make the first small steps towards exploring practical QNLP, by training models and running simple NLP experiments on quantum hardware (Meichanetzidis et al., 2020; Lorenz et al., 2021). Despite the limited capabilities of the current quantum machines, this early work is important in helping us understand better the process, the technicalities, and the unique nature of this new computational paradigm. At this stage, getting more hands-on experience is crucial in closing the gap that exists between theory and practice, and eventually leading to a point where practical real-world QNLP applications will become a reality.

With that goal in mind, we introduce lambeq, an open-source, modular, extensible high-level Python library, which provides the necessary tools for implementing a pipeline for experimental QNLP. At a high level, the library allows the conversion of any sentence to a quantum circuit, based on a given compositional model and certain parameterisation and choices of ansätze.