Goto

Collaborating Authors

 lambeq


Efficient Generation of Parameterised Quantum Circuits from Large Texts

Krawchuk, Colin, Khatri, Nikhil, Ortega, Neil John, Kartsaklis, Dimitri

arXiv.org Artificial Intelligence

Quantum approaches to natural language processing (NLP) are redefining how linguistic information is represented and processed. While traditional hybrid quantum-classical models rely heavily on classical neural networks, recent advancements propose a novel framework, DisCoCirc, capable of directly encoding entire documents as parameterised quantum circuits (PQCs), besides enjoying some additional interpretability and compositionality benefits. Following these ideas, this paper introduces an efficient methodology for converting large-scale texts into quantum circuits using tree-like representations of pregroup diagrams. Exploiting the compositional parallels between language and quantum mechanics, grounded in symmetric monoidal categories, our approach enables faithful and efficient encoding of syntactic and discourse relationships in long and complex texts (up to 6410 words in our experiments) to quantum circuits. The developed system is provided to the community as part of the augmented open-source quantum NLP package lambeq Gen II.


GitHub - CQCL/lambeq: A high-level Python library for Quantum Natural Language Processing

#artificialintelligence

This does not include optional dependencies such as depccg and PyTorch, which have to be installed separately. Warning: depccg is available only on MacOS and Linux. If you are using Windows, please install the base lambeq. This means that the DepCCGParser class will not be available on Windows, but you can still use all other compositional models from the reader module. Support for parsing on Windows will be added in a future version.


lambeq: An Efficient High-Level Python Library for Quantum NLP

Kartsaklis, Dimitri, Fan, Ian, Yeung, Richie, Pearson, Anna, Lorenz, Robin, Toumi, Alexis, de Felice, Giovanni, Meichanetzidis, Konstantinos, Clark, Stephen, Coecke, Bob

arXiv.org Artificial Intelligence

We present lambeq, the first high-level Python library for Quantum Natural Language Processing (QNLP). The open-source toolkit offers a detailed hierarchy of modules and classes implementing all stages of a pipeline for converting sentences to string diagrams, tensor networks, and quantum circuits ready to be used on a quantum computer. lambeq supports syntactic parsing, rewriting and simplification of string diagrams, ansatz creation and manipulation, as well as a number of compositional models for preparing quantum-friendly representations of sentences, employing various degrees of syntax sensitivity. We present the generic architecture and describe the most important modules in detail, demonstrating the usage with illustrative examples. Further, we test the toolkit in practice by using it to perform a number of experiments on simple NLP tasks, implementing both classical and quantum pipelines.