Quantum Vision Transformers

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...

Full description

Bibliographic Details
Main Authors: El Amine Cherrat, Iordanis Kerenidis, Natansh Mathur, Jonas Landman, Martin Strahm, Yun Yvonna Li
Format: Article
Language:English
Published: Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften 2024-02-01
Series:Quantum
Online Access:https://quantum-journal.org/papers/q-2024-02-22-1265/pdf/
_version_ 1797300114385010688
author El Amine Cherrat
Iordanis Kerenidis
Natansh Mathur
Jonas Landman
Martin Strahm
Yun Yvonna Li
author_facet El Amine Cherrat
Iordanis Kerenidis
Natansh Mathur
Jonas Landman
Martin Strahm
Yun Yvonna Li
author_sort El Amine Cherrat
collection DOAJ
description 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.
first_indexed 2024-03-07T23:01:33Z
format Article
id doaj.art-d4e3a02e176243288c2d04413c72ca02
institution Directory Open Access Journal
issn 2521-327X
language English
last_indexed 2024-03-07T23:01:33Z
publishDate 2024-02-01
publisher Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften
record_format Article
series Quantum
spelling doaj.art-d4e3a02e176243288c2d04413c72ca022024-02-22T14:24:23ZengVerein zur Förderung des Open Access Publizierens in den QuantenwissenschaftenQuantum2521-327X2024-02-018126510.22331/q-2024-02-22-126510.22331/q-2024-02-22-1265Quantum Vision TransformersEl Amine CherratIordanis KerenidisNatansh MathurJonas LandmanMartin StrahmYun Yvonna LiIn 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.https://quantum-journal.org/papers/q-2024-02-22-1265/pdf/
spellingShingle El Amine Cherrat
Iordanis Kerenidis
Natansh Mathur
Jonas Landman
Martin Strahm
Yun Yvonna Li
Quantum Vision Transformers
Quantum
title Quantum Vision Transformers
title_full Quantum Vision Transformers
title_fullStr Quantum Vision Transformers
title_full_unstemmed Quantum Vision Transformers
title_short Quantum Vision Transformers
title_sort quantum vision transformers
url https://quantum-journal.org/papers/q-2024-02-22-1265/pdf/
work_keys_str_mv AT elaminecherrat quantumvisiontransformers
AT iordaniskerenidis quantumvisiontransformers
AT natanshmathur quantumvisiontransformers
AT jonaslandman quantumvisiontransformers
AT martinstrahm quantumvisiontransformers
AT yunyvonnali quantumvisiontransformers