QNLP
Compositional
Intelligence

Version 1.0, November 2021

Why quantum computing for
Natural Language Processing?
Our team focuses on Quantum Natural Language
Processing (QNLP). More broadly, we are interested
in the potential quantum computing has to enhance
Artificial Intelligence (AI). We take advantage of structural
correspondences between the matching compositional
structures underpinning quantum theory (e.g. process
theories and tensor networks) on the one hand, andformal and natural languages on the other hand, inorder to design novel models for language and othercognitive phenomena. These mathematical connections
between quantum theory and language models allow us
to implement our models on quantum computers andexploit the advantage that may bring.

Framework transparency
The relevant mathematical framework is category
theory, which comes equipped with an intuitive graphicallanguage in terms of process diagrams. Last but not least,
as current “black box” machine learning architectures
are confronted by the need for interpretability,
explainability, and responsibility, we envisage that ourbrand of AI models provide a scalable solution towards
transparency.

Page 2 of 7

Quantum NaturalLanguage Processing
123

Coecke et al
Lambek Festschirft, special issue ofLinguistic Analysis
2010.
Coecke-Kissinger bookhttps://doi.org/10.1017/9781316219317
2017.
Zeng-Coecke
EPTCS 221, pp. 67-75
2016.

The foundations we built upon have largely beendeveloped by ourselves, over the past two decades, when
we were still residing in academia. Our journey towards
QNLP began with the question of how to combine thestrengths of symbolic approaches to AI, which naturally
capture compositionality via recursive rules, with thedistributed approach to modelling meaning, which
captures the flexible and ambiguous nature of natural
language semantics and allows the meanings to belearned automatically from large amounts of text.
In our original DisCoCat paper,1 grammaticalrules dictate how the meanings of words flow andinteract inside a sentence to produce its meaning.
Interestingly, this flow of information is similar - at anabstract level - to how information flows in quantum
protocols, which can be formulated entirely in terms ofdiagrams.2
As implementations of this compositionalframework on classical computers can become
exponentially costly, we turn to its quantum origins andconsider quantum computers as the native environment
for language to inhabit.3

Page 3 of 7

456

Kartsaklis
arXiv:1505.00138
2015.
GitHubhttps://github.com/CQCL/lambeq
2021.
Cambridge Quantum
https://qnlp.cambridgequantum.com/generate.html
2021.

This allows us to exploit the exponentially large state
spaces defined by qubits and invoke entanglement andinterference to capture the complexity of meaninginteractions in text. Thus, our compositional approach toNLP naturally leads to Quantum NLP. Furthermore, thisformal analogy between linguistics and quantum physics
goes both ways; for example, concepts from quantum
theory such as density matrices can be used to modelentailment and ambiguity in language.4
Our developers are building a software library,
λambeq5, which enables the design and implementationof end-to-end QNLP pipelines which seamlessly integratewith Cambridge Quantum’s platform-agnostic state-ofthe-art compiler, TKET. Like TKET, λambeq is also opensourced, with aim to accelerate the development of novel
quantum applications for NLP. With our QNLP toolkit,
grammatical sentences can be automatically parsed andmapped to process diagrams, as is also demonstrated in
our online tool6.
With our library for building and interpreting
diagrams, DisCoPy, running under the hood of lambeq,
we can map sentence diagrams to quantum circuits,
which faithfully reflect grammatical structure. Thus, wehave already been able to implement the first proofof-concept experiments5, 6 solving NLP tasks such as
sentence classification on noisy near-term quantum
processors, using techniques from the rapidly developing
field of Quantum Machine Learning to automaticallylearn parameterised “language circuits”.

Page 4 of 7

Looking forward
7

Coecke-Duncan
New J. Phys. 13 (2011) 043016
2009.

The emphasis on compositionality has been themain source of our results so far, which range
from the foundations of quantum theory toapplications in quantum computation. A significant
contribution has been the development of theZX-calculus7, a low-level diagrammatic language
for reasoning about quantum computations. As
we employ the ZX-calculus when reasoning about
QNLP architectures for both near-term quantum
processors as well as scalable fault-tolerant
quantum computers, and continue to advance thetheory of graphical languages.
We also intend to move beyond QNLP intoCompositional Intelligence more broadly, where
we will explore cognitive phenomena beyond
language, such as causal and spatial reasoning.
Finally, we have also recently ventured into the arts,
by viewing musical structure from a linguistic pointof view, which allows us to use our QNLP pipelines
to analyse musical compositions.

Page 5 of 7

GET STARTED WITHQNLP TODAYCONTACT US
Please contact our team at
Email: support@cambridgequantum.com

Page 6 of 7

We set out our vision to positively transform the worldusing the power of quantum computing back in 2014.
Today, we are recognised as one of the foremost quantum
computing companies, delivering science-led,enterprise-driven solutions to tackle hard problems
across a diverse range of industries.
Cambridge Quantum designs, engineers and deploys
algorithms and enterprise application libraries,
translating cutting-edge research into industry leading
technologies through a product-centric focus. TKET, ourhardware-agnostic software development platform, andother technologies are currently utilised by an expansive
and ever-growing user base.
The team at Cambridge Quantum has been developing
the theoretical foundations of quantum computing
for over 25 years, forging ahead with breakthroughsin the fields of quantum chemistry, quantum artificial
intelligence, quantum cybersecurity and quantum
algorithms.
At present, we have the deepest roster of researchers,
developers and engineers, working to democratisequantum computation and realise the benefits for thegreatest possible number of people.
FOR MORE INFORMATION
LinkedIn
GitHubCambridgeQuantum.com

COLLABORATIONSWITH UNIVERSITIES
University of Oxford
University College London
The University of Hong Kong
University of Bristol
University of Gdansk
Published by Cambridge Quantum

CONFERENCE SERIESSPONSORED AND CO-ORGANISED
Quantum Physics and Logic
Applied Category Theory
Quantum Natural Language Processing
Quantum Computing and Musical Creativity

SEMINARSOASIS (Oxford CS)
QNLP Seminar (UCL )Page 7 of 7