• Home
  • News
  • Technology
  • Research
  • Teaching
  • Business
  • Jobs
  • Home
  • News
  • Technology
  • Research
  • Teaching
  • Business
  • Jobs
Contact
  • Deutsch
  • English

  • Home
  • News
  • Technology
  • Research
  • Teaching
  • Business
  • Jobs
Contact
  • Deutsch
  • English

Quantum Transformers: Leveraging Variational Quantum Circuits for Natural Language Processing

Quantum Transformers: Leveraging Variational Quantum Circuits for Natural Language Processing

Abstract:

Recent advances in large language models (LLMs) have established transformer architectures as the dominant paradigm in natural language processing (NLP). While these models achieve state of the art performance, their exponential growth in parameter count and computational demands raises concerns regarding scalability, energy consumption and environmental impact. Simultaneously, quantum machine learning (QML) has emerged as a promising field that explores whether quantum computation can offer more efficient learning mechanisms, particularly using variational quantum circuits (VQCs), which have shown competitive performance with fewer parameters. This thesis investigates whether a quantum transformer model can be designed to structurally mirror the classical transformer while remaining feasible for execution on Noisy Intermediate-Scale Quantum (NISQ) hardware. To this end, we propose a modular, NISQ-compatible quantum transformer architecture that reproduces key classical components embedding, multi-head attention and encoder-decoder structure, using VQCs. Each component is implemented using shallow, strongly entangling circuits designed to minimize circuit depth and parameter count. The model is evaluated on synthetic language modeling tasks, comparing quantum and classical variants under matched conditions, including identical token vocabularies and equivalent parameter budgets. Results show that the quantum model is capable of learning simple formal languages, converging rapidly with fewer parameters and in some configurations achieving perfect reconstruction of deterministic token sequences. However, its performance degrades on more complex tasks requiring generalization, where classical models remain superior. These findings demonstrate the feasibility of the proposed quantum transformer architecture on near-term hardware and situate the model as a proof of concept for the architectural potential of encoder-decoder quantum transformers models in NLP.

Author:

Julian Hager

Advisors:

Michael Kölle, Gerhard Stenzel, Thomas Gabor, Claudia Linnhoff-Popien


Student Thesis | Published June 2025 | Copyright © QAR-Lab
Direct Inquiries to this work to the Advisors



QAR-Lab – Quantum Applications and Research Laboratory
Ludwig-Maximilians-Universität München
Oettingenstraße 67
80538 Munich
Phone: +49 89 2180-9153
E-mail: qar-lab@mobile.ifi.lmu.de

© Copyright 2025

General

Team
Contact
Legal notice

Social Media

Twitter Linkedin Github

Language

  • Deutsch
  • English
Cookie-Zustimmung verwalten
Wir verwenden Cookies, um unsere Website und unseren Service zu optimieren.
Funktional Always active
Die technische Speicherung oder der Zugang ist unbedingt erforderlich für den rechtmäßigen Zweck, die Nutzung eines bestimmten Dienstes zu ermöglichen, der vom Teilnehmer oder Nutzer ausdrücklich gewünscht wird, oder für den alleinigen Zweck, die Übertragung einer Nachricht über ein elektronisches Kommunikationsnetz durchzuführen.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistiken
Die technische Speicherung oder der Zugriff, der ausschließlich zu statistischen Zwecken erfolgt. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
Die technische Speicherung oder der Zugriff ist erforderlich, um Nutzerprofile zu erstellen, um Werbung zu versenden oder um den Nutzer auf einer Website oder über mehrere Websites hinweg zu ähnlichen Marketingzwecken zu verfolgen.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Einstellungen anzeigen
{title} {title} {title}