Quantum Natural Language Processing (QNLP) deals with the design and implementation of NLP models intended to be run on quantum hardware. In this paper, we present results on the first NLP experiments conducted on Noisy Intermediate-Scale Quantum (NISQ) computers for datasets of size greater than 100 sentences. Exploiting the formal similarity of the compositional model of meaning by Coecke, Sadrzadeh and Clark (2010) with quantum theory, we create representations for sentences that have a natural mapping to quantum circuits. We use these representations to implement and successfully train NLP models that solve simple sentence classification tasks on quantum hardware. We conduct quantum simulations that compare the syntax-sensitive model of Coecke et al. with two baselines that use less or no syntax; specifically, we implement the quantum analogues of a "bag-of-words" model, where syntax is not taken into account at all, and of a word-sequence model, where only word order is respected. We demonstrate that all models converge smoothly both in simulations and when run on quantum hardware, and that the results are the expected ones based on the nature of the tasks and the datasets used. Another important goal of this paper is to describe in a way accessible to AI and NLP researchers the main principles, process and challenges of experiments on quantum hardware. Our aim in doing this is to take the first small steps in this unexplored research territory and pave the way for practical Quantum Natural Language Processing.
翻译:量子自然语言处理(QNLP)涉及设计并实现旨在量子硬件上运行的NLP模型。本文展示了在含噪中等规模量子(NISQ)计算机上针对规模超过100个句子的数据集进行的首批NLP实验结果。利用Coecke、Sadrzadeh和Clark(2010)提出的组合意义模型与量子理论的形式相似性,我们构建了具有自然映射到量子电路的句子表示。借助这些表示,我们成功实现并训练了能够在量子硬件上解决简单句子分类任务的NLP模型。我们进行了量子模拟,将Coecke等人的句法敏感模型与两种使用较少或完全不使用句法的基线模型进行对比:具体实现了"词袋"模型(完全忽略句法)和词序模型(仅保留词序)的量子对应版本。结果表明,所有模型在模拟和量子硬件运行中均能平滑收敛,且结果符合任务与数据集性质的理论预期。本文的另一重要目标是以AI与NLP研究者易于理解的方式,阐述量子硬件实验的主要原理、流程及挑战。我们旨在以这些初步探索为起点,为实用化量子自然语言处理开辟道路。