Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2209.08167 · Quantum

Quantum Vision Transformers

El Amine Cherrat, Iordanis Kerenidis, Natansh Mathur, Jonas Landman, Martin Strahm, Yun Yvonna Li

Published Feb 22, 2024• 162 citations
arXivHTMLPDF

Abstract

In this work, quantum transformers are designed and analysed in detail by extending the state-of-the-art classical transformer neural network architectures known to be very performant in natural language processing and image analysis. Building upon the previous work, which uses parametrised quantum circuits for data loading and orthogonal neural layers, we introduce three types of quantum transformers for training and inference, including a quantum transformer based on compound matrices, which guarantees a theoretical advantage of the quantum attention mechanism compared to their classical counterpart both in terms of asymptotic run time and the number of model parameters. These quantum architectures can be built using shallow quantum circuits and produce qualitatively different classification models. The three proposed quantum attention layers vary on the spectrum between closely following the classical transformers and exhibiting more quantum characteristics. As building blocks of the quantum transformer, we propose a novel method for loading a matrix as quantum states as well as two new trainable quantum orthogonal layers adaptable to different levels of connectivity and quality of quantum computers. We performed extensive simulations of the quantum transformers on standard medical image datasets that showed competitively, and at times better performance compared to the classical benchmarks, including the best-in-class classical vision transformers. The quantum transformers we trained on these small-scale datasets require fewer parameters compared to standard classical benchmarks. Finally, we implemented our quantum transformers on superconducting quantum computers and obtained encouraging results for up to six qubit experiments.

DOI
10.22331/q-2024-02-22-1265

Related papers

Quantformers: Bits to Qubits

Sanjay Bhargav Dharavath, Hanvitha Saraswathi Mukkamala

This research presents a novel method utilizing quantum circuits for image classification, a task traditionally handled by classical patch-wise vision transformers. These classical methods, using binary bits, have been highly effective on standard computers. However, the potential of quantum computing in AI applications is rapidly growing. Our study explores the early application of quantum circuit algorithms, termed "Quantformers," in image classification. Quantum circuits have three main components: universal gates, measurement trajectory, and qubits entanglement. We focus on all, already proven effective in quantum circuits challenges. Our work involves designing and analyzing Quantum Transformers. These are advanced versions of classical transformer neural networks, which are known for their effectiveness in image analysis. Quantum Transformers, built with shallow quantum circuits, offer distinct classification models compared to classical methods. We conducted thorough simulations on standard medical image datasets. The results demonstrate that Quantum Transformers are not only competitive but, in some cases, surpass the best classical transformers and other benchmarks. An advantage of our quantum architectures is their reduced parameter count compared to classical methods with millions of parameters, leading to lower computational demands. Our research introduces a quantum circuit-based algorithm as a foundational approach in the evolving field of quantum-enhanced artificial intelligence.

Indian Conference on Computer Vision, Graphics and Image Processing•Dec 17, 2025•0 citations

MedQViT: A Lightweight Hybrid Quantum Vision Transformer for Medical Image Analysis

Amandeep Singh Bhatia, Mandeep Kaur Saggi

Classical Vision Transformers (CViTs) have demonstrated strong performance in medical image analysis, supporting a wide range of digital health applications. However, their self-attention mechanisms can require substantial computational resources and model parameters. In parallel, quantum machine learning (QML) has attracted increasing interest in healthcare and other scientific domains, particularly because quantum-enhanced models may provide expressive representations for small datasets. In this paper, we propose MedQViT, a robust and parameter-efficient Quantum Vision Transformer for medical image classification. To reduce the computational cost of global self-attention, MedQViT combines a shared four-qubit parameterized quantum circuit with a quantum-feature state memory and trainable landmark tokens. This hybrid architecture encodes image patches into compact quantum-enhanced representations while using classical layers for feature aggregation and classification. Experiments on established medical image datasets evaluate the effectiveness and feasibility of MedQViT against classical and quantum baselines. MedQViT achieves competitive performance with substantially fewer parameters than conventional vision models and outperforms several classical and quantum methods in terms of test accuracy (ACC) and area under the receiver operating characteristic curve (AUC).

Proceedings of the AAAI Symposium Series•Nov 6, 2026•0 citations

Quantum Methods for Neural Networks and Application to Medical Image Classification

Jonas Landman, Natansh Mathur, Yun Yvonna Li +4 more

Quantum machine learning techniques have been proposed as a way to potentially enhance performance in machine learning applications. In this paper, we introduce two new quantum methods for neural networks. The first one is a quantum orthogonal neural network, which is based on a quantum pyramidal circuit as the building block for implementing orthogonal matrix multiplication. We provide an efficient way for training such orthogonal neural networks; novel algorithms are detailed for both classical and quantum hardware, where both are proven to scale asymptotically better than previously known training algorithms. The second method is quantum-assisted neural networks, where a quantum computer is used to perform inner product estimation for inference and training of classical neural networks. We then present extensive experiments applied to medical image classification tasks using current state of the art quantum hardware, where we compare different quantum methods with classical ones, on both real quantum hardware and simulators. Our results show that quantum and classical neural networks generates similar level of accuracy, supporting the promise that quantum methods can be useful in solving visual tasks, given the advent of better quantum hardware.

arXiv:2212.07389•Quantum•Dec 22, 2022•116 citations

FitQT: a fully integrated and trainable quantum transformer for scalable natural language processing

Lisa Pham, Anh The Le

Abstract The combination of Transformer architectures with Quantum Computing has opened new directions in Quantum Natural Language Processing (QNLP) by leveraging the Transformer’s representational capacity together with the computational parallelism and high-dimensional feature space of quantum systems. However, existing approaches remain constrained by partial designs and limited integration, hindering scalability and trainability. This study introduces FitQT—a novel, fully integrated, and trainable quantum transformer that unifies three essential components: (1) a quantum multi-head attention mechanism employing a scaled Gaussian kernel, (2) a quantum feed-forward network, and (3) quantum residual connections. The residual connections stabilize gradient flow and facilitate the training of deeper quantum circuits, while the attention and feed-forward components jointly enhance representational capacity. Evaluations on sentiment analysis datasets demonstrate FitQT’s effectiveness. On the IMDb dataset, FitQT improves accuracy by 14.89% over the baseline Quantum Self-Attention Network and achieves competitive task-level performance relative to BERT-Base, despite being trained from scratch without large-scale pretraining, while requiring only 2,595 parameters and substantially reduced training time. Moreover, FitQT achieves state-of-the-art performance compared to prior quantum-based transformer architectures such as QSANN and QMSAN. These results highlight the importance of incorporating classical deep learning principles into quantum architectures and provide a practical foundation for scalable, resource-efficient QNLP systems suitable for the noisy intermediate-scale quantum era.

Engineering Research Express•Mar 19, 2026•0 citations

Theory of Transformers and their application to Neural Quantum States

Riccardo Rende

My PhD research focused on the Transformer architecture, a powerful deep neural network model that has emerged as a cornerstone for solving complex problems in natural language processing, image analysis, signal processing, and beyond. In particular, we studied the learning dynamics of this architecture, and its application to the representation of many-body wavefunctions, the so-called Neural Quantum States. Initially, we investigated the representational capabilities of Transformers by characterizing the statistical structures that a simplified Transformer layer, utilizing the so-called factored attention, is capable of learning. Building on these results, we utilized factored attention in deep Transformers to develop an accurate ansatz for approximating the ground states of quantum many-body Hamiltonians within the variational Monte Carlo framework. In this specific application, factored attention is crucial for achieving accurate results, demonstrating superior performance compared to the standard attention mechanism used in most of the other applications of the Transformers, and in particular in natural language processing. Alongside the development of an efficient optimization method for large-scale neural networks, we achieved state-of-the-art results on the most popular benchmark in Neural Quantum States and addressed complex physical problems that are subjects of ongoing debate. Finally, we developed a framework to train Foundation Neural Quantum States, which are versatile neural network models that approximate quantum wave functions of multiple systems simultaneously, enabling accurate estimates of challenging quantities such as disorder averages and fidelity susceptibility. We envision numerous future directions for this approach, including its extension to quantum dynamics by explicitly modeling time-dependent variational states, as well as its application to the design of novel materials in fermionic systems.

•Sep 11, 2025•0 citations

Efficient Circuit Classifier Design for Enhancing Quantum Self-Attention in Vision Transformers

Huyen Quang Tran, Yu-Han Lin, Hanh Thi Minh Tran +2 more

Quantum self-attention is a promising approach to replace traditional self-attention mechanisms in classical deep learning, which often require a massive number of GPUs for training. Although several early studies have proposed quantum self-attention architectures, these models often struggle with classification tasks in vision transformers. In this study, we address this limitation by enhancing quantum self-attention through integration with circuit classifier design and, crucially, by optimizing the number of strong entangling layers. Evaluation results show that incorporating an optimal number of entangling layers substantially improves classification performance, outperforming models that rely solely on directly measured quantum self-attention. We further analyze how varying the number of quantum classifier layers affects classification accuracy during training. Experiments on downscaled MNIST and MC datasets reveal that the nature of the input data has minimal impact on the final outcomes. Notably, testing accuracy reaches 56% when using 10–16 strong entangling layers, highlighting the critical role of entanglement in model performance. For SOTA comparison, we replicate existing quantum self-attention methods and demonstrate that our model consistently achieves 10-23% better performance results. Additionally, we compare different optimizers and find that Nesterov Momentum delivers the most effective convergence for our architecture.

IEEE Globecom Workshops (GC Wkshps)•Dec 8, 2025•0 citations
In this work, quantum transformers are designed and analysed in detail by extending the state-of-the-art classical transformer neural network architectures known to be very performant in natural language processing and image analysis. Building upon the previous work, which uses parametrised quantum circuits for data loading and orthogonal neural layers, we introduce three types of quantum transformers for training and inference, including a quantum transformer based on compound matrices, which guarantees a theoretical advantage of the quantum attention mechanism compared to their classical counterpart both in terms of asymptotic run time and the number of model parameters. These quantum architectures can be built using shallow quantum circuits and produce qualitatively different classification models. The three proposed quantum attention layers vary on the spectrum between closely following the classical transformers and exhibiting more quantum characteristics. As building blocks of the quantum transformer, we propose a novel method for loading a matrix as quantum states as well as two new trainable quantum orthogonal layers adaptable to different levels of connectivity and quality of quantum computers. We performed extensive simulations of the quantum transformers on standard medical image datasets that showed competitively, and at times better performance compared to the classical benchmarks, including the best-in-class classical vision transformers. The quantum transformers we trained on these small-scale datasets require fewer parameters compared to standard classical benchmarks. Finally, we implemented our quantum transformers on superconducting quantum computers and obtained encouraging results for up to six qubit experiments.
This research presents a novel method utilizing quantum circuits for image classification, a task traditionally handled by classical patch-wise vision transformers. These classical methods, using binary bits, have been highly effective on standard computers. However, the potential of quantum computing in AI applications is rapidly growing. Our study explores the early application of quantum circuit algorithms, termed "Quantformers," in image classification. Quantum circuits have three main components: universal gates, measurement trajectory, and qubits entanglement. We focus on all, already proven effective in quantum circuits challenges. Our work involves designing and analyzing Quantum Transformers. These are advanced versions of classical transformer neural networks, which are known for their effectiveness in image analysis. Quantum Transformers, built with shallow quantum circuits, offer distinct classification models compared to classical methods. We conducted thorough simulations on standard medical image datasets. The results demonstrate that Quantum Transformers are not only competitive but, in some cases, surpass the best classical transformers and other benchmarks. An advantage of our quantum architectures is their reduced parameter count compared to classical methods with millions of parameters, leading to lower computational demands. Our research introduces a quantum circuit-based algorithm as a foundational approach in the evolving field of quantum-enhanced artificial intelligence.
Classical Vision Transformers (CViTs) have demonstrated strong performance in medical image analysis, supporting a wide range of digital health applications. However, their self-attention mechanisms can require substantial computational resources and model parameters. In parallel, quantum machine learning (QML) has attracted increasing interest in healthcare and other scientific domains, particularly because quantum-enhanced models may provide expressive representations for small datasets. In this paper, we propose MedQViT, a robust and parameter-efficient Quantum Vision Transformer for medical image classification. To reduce the computational cost of global self-attention, MedQViT combines a shared four-qubit parameterized quantum circuit with a quantum-feature state memory and trainable landmark tokens. This hybrid architecture encodes image patches into compact quantum-enhanced representations while using classical layers for feature aggregation and classification. Experiments on established medical image datasets evaluate the effectiveness and feasibility of MedQViT against classical and quantum baselines. MedQViT achieves competitive performance with substantially fewer parameters than conventional vision models and outperforms several classical and quantum methods in terms of test accuracy (ACC) and area under the receiver operating characteristic curve (AUC).
Quantum machine learning techniques have been proposed as a way to potentially enhance performance in machine learning applications. In this paper, we introduce two new quantum methods for neural networks. The first one is a quantum orthogonal neural network, which is based on a quantum pyramidal circuit as the building block for implementing orthogonal matrix multiplication. We provide an efficient way for training such orthogonal neural networks; novel algorithms are detailed for both classical and quantum hardware, where both are proven to scale asymptotically better than previously known training algorithms. The second method is quantum-assisted neural networks, where a quantum computer is used to perform inner product estimation for inference and training of classical neural networks. We then present extensive experiments applied to medical image classification tasks using current state of the art quantum hardware, where we compare different quantum methods with classical ones, on both real quantum hardware and simulators. Our results show that quantum and classical neural networks generates similar level of accuracy, supporting the promise that quantum methods can be useful in solving visual tasks, given the advent of better quantum hardware.
Abstract The combination of Transformer architectures with Quantum Computing has opened new directions in Quantum Natural Language Processing (QNLP) by leveraging the Transformer’s representational capacity together with the computational parallelism and high-dimensional feature space of quantum systems. However, existing approaches remain constrained by partial designs and limited integration, hindering scalability and trainability. This study introduces FitQT—a novel, fully integrated, and trainable quantum transformer that unifies three essential components: (1) a quantum multi-head attention mechanism employing a scaled Gaussian kernel, (2) a quantum feed-forward network, and (3) quantum residual connections. The residual connections stabilize gradient flow and facilitate the training of deeper quantum circuits, while the attention and feed-forward components jointly enhance representational capacity. Evaluations on sentiment analysis datasets demonstrate FitQT’s effectiveness. On the IMDb dataset, FitQT improves accuracy by 14.89% over the baseline Quantum Self-Attention Network and achieves competitive task-level performance relative to BERT-Base, despite being trained from scratch without large-scale pretraining, while requiring only 2,595 parameters and substantially reduced training time. Moreover, FitQT achieves state-of-the-art performance compared to prior quantum-based transformer architectures such as QSANN and QMSAN. These results highlight the importance of incorporating classical deep learning principles into quantum architectures and provide a practical foundation for scalable, resource-efficient QNLP systems suitable for the noisy intermediate-scale quantum era.
My PhD research focused on the Transformer architecture, a powerful deep neural network model that has emerged as a cornerstone for solving complex problems in natural language processing, image analysis, signal processing, and beyond. In particular, we studied the learning dynamics of this architecture, and its application to the representation of many-body wavefunctions, the so-called Neural Quantum States. Initially, we investigated the representational capabilities of Transformers by characterizing the statistical structures that a simplified Transformer layer, utilizing the so-called factored attention, is capable of learning. Building on these results, we utilized factored attention in deep Transformers to develop an accurate ansatz for approximating the ground states of quantum many-body Hamiltonians within the variational Monte Carlo framework. In this specific application, factored attention is crucial for achieving accurate results, demonstrating superior performance compared to the standard attention mechanism used in most of the other applications of the Transformers, and in particular in natural language processing. Alongside the development of an efficient optimization method for large-scale neural networks, we achieved state-of-the-art results on the most popular benchmark in Neural Quantum States and addressed complex physical problems that are subjects of ongoing debate. Finally, we developed a framework to train Foundation Neural Quantum States, which are versatile neural network models that approximate quantum wave functions of multiple systems simultaneously, enabling accurate estimates of challenging quantities such as disorder averages and fidelity susceptibility. We envision numerous future directions for this approach, including its extension to quantum dynamics by explicitly modeling time-dependent variational states, as well as its application to the design of novel materials in fermionic systems.
Quantum self-attention is a promising approach to replace traditional self-attention mechanisms in classical deep learning, which often require a massive number of GPUs for training. Although several early studies have proposed quantum self-attention architectures, these models often struggle with classification tasks in vision transformers. In this study, we address this limitation by enhancing quantum self-attention through integration with circuit classifier design and, crucially, by optimizing the number of strong entangling layers. Evaluation results show that incorporating an optimal number of entangling layers substantially improves classification performance, outperforming models that rely solely on directly measured quantum self-attention. We further analyze how varying the number of quantum classifier layers affects classification accuracy during training. Experiments on downscaled MNIST and MC datasets reveal that the nature of the input data has minimal impact on the final outcomes. Notably, testing accuracy reaches 56% when using 10–16 strong entangling layers, highlighting the critical role of entanglement in model performance. For SOTA comparison, we replicate existing quantum self-attention methods and demonstrate that our model consistently achieves 10-23% better performance results. Additionally, we compare different optimizers and find that Nesterov Momentum delivers the most effective convergence for our architecture.