# QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer

arXiv: https://arxiv.org/abs/2102.12846 · HTML: https://mlsanity.com/paper/2102.12846/

## Key facts

- Cited by 67 papers in the map (data through 14 Oct 2026).
- Builds on 21 of its 63 references that are in the map.
- First posted on arXiv 25 Feb 2021.

## Builds on (most cited first, 21 of 21)

- [Supervised learning with quantum enhanced feature spaces](https://mlsanity.com/paper/1804.11326/) (2018)
- [Power of data in quantum machine learning](https://mlsanity.com/paper/2011.01938/) (2020)
- [Parameterized quantum circuits as machine learning models](https://mlsanity.com/paper/1906.07682/) (2019)
- [Supervised quantum machine learning models are kernel methods](https://mlsanity.com/paper/2101.11020/) (2021)
- [Efficient Learning for Deep Quantum Neural Networks](https://mlsanity.com/paper/1902.10445/) (2019)
- [Foundations for Near-Term Quantum Natural Language Processing](https://mlsanity.com/paper/2012.03755/) (2020)
- [Quantum Natural Language Processing on Near-Term Quantum Computers](https://mlsanity.com/paper/2005.04147/) (2020)
- [Low-depth gradient measurements can improve convergence in variational hybrid quantum-classical algorithms](https://mlsanity.com/paper/1901.05374/) (2019)
- [The Frobenius anatomy of word meanings I: subject and object relative pronouns](https://mlsanity.com/paper/1404.5278/) (2014)
- [Quantum Algorithms for Compositional Natural Language Processing](https://mlsanity.com/paper/1608.01406/) (2016)
- [Open System Categorical Quantum Semantics in Natural Language Processing](https://mlsanity.com/paper/1502.00831/) (2015)
- [Quantum Language Model with Entanglement Embedding for Question Answering](https://mlsanity.com/paper/2008.09943/) (2020)
- [Grammar-aware sentence classification on quantum computers](https://mlsanity.com/paper/2012.03756/) (2020)
- [The Frobenius anatomy of word meanings II: possessive relative pronouns](https://mlsanity.com/paper/1406.4690/) (2014)
- [A Study of Entanglement in a Categorical Framework of Natural Language](https://mlsanity.com/paper/1405.2874/) (2014)
- [Sentence Entailment in Compositional Distributional Semantics](https://mlsanity.com/paper/1512.04419/) (2015)
- [Reasoning about Meaning in Natural Language with Compact Closed Categories and Frobenius Algebras](https://mlsanity.com/paper/1401.5980/) (2014)
- [A hybrid classical-quantum workflow for natural language processing](https://mlsanity.com/paper/2004.06800/) (2020)
- [Language Design as Information Renormalization](https://mlsanity.com/paper/1708.01525/) (2017)
- [A Quantum Search Decoder for Natural Language Processing](https://mlsanity.com/paper/1909.05023/) (2019)
- [Graded Entailment for Compositional Distributional Semantics](https://mlsanity.com/paper/1601.04908/) (2016)

## Built on by (most cited first, 30 of 67)

- [The Dawn of Quantum Natural Language Processing](https://mlsanity.com/paper/2110.06510/) (2021)
- [lambeq: An Efficient High-Level Python Library for Quantum NLP](https://mlsanity.com/paper/2110.04236/) (2021)
- [Quantum Self-Attention Neural Networks for Text Classification](https://mlsanity.com/paper/2205.05625/) (2022)
- [When BERT Meets Quantum Temporal Convolution Learning for Text Classification in Heterogeneous Computing](https://mlsanity.com/paper/2203.03550/) (2022)
- [Quantum Recurrent Neural Networks for Sequential Learning](https://mlsanity.com/paper/2302.03244/) (2023)
- [Applying QNLP to sentiment analysis in finance](https://mlsanity.com/paper/2307.11788/) (2023)
- [Variational inference with a quantum computer](https://mlsanity.com/paper/2103.06720/) (2021)
- [Hybrid quantum physics-informed neural networks for simulating computational fluid dynamics in complex shapes](https://mlsanity.com/paper/2304.11247/) (2023)
- [A CCG-Based Version of the DisCoCat Framework](https://mlsanity.com/paper/2105.07720/) (2021)
- [Compositionality as we see it, everywhere around us](https://mlsanity.com/paper/2110.05327/) (2021)
- [A Quantum Natural Language Processing Approach to Musical Intelligence](https://mlsanity.com/paper/2111.06741/) (2021)
- [Quantum Natural Language Generation on Near-Term Devices](https://mlsanity.com/paper/2211.00727/) (2022)
- [Quantum Mixed-State Self-Attention Network](https://mlsanity.com/paper/2403.02871/) (2024)
- [Distilling Text into Circuits](https://mlsanity.com/paper/2301.10595/) (2023)
- [Something Old, Something New: Grammar-based CCG Parsing with Transformer Models](https://mlsanity.com/paper/2109.10044/) (2021)
- [Near-Term Advances in Quantum Natural Language Processing](https://mlsanity.com/paper/2206.02171/) (2022)
- [Quantum Natural Language Processing](https://mlsanity.com/paper/2403.19758/) (2024)
- [Compositionality Unlocks Deep Interpretable Models](https://mlsanity.com/paper/2504.02667/) (2025)
- [How to make qubits speak](https://mlsanity.com/paper/2107.06776/) (2021)
- [Experimentally validated quantum-secure federated learning over a multi-user quantum network](https://mlsanity.com/paper/2501.12709/) (2025)
- [Toward Quantum Machine Translation of Syntactically Distinct Languages](https://mlsanity.com/paper/2307.16576/) (2023)
- [Quantum Natural Language Processing: A Comprehensive Review of Models, Methods, and Applications](https://mlsanity.com/paper/2504.09909/) (2025)
- [Should Semantic Vector Composition be Explicit? Can it be Linear?](https://mlsanity.com/paper/2104.06555/) (2021)
- [A Model of Anaphoric Ambiguities using Sheaf Theoretic Quantum-like Contextuality and BERT](https://mlsanity.com/paper/2208.05720/) (2022)
- [Quantum Natural Language Processing based Sentiment Analysis using lambeq Toolkit](https://mlsanity.com/paper/2305.19383/) (2023)
- [From Conceptual Spaces to Quantum Concepts: Formalising and Learning Structured Conceptual Models](https://mlsanity.com/paper/2401.08585/) (2023)
- [Quantum Algorithms for Compositional Text Processing](https://mlsanity.com/paper/2408.06061/) (2024)
- [Compositional Concept Generalization with Variational Quantum Circuits](https://mlsanity.com/paper/2509.09541/) (2025)
- [Grover's Algorithm for Question Answering](https://mlsanity.com/paper/2106.05299/) (2021)
- [A Quantum Natural Language Processing Approach to Pronoun Resolution](https://mlsanity.com/paper/2208.05393/) (2022)

## Abstract (arXiv)

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.
