Grover's algorithm, a well-know quantum search algorithm, allows one to find the correct item in a database, with quadratic speedup. In this paper we adapt Grover's algorithm to the problem of finding a correct answer to a natural language question in English, thus contributing to the growing field of Quantum Natural Language Processing. Using a grammar that can be interpreted as tensor contractions, each word is represented as a quantum state that serves as input to the quantum circuit. We here introduce a quantum measurement to contract the representations of words, resulting in the representation of larger text fragments. Using this framework, a representation for the question is found that contains all the possible answers in equal quantum superposition, and allows for the building of an oracle that can detect a correct answer, being agnostic to the specific question. Furthermore, we show that our construction can deal with certain types of ambiguous phrases by keeping the various different meanings in quantum superposition.
翻译:Grover的算法, 一种众所周知的量子搜索算法, 允许一个人在数据库中找到正确的项目, 并有二次加速。 在本文中, 我们调整了 Grover 的算法, 以找到正确答案解决英语自然语言问题的问题, 从而帮助了量子自然语言处理的日益扩大的领域。 使用可以被解释为 发声收缩的语法, 每个单词都代表成量子状态, 作为量子电路的输入。 我们在此引入量子测量法, 来将文字表达方式承包起来, 从而代表更大的文本碎片 。 使用这个框架, 发现问题的表示法包含所有可能的答案, 以等量子超定位, 并允许构建一个能够检测正确答案的神器, 是对具体问题的不可知性。 此外, 我们的构造可以通过保持量子超定位的不同含义来处理某些类型的模糊的词句。