RGB Image Classification with Quantum Convolutional Ansaetze

Yu Jing, Yang Yang, Chonghang Wu, Wenbing Fu, Wei Hu, Xiaogang Li, Hua Xu · DOI

Abstract

With the rapid growth of qubit numbers and coherence times in quantum hardware technology, implementing shallow neural networks on the so-called Noisy Intermediate-Scale Quantum (NISQ) devices has attracted a lot of interest. Many quantum (convolutional) circuit ansaetze are proposed for grayscale images classification tasks with promising empirical results. However, when applying these ansaetze on RGB images, the intra-channel information that is useful for vision tasks is not extracted effectively. In this paper, we propose two types of quantum circuit ansaetze to simulate convolution operations on RGB images, which differ in the way how inter-channel and intra-channel information are extracted. To the best of our knowledge, this is the first work of a quantum convolutional circuit to deal with RGB images effectively, with a higher test accuracy compared to the purely classical CNNs. We also investigate the relationship between the size of quantum circuit ansatz and the learnability of the hybrid quantum-classical convolutional neural network. Through experiments based on CIFAR-10 and MNIST datasets, we demonstrate that a larger size of the quantum circuit ansatz improves predictive performance in multiclass classification tasks, providing useful insights for near term quantum algorithm developments.

Introduction

Quantum Machine Learning (QML) is currently in its "NISQ era"—the age of Noisy Intermediate-Scale Quantum devices. While we wait for fault-tolerant quantum computers, researchers are designing "ansaetze" (specially structured quantum circuits) that can run on today’s shallow, noisy hardware. While Quantum Convolutional Neural Networks (QCNNs) have shown promise in classifying grayscale images, they have historically struggled with the complexity of color. Recent research titled "RGB Image Classification with Quantum Convolutional Ansatz" bridges this gap, proposing the first quantum convolutional architectures designed specifically to handle the multi-channel nature of RGB data.

The Challenge of Multi-Channel Data

In classical computer vision, RGB images are treated as three-dimensional tensors (Height x Width x Channels). Convolutional layers are effective because they look at spatial relationships within a channel (intra-channel) and correlations across channels (inter-channel). Previous QCNN research focused almost exclusively on grayscale images. When applied to RGB data, these models often fail to capture how different color channels interact to recognize complex objects. The challenge lies in designing a quantum circuit that can entangle qubits representing different color channels without becoming too deep or noisy for current hardware.

Proposed Quantum Architectures

The researchers developed a hybrid quantum-classical pipeline where the "convolution" happens on a quantum simulator (or hardware) and the subsequent dense layers are classical.

The hybrid quantum-classical model architecture, showing the flow from RGB input to quantum convolution and classical dense layers.

Two types of quantum ansaetze were proposed:

  1. HQconv (Hierarchical): This architecture processes local information within individual channels first, then uses extra controlled gates to encode the relationships between channels in a "bottom-up" hierarchy.
  2. FQconv (Flat): This architecture encodes intra-channel and inter-channel information simultaneously.

A key innovation is the introduction of "Quantum Stride." In this context, stride represents the distance between the control qubit and the target qubit in a controlled gate. By adjusting this stride, the researchers could tune whether the circuit focused more on spatial details within a color or the relationships between colors.

The FQconv (Flat) quantum circuit ansatz, which processes intra-channel and inter-channel information simultaneously.

Key Results and Insights

  • Simultaneity Wins: The "Flat" architecture (FQconv) generally outperformed the "Hierarchical" one (HQconv). Specifically, an FQconv with a stride of 4 was the most effective, suggesting that processing color and spatial information at the same time is superior to doing it sequentially.
  • The "Smoothness" Advantage: One of the most striking findings was that the loss and accuracy curves of the QCNN were significantly smoother than those of classical CNNs. Quantitative metrics showed that quantum models might offer more stable training trajectories.
  • Accuracy and Resilience: On the CIFAR-10-small dataset, the hybrid QCNN achieved higher predictive accuracy than a purely classical CNN of similar architecture. Furthermore, the models remained robust as long as quantum noise levels remained below 0.05, which is promising for near-term deployment on real NISQ devices.

Conclusion

While limited by the computational cost of simulation—restricting experiments to small images and datasets—this work provides a roadmap for scaling quantum vision models. The authors suggest that the next logical step is implementing these ansaetze on real-world high-qubit hardware, such as IBM’s 127-qubit processors, to further investigate the relationship between circuit depth and network learnability.

Summary updated

BibTeX
@inproceedings{jing2022rgb,
  author = {Yu Jing and Yang Yang and Chonghang Wu and Wenbing Fu and Wei Hu and Xiaogang Li and Hua Xu},
  title = {{RGB Image Classification with Quantum Convolutional Ansaetze}},
  booktitle = {Quantum Inf. Process},
  year = {2022},
  url = {https://openreview.net/forum?id=nMmtKsKOwkt},
}
Figure