This paper proposes a novel concept within Quantum Natural Language Processing (QNLP) to encode the interpersonal metafunction of Systemic Functional Linguistics (SFL), particularly tenor, into quantum circuits by treating Japanese honorifics seriously. Because of English language bias in the literature, the incorporation of nuanced aspects of interpersonal communication evident in low-resource languages like Japanese remains underdeveloped and overlooked. This study leverages the quantum computing Python package lambeq to capture grammar and social context specifically, the roles and relationships that define interpersonal interactions in quantum circuits. The newly introduced honorific type h accomplishes this end. This strategy exposes the capability of quantum circuits to model the complex structures of language, moving beyond grammar the horizontal, textual dimension of SFL to embrace the vertical, hierarchical dimension of human communication and social interaction more broadly. Through this lens, the paper underscores the potential of QNLP to transcend traditional linguistic analysis, advocating for a broader and more nuanced understanding of language that includes both the spoken word and the interlocutors’ social persona. An algorithm for parsing Japanese grammar into pre-group diagrams containing the h type is introduced along with a codebase for other researchers to use and to which to contribute. Lastly, a binary classification experiment demonstrates that the circuits generated from these pre-group diagrams are suitable for Quantum Machine Learning (QML) applications. Keywords Quantum Natural Language Processing (QNLP); Systemic Functional Linguistics (SFL); Japanese honorifics; Interpersonal metafunction; lambeq; Pre-group grammar; Quantum Machine Learning (QML)
This paper proposes a novel concept within Quantum Natural Language Processing (QNLP) to encode the interpersonal metafunction of Systemic Functional Linguistics (SFL), particularly tenor, into quantum circuits by treating Japanese honorifics seriously. Because of English language bias in the literature, the incorporation of nuanced aspects of interpersonal communication evident in low-resource languages like Japanese remains underdeveloped and overlooked. This study leverages the quantum computing Python package lambeq to capture grammar and social context specifically, the roles and relationships that define interpersonal interactions in quantum circuits. The newly introduced honorific type h accomplishes this end. This strategy exposes the capability of quantum circuits to model the complex structures of language, moving beyond grammar the horizontal, textual dimension of SFL to embrace the vertical, hierarchical dimension of human communication and social interaction more broadly. Through this lens, the paper underscores the potential of QNLP to transcend traditional linguistic analysis, advocating for a broader and more nuanced understanding of language that includes both the spoken word and the interlocutors’ social persona. An algorithm for parsing Japanese grammar into pre-group diagrams containing the h type is introduced along with a codebase for other researchers to use and to which to contribute. Lastly, a binary classification experiment demonstrates that the circuits generated from these pre-group diagrams are suitable for Quantum Machine Learning (QML) applications. Keywords Quantum Natural Language Processing (QNLP); Systemic Functional Linguistics (SFL); Japanese honorifics; Interpersonal metafunction; lambeq; Pre-group grammar; Quantum Machine Learning (QML)
This paper proposes a novel concept within Quantum Natural Language Processing (QNLP) to encode the interpersonal metafunction of Systemic Functional Linguistics (SFL), particularly tenor, into quantum circuits by treating Japanese honorifics seriously. Because of English language bias in the literature, the incorporation of nuanced aspects of interpersonal communication evident in languages, such as the aforesaid Japanese, remains under-developed and overlooked. Utilizing lambeq, monoidal categories, and string diagrams, this study extends lambeq’s quantum computing framework to capture not only grammar but also social context—specifically the roles and relationships that define interpersonal interactions in quantum circuits. This approach represents a significant step toward that end simply by defining the honorific type h in lambeq. This innovative strategy exposes the capability of quantum circuits to model the complex structures of language, moving beyond grammar and even semantics—the horizontal, textual dimension of language—to embrace the vertical, hierarchical dimension of human communication and social interaction. Through this lens, the paper underscores the potential of QNLP to transcend traditional linguistic analysis, advocating for a broader and more nuanced understanding of language that includes not only what is said but also the social persona of the interlocutors. An algorithm for parsing Japanese grammar into pregroup diagrams containing the h type is introduced along with a codebase for other researchers to use and to which to contribute. Lastly, a toy experiment is performed to demonstrate that the circuits generated from these pregroup diagrams are suitable for Quantum Machine Learning (QML) applications.
We provide conceptual and mathematical foundations for near-term quantum natural language processing (QNLP), and do so in quantum computer scientist friendly terms. We opted for an expository presentation style, and provide references for supporting empirical evidence and formal statements concerning mathematical generality. We recall how the quantum model for natural language that we employ canonically combines linguistic meanings with rich linguistic structure, most notably grammar. In particular, the fact that it takes a quantum-like model to combine meaning and structure, establishes QNLP as quantum-native, on par with simulation of quantum systems. Moreover, the now leading Noisy Intermediate-Scale Quantum (NISQ) paradigm for encoding classical data on quantum hardware, variational quantum circuits, makes NISQ exceptionally QNLP-friendly: linguistic structure can be encoded as a free lunch, in contrast to the apparently exponentially expensive classical encoding of grammar. Quantum speed-up for QNLP tasks has already been established in previous work with Will Zeng. Here we provide a broader range of tasks which all enjoy the same advantage. Diagrammatic reasoning is at the heart of QNLP. Firstly, the quantum model interprets language as quantum processes via the diagrammatic formalism of categorical quantum mechanics. Secondly, these diagrams are via ZX-calculus translated into quantum circuits. Parameterisations of meanings then become the circuit variables to be learned. Our encoding of linguistic structure within quantum circuits also embodies a novel approach for establishing word-meanings that goes beyond the current standards in mainstream AI, by placing linguistic structure at the heart of Wittgenstein's meaning-is-context.
Quantum Natural language processing (QNLP) is the new technology that incorporates the theory of quantum computing with the linguistic theory to make more effective and transparent models of comprehending natural language. The paper proposes QNLP model of type combining the vector space semantics and the graphical ZX-calculus, applicable to quantum computing to describe, process, and interpret the sentences structure as a quantum circuit. Its approach includes a sentence parsing with a categorial grammar, a mapping of the semantic constituents to products of high dimensional Hilbert spaces and a representation of their interaction with the so-called ZX-diagrams. Such circuits are compiled into quantum instructions and emulated on quantum devices such as Qiskit. The model was compared in terms of the accuracy of parse, preservation of semantics, diagrammatic effectiveness, quantum fidelity and sentence reprehensibility. This has been demonstrated to match the outputs of classical and quantum semantics, by 86 percent on parsing accuracy and above 96% on quantum circuit fidelity. The paper shows ZX-calculus is a potentially powerful and understandable framework to construct large-scale and semantically rich QNLP systems, given near-term quantum hardware.
[EN] Quantum computing is widely regarded as one of the scientific fields with the greatest transformative potential. Its applications are already being explored in areas such as cybersecurity, chemistry, and machine learning. Within the domain of quantum machine learning, one emerging subfield is quantum natural language processing (QNLP), which seeks to leverage quantum algorithms to address complex language-related tasks more efficiently than classical counterparts. This thesis begins with a systematic literature review of the current landscape of quantum machine learning, focusing particularly on the design, development, and deployment of QNLP models on real quantum hardware. The SLR identifies 94 relevant articles that utilize quantum machine learning techniques and algorithms, highlighting their implementation via computational quantum circuits, or ansatzes. The main types of algorithms found include quantum adaptations of classical models such as support vector machines and k-nearest neighbors, as well as quantum neural networks, one of the most prominent applications being image classification. In addition, this work offers both quantitative and qualitative analyses, integrating a comprehensive set of experiments conducted on quantum simulators and real quantum devices. A significant contribution of this work lies in the design and evaluation of these new quantum circuit architectures, tailored to optimize expressibility, entanglement, and trainability. Empirical analysis shows that model accuracy tends to exhibit an inverse relationship with ansatz expressibility and a direct correlation with entanglement capability. In parallel, it contributes to the field by proposing novel ansatz architectures and applying circuit knitting techniques to overcome current hardware limitations. Ultimately, this thesis demonstrates the feasibility of hybrid quantum-classical approaches in QNLP and highlights their potential to be extended to support more complex and scalable real-world language applications.
In this work, we describe a full-stack pipeline for natural language processing on near-term quantum computers, aka QNLP. The language-modelling framework we employ is that of compositional distributional semantics (DisCoCat), which extends and complements the compositional structure of pregroup grammars. Within this model, the grammatical reduction of a sentence is interpreted as a diagram, encoding a specific interaction of words according to the grammar. It is this interaction which, together with a specific choice of word embedding, realises the meaning (or "semantics") of a sentence. Building on the formal quantum-like nature of such interactions, we present a method for mapping DisCoCat diagrams to quantum circuits. Our methodology is compatible both with NISQ devices and with established Quantum Machine Learning techniques, paving the way to near-term applications of quantum technology to natural language processing.
Natural language processing (NLP) is at the forefront of great advances in contemporary AI, and it is arguably one of the most challenging areas of the field. At the same time, with the steady growth of quantum hardware and notable improvements towards implementations of quantum algorithms, we are approaching an era when quantum computers perform tasks that cannot be done on classical computers with a reasonable amount of resources. This provides a new range of opportunities for AI, and for NLP specifically. Earlier work has already demonstrated a potential quantum advantage for NLP in a number of manners: (i) algorithmic speedups for search-related or classification tasks, which are the most dominant tasks within NLP, (ii) exponentially large quantum state spaces allow for accommodating complex linguistic structures, (iii) novel models of meaning employing density matrices naturally model linguistic phenomena such as hyponymy and linguistic ambiguity, among others. In this work, we perform the first implementation of an NLP task on noisy intermediate-scale quantum (NISQ) hardware. Sentences are instantiated as parameterised quantum circuits. We encode word-meanings in quantum states and we explicitly account for grammatical structure, which even in mainstream NLP is not commonplace, by faithfully hard-wiring it as entangling operations. This makes our approach to quantum natural language processing (QNLP) particularly NISQ-friendly. Our novel QNLP model shows concrete promise for scalability as the quality of the quantum hardware improves in the near future.