Quantum natural language processing (QNLP) is the application of
quantum computing
Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
to
natural language processing
Natural language processing (NLP) is an interdisciplinary subfield of linguistics, computer science, and artificial intelligence concerned with the interactions between computers and human language, in particular how to program computers to pro ...
(NLP). It computes
word embeddings as parameterised
quantum circuits that can solve NLP tasks faster than any classical computer.
It is inspired by
categorical quantum mechanics
Categorical quantum mechanics is the study of quantum foundations and quantum information using paradigms from mathematics and computer science, notably monoidal category theory. The primitive objects of study are physical processes, and the diff ...
and the
DisCoCat
DisCoCat (Categorical Compositional Distributional) is a mathematical framework for natural language processing which uses category theory to unify distributional semantics with the principle of compositionality. The grammatical derivations in a ca ...
framework, making use of
string diagram String diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory. When interpreted in the monoidal category of vector ...
s to translate from grammatical structure to quantum processes.
Theory
The first quantum algorithm for natural language processing used the
DisCoCat
DisCoCat (Categorical Compositional Distributional) is a mathematical framework for natural language processing which uses category theory to unify distributional semantics with the principle of compositionality. The grammatical derivations in a ca ...
framework and
Grover's algorithm to show a quadratic
quantum speedup for a text
classification task.
It was later shown that quantum language processing is
BQP-Complete,
i.e. quantum language models are more expressive than their classical counterpart, unless quantum mechanics can be efficiently simulated by classical computers.
These two theoretical results assume
fault-tolerant quantum computation and a
QRAM, i.e. an efficient way to load classical data on a quantum computer. Thus, they are not applicable to the
noisy intermediate-scale quantum (NISQ) computers available today.
Experiments
The algorithm of Zeng and
Coecke was adapted to the constraints of NISQ computers and implemented on
IBM quantum computers to solve binary classification tasks.
Instead of loading classical
word vectors onto a
quantum memory
In quantum computing, quantum memory is the quantum-mechanical version of ordinary computer memory. Whereas ordinary memory stores information as binary states (represented by "1"s and "0"s), quantum memory stores a quantum state for later ...
, the word vectors are computed directly as the parameters of
quantum circuits. These parameters are optimised using methods from
quantum machine learning
Quantum machine learning is the integration of quantum algorithms within machine learning programs. The most common use of the term refers to machine learning algorithms for the analysis of classical data executed on a quantum computer, i.e. quan ...
to solve data-driven tasks such as
question answering
Question answering (QA) is a computer science discipline within the fields of information retrieval and natural language processing (NLP), which is concerned with building systems that automatically answer questions posed by humans in a natural l ...
,
machine translation
Machine translation, sometimes referred to by the abbreviation MT (not to be confused with computer-aided translation, machine-aided human translation or interactive translation), is a sub-field of computational linguistics that investigates t ...
and even
algorithmic music composition.
See also
*
Categorical quantum mechanics
Categorical quantum mechanics is the study of quantum foundations and quantum information using paradigms from mathematics and computer science, notably monoidal category theory. The primitive objects of study are physical processes, and the diff ...
*
Natural language processing
Natural language processing (NLP) is an interdisciplinary subfield of linguistics, computer science, and artificial intelligence concerned with the interactions between computers and human language, in particular how to program computers to pro ...
*
Quantum machine learning
Quantum machine learning is the integration of quantum algorithms within machine learning programs. The most common use of the term refers to machine learning algorithms for the analysis of classical data executed on a quantum computer, i.e. quan ...
*
Applied category theory
Applied category theory is an Discipline (academia), academic discipline in which methods from category theory are used to study other fields including but not limited to computer science, physics (in particular Categorical quantum mechanics, quant ...
*
String diagram String diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory. When interpreted in the monoidal category of vector ...
References
External links
DisCoPy a Python toolkit for computing with string diagrams
lambeq a Python library for quantum natural language processing
{{Quantum information
Quantum computing
Natural language processing