This thesis introduces quantum natural language processing (QNLP) models based on a simple yet powerful analogy between computational linguistics and quantum mechanics: grammar as entanglement. The grammatical structure of text and sentences connects the meaning of words in the same way that entanglement structure connects the states of quantum systems. Category theory allows to make this language-to-qubit analogy formal: it is a monoidal functor from grammar to vector spaces. We turn this abstract analogy into a concrete algorithm that translates the grammatical structure onto the architecture of parameterised quantum circuits. We then use a hybrid classical-quantum algorithm to train the model so that evaluating the circuits computes the meaning of sentences in data-driven tasks. The implementation of QNLP models motivated the development of DisCoPy (Distributional Compositional Python), the toolkit for applied category theory of which the first chapter gives a comprehensive overview. String diagrams are the core data structure of DisCoPy, they allow to reason about computation at a high level of abstraction. We show how they can encode both grammatical structures and quantum circuits, but also logical formulae, neural networks or arbitrary Python code. Monoidal functors allow to translate these abstract diagrams into concrete computation, interfacing with optimised task-specific libraries. The second chapter uses DisCopy to implement QNLP models as parameterised functors from grammar to quantum circuits. It gives a first proof-of-concept for the more general concept of functorial learning: generalising machine learning from functions to functors by learning from diagram-like data. In order to learn optimal functor parameters via gradient descent, we introduce the notion of diagrammatic differentiation: a graphical calculus for computing the gradients of parameterised diagrams.
翻译:此参数引入了量子自然语言处理( QNLP) 模型, 建于计算语言学和量子力学的简单而有力的类比: 语法和词理学: 语法和句子的语法结构将文字的含义连接在一起, 使量子系统状态连接在一起。 分类理论允许将这种语言比方类比的类比正规化: 它是一个从语法到矢量空间的单比喻。 我们把这个抽象类比转换成一个具体的具体算法, 将语法结构翻译到参数化的量子电路路路结构。 然后我们用混合的古典- 量运算法算法算法来培训模型, 以便评估电路结构在数据驱动任务中计算句的含义。 QNLP模型的实施可以使DiscoPy( 解义组组的构成图性) 发展一个应用类理学工具, 第一章给出一个全面的概览。 弦化图表是DiscoPy的核心数据结构, 让他们在高的流层流数据模型中进行计算。 我们展示它们如何将直径解的直径解, 直径化的直径解到直径解到直径解的直径解到直径解到直径解的直径解的直径解到直径解的直径解的直径解。