Quantum natural language processing

Last updated

Quantum natural language processing (QNLP) is the application of quantum computing to natural language processing (NLP). It computes word embeddings as parameterised quantum circuits that can solve NLP tasks faster than any classical computer. [1] [2] It is inspired by categorical quantum mechanics and the DisCoCat framework, making use of string diagrams to translate from grammatical structure to quantum processes. [3] [4]

Contents

Theory

The first quantum algorithm for natural language processing used the DisCoCat framework and Grover's algorithm to show a quadratic quantum speedup for a text classification task. [1] It was later shown that quantum language processing is BQP-Complete, [2] 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 [1] was adapted to the constraints of NISQ computers and implemented on IBM quantum computers to solve binary classification tasks. [5] [6] Instead of loading classical word vectors onto a quantum memory, the word vectors are computed directly as the parameters of quantum circuits. These parameters are optimised using methods from quantum machine learning to solve data-driven tasks such as question answering, [5] machine translation [7] and even algorithmic music composition. [8]

See also

Related Research Articles

<span class="mw-page-title-main">Quantum computing</span> Computers leveraging superposition and entanglement

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 current quantum computers are too small to outperform usual (classical) computers for practical applications, larger realizations are believed to be capable of solving certain computational problems, such as integer factorization, substantially faster than classical computers. The study of quantum computing is a subfield of quantum information science.

In quantum computing, a quantum algorithm is an algorithm which runs on a realistic model of quantum computation, the most commonly used model being the quantum circuit model of computation. A classical algorithm is a finite sequence of instructions, or a step-by-step procedure for solving a problem, where each step or instruction can be performed on a classical computer. Similarly, a quantum algorithm is a step-by-step procedure, where each of the steps can be performed on a quantum computer. Although all classical algorithms can also be performed on a quantum computer, the term quantum algorithm is usually used for those algorithms which seem inherently quantum, or use some essential feature of quantum computation such as quantum superposition or quantum entanglement.

A quantum sort is any sorting algorithm that runs on a quantum computer. Any comparison-based quantum sorting algorithm would take at least steps, which is already achievable by classical algorithms. Thus, for this task, quantum computers are no better than classical ones. However, in space-bounded sorts, quantum algorithms outperform their classical counterparts.

Quantum programming is the process of assembling sequences of instructions, called quantum circuits, that are capable of running on a quantum computer. Quantum programming languages help express quantum algorithms using high-level constructs. The field is deeply rooted in the open-source philosophy and as a result most of the quantum software discussed in this article is freely available as open-source software.

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 spaces and linear maps with the tensor product, string diagrams are called tensor networks or Penrose graphical notation. This has led to the development of categorical quantum mechanics where the axioms of quantum theory are expressed in the language of monoidal categories.

In category theory, a branch of mathematics, dagger compact categories first appeared in 1989 in the work of Sergio Doplicher and John E. Roberts on the reconstruction of compact topological groups from their category of finite-dimensional continuous unitary representations. They also appeared in the work of John Baez and James Dolan as an instance of semistrict k-tuply monoidal n-categories, which describe general topological quantum field theories, for n = 1 and k = 3. They are a fundamental structure in Samson Abramsky and Bob Coecke's categorical quantum mechanics.

<span class="mw-page-title-main">D-Wave Systems</span> Canadian Quantum Computing Company

D-Wave Systems Inc. is a Canadian quantum computing company, based in Burnaby, British Columbia, Canada. D-Wave was the world's first company to sell computers to exploit quantum effects in their operation. D-Wave's early customers include Lockheed Martin, University of Southern California, Google/NASA and Los Alamos National Lab.

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 different ways that these can be composed. It was pioneered in 2004 by Samson Abramsky and Bob Coecke. Categorical quantum mechanics is entry 18M40 in MSC2020.

<span class="mw-page-title-main">Bob Coecke</span>

Bob Coecke is a Belgian theoretical physicist and logician who was professor of Quantum Foundations, Logics and Structures at Oxford University until 2020, when he became Chief Scientist of Cambridge Quantum Computing, and after the merger with Honeywell Quantum Systems, Chief Scientist of Quantinuum. He pioneered categorical quantum mechanics, Quantum Picturalism, ZX-calculus, DisCoCat model for natural language, and quantum natural language processing (QNLP). He is a founder of the Quantum Physics and Logic community and conference series, and of the applied category theory community, conference series, and diamond-open-access journal Compositionality.

<span class="mw-page-title-main">Quantum machine learning</span> Interdisciplinary research area at the intersection of quantum physics and 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. quantum-enhanced machine learning. While machine learning algorithms are used to compute immense quantities of data, quantum machine learning utilizes qubits and quantum operations or specialized quantum systems to improve computational speed and data storage done by algorithms in a program. This includes hybrid methods that involve both classical and quantum processing, where computationally difficult subroutines are outsourced to a quantum device. These routines can be more complex in nature and executed faster on a quantum computer. Furthermore, quantum algorithms can be used to analyze quantum states instead of classical data. Beyond quantum computing, the term "quantum machine learning" is also associated with classical machine learning methods applied to data generated from quantum experiments, such as learning the phase transitions of a quantum system or creating new quantum experiments. Quantum machine learning also extends to a branch of research that explores methodological and structural similarities between certain physical systems and learning systems, in particular neural networks. For example, some mathematical and numerical techniques from quantum physics are applicable to classical deep learning and vice versa. Furthermore, researchers investigate more abstract notions of learning theory with respect to quantum information, sometimes referred to as "quantum learning theory".

Edward Farhi is physicist working on quantum computation as a Principal Scientist at Google. In 2018 he retired from his position as the Cecil and Ida Green Professor of Physics at the Massachusetts Institute of Technology. He was the Director of the Center for Theoretical Physics at MIT from 2004 until 2016. He made contributions to particle physics, general relativity and astroparticle physics before turning to his current interest, quantum computation.

Cloud-based quantum computing is the invocation of quantum emulators, simulators or processors through the cloud. Increasingly, cloud services are being looked on as the method for providing access to quantum processing. Quantum computers achieve their massive computing power by initiating quantum physics into processing power and when users are allowed access to these quantum-powered computers through the internet it is known as quantum computing within the cloud.

In quantum computing, quantum supremacy or quantum advantage is the goal of demonstrating that a programmable quantum device can solve a problem that no classical computer can solve in any feasible amount of time. Conceptually, quantum supremacy involves both the engineering task of building a powerful quantum computer and the computational-complexity-theoretic task of finding a problem that can be solved by that quantum computer and has a superpolynomial speedup over the best known or possible classical algorithm for that task. The term was coined by John Preskill in 2012, but the concept of a quantum computational advantage, specifically for simulating quantum systems, dates back to Yuri Manin's (1980) and Richard Feynman's (1981) proposals of quantum computing. Examples of proposals to demonstrate quantum supremacy include the boson sampling proposal of Aaronson and Arkhipov, D-Wave's specialized frustrated cluster loop problems, and sampling the output of random quantum circuits.

Continuous-variable (CV) quantum information is the area of quantum information science that makes use of physical observables, like the strength of an electromagnetic field, whose numerical values belong to continuous intervals. One primary application is quantum computing. In a sense, continuous-variable quantum computation is "analog", while quantum computation using qubits is "digital." In more technical terms, the former makes use of Hilbert spaces that are infinite-dimensional, while the Hilbert spaces for systems comprising collections of qubits are finite-dimensional. One motivation for studying continuous-variable quantum computation is to understand what resources are necessary to make quantum computers more powerful than classical ones.

Quil is a quantum instruction set architecture that first introduced a shared quantum/classical memory model. It was introduced by Robert Smith, Michael Curtis, and William Zeng in A Practical Quantum Instruction Set Architecture. Many quantum algorithms require a shared memory architecture. Quil is being developed for the superconducting quantum processors developed by Rigetti Computing through the Forest quantum programming API. A Python library called pyQuil was introduced to develop Quil programs with higher level constructs. A Quil backend is also supported by other quantum programming environments.

Quantum foundations is a discipline of science that seeks to understand the most counter-intuitive aspects of quantum theory, reformulate it and even propose new generalizations thereof. Contrary to other physical theories, such as general relativity, the defining axioms of quantum theory are quite ad hoc, with no obvious physical intuition. While they lead to the right experimental predictions, they do not come with a mental picture of the world where they fit.

The ZX-calculus is a rigorous graphical language for reasoning about linear maps between qubits, which are represented as string diagrams called ZX-diagrams. A ZX-diagram consists of a set of generators called spiders that represent specific tensors. These are connected together to form a tensor network similar to Penrose graphical notation. Due to the symmetries of the spiders and the properties of the underlying category, topologically deforming a ZX-diagram does not affect the linear map it represents. In addition to the equalities between ZX-diagrams that are generated by topological deformations, the calculus also has a set of graphical rewrite rules for transforming diagrams into one another. The ZX-calculus is universal in the sense that any linear map between qubits can be represented as a diagram, and different sets of graphical rewrite rules are complete for different families of linear maps. ZX-diagrams can be seen as a generalisation of quantum circuit notation.

Applied category theory is an academic discipline in which methods from category theory are used to study other fields including but not limited to computer science, physics, natural language processing, control theory, probability theory and causality. The application of category theory in these domains can take different forms. In some cases the formalization of the domain into the language of category theory is the goal, the idea here being that this would elucidate the important structure and properties of the domain. In other cases the formalization is used to leverage the power of abstraction in order to prove new results about the field.

This glossary of quantum computing is a list of definitions of terms and concepts used in quantum computing, its sub-disciplines, and related fields.

DisCoCat 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 categorial grammar are interpreted as linear maps acting on the tensor product of word vectors to produce the meaning of a sentence or a piece of text. String diagrams are used to visualise information flow and reason about natural language semantics.

References

  1. 1 2 3 Zeng, William; Coecke, Bob (2016-08-02). "Quantum Algorithms for Compositional Natural Language Processing". Electronic Proceedings in Theoretical Computer Science. 221: 67–75. arXiv: 1608.01406 . doi:10.4204/EPTCS.221.8. ISSN   2075-2180. S2CID   14897915.
  2. 1 2 Wiebe, Nathan; Bocharov, Alex; Smolensky, Paul; Troyer, Matthias; Svore, Krysta M. (2019-02-13). "Quantum Language Processing". arXiv: 1902.05162 [quant-ph].
  3. Coecke, Bob; de Felice, Giovanni; Meichanetzidis, Konstantinos; Toumi, Alexis (2020-12-07). "Foundations for Near-Term Quantum Natural Language Processing". arXiv: 2012.03755 [quant-ph].
  4. Ganguly, Srinjoy; Morapakula, Sai Nandan; Bertel, Luis Gerardo Ayala, "An Introduction to Quantum Natural Language Processing (QNLP)", Coded Leadership, CRC Press, pp. 1–23, retrieved 2022-11-11
  5. 1 2 Meichanetzidis, Konstantinos; Toumi, Alexis; de Felice, Giovanni; Coecke, Bob (2020-12-07). "Grammar-Aware Question-Answering on Quantum Computers". arXiv: 2012.03756 [quant-ph].
  6. Lorenz, Robin; Pearson, Anna; Meichanetzidis, Konstantinos; Kartsaklis, Dimitri; Coecke, Bob (2021-02-25). "QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer". arXiv: 2102.12846 [cs.CL].
  7. Vicente Nieto, Irene (2021). Towards Machine Translation with Quantum Computers (PDF). Master thesis, Stockholm University, Faculty of Science, Department of Physics.
  8. Miranda, Eduardo Reck; Yeung, Richie; Pearson, Anna; Meichanetzidis, Konstantinos; Coecke, Bob (2022), Miranda, Eduardo Reck (ed.), "A Quantum Natural Language Processing Approach to Musical Intelligence", Quantum Computer Music: Foundations, Methods and Advanced Concepts, Cham: Springer International Publishing, pp. 313–356, arXiv: 2111.06741 , doi:10.1007/978-3-031-13909-3_13, ISBN   978-3-031-13909-3 , retrieved 2022-11-07