Table of Contents
Fetching ...

Efficient Generation of Parameterised Quantum Circuits from Large Texts

Colin Krawchuk, Nikhil Khatri, Neil John Ortega, Dimitri Kartsaklis

TL;DR

The paper addresses the challenge of encoding large-scale natural language into parameterised quantum circuits within the DisCoCirc framework. It introduces an efficient algorithm that transforms long texts into PQCs using tree-like pregroup diagrams (pregroup trees) and a sandwich-based representation of frames as unitaries, enabling scalable training up to $6410$ words. The method leverages a semantic functor to map diagrams to PQCs and integrates with the open-source lambeq Gen II toolkit, outperforming prior approaches in coverage and speed. This work advances interpretable, compositional quantum NLP and enables practical experimentation on real-world texts.

Abstract

Quantum approaches to natural language processing (NLP) are redefining how linguistic information is represented and processed. While traditional hybrid quantum-classical models rely heavily on classical neural networks, recent advancements propose a novel framework, DisCoCirc, capable of directly encoding entire documents as parameterised quantum circuits (PQCs), besides enjoying some additional interpretability and compositionality benefits. Following these ideas, this paper introduces an efficient methodology for converting large-scale texts into quantum circuits using tree-like representations of pregroup diagrams. Exploiting the compositional parallels between language and quantum mechanics, grounded in symmetric monoidal categories, our approach enables faithful and efficient encoding of syntactic and discourse relationships in long and complex texts (up to 6410 words in our experiments) to quantum circuits. The developed system is provided to the community as part of the augmented open-source quantum NLP package lambeq Gen II.

Efficient Generation of Parameterised Quantum Circuits from Large Texts

TL;DR

The paper addresses the challenge of encoding large-scale natural language into parameterised quantum circuits within the DisCoCirc framework. It introduces an efficient algorithm that transforms long texts into PQCs using tree-like pregroup diagrams (pregroup trees) and a sandwich-based representation of frames as unitaries, enabling scalable training up to words. The method leverages a semantic functor to map diagrams to PQCs and integrates with the open-source lambeq Gen II toolkit, outperforming prior approaches in coverage and speed. This work advances interpretable, compositional quantum NLP and enables practical experimentation on real-world texts.

Abstract

Quantum approaches to natural language processing (NLP) are redefining how linguistic information is represented and processed. While traditional hybrid quantum-classical models rely heavily on classical neural networks, recent advancements propose a novel framework, DisCoCirc, capable of directly encoding entire documents as parameterised quantum circuits (PQCs), besides enjoying some additional interpretability and compositionality benefits. Following these ideas, this paper introduces an efficient methodology for converting large-scale texts into quantum circuits using tree-like representations of pregroup diagrams. Exploiting the compositional parallels between language and quantum mechanics, grounded in symmetric monoidal categories, our approach enables faithful and efficient encoding of syntactic and discourse relationships in long and complex texts (up to 6410 words in our experiments) to quantum circuits. The developed system is provided to the community as part of the augmented open-source quantum NLP package lambeq Gen II.
Paper Structure (22 sections, 8 equations, 18 figures, 2 tables, 3 algorithms)

This paper contains 22 sections, 8 equations, 18 figures, 2 tables, 3 algorithms.

Figures (18)

  • Figure 1: A DisCoCirc diagram for the sentence "Alice loves fast bikes".
  • Figure 2: DisCoCirc diagram for the sentence "Alice loves fast bikes. She rode one to her class."
  • Figure 3: The semantic functor $F$ assigns atomic components of a DisCoCirc diagram to elements of a parameterised quantum circuit.
  • Figure 4: Pregroup diagram for the sentence "Alice reads books".
  • Figure 5: The process of converting long texts into quantum circuits.
  • ...and 13 more figures

Theorems & Definitions (1)

  • Definition 2.1