Source-linked AI summary

Quantum convolutional neural network for classical data classification

Tak Hur, Leeseok Kim, Daniel K. Park

arXiv:2108.00661v2quant-ph

TL;DR

Fully parameterized QCNNs address the limited evidence for classical-data classification by benchmarking circuit, encoding, preprocessing, cost-function, and optimizer choices. Across MNIST and Fashion MNIST, QCNNs achieved high accuracy with few parameters and outperformed CNNs under similar conditions, supporting their use in near-term quantum machine learning.

  • Problem

    Fully parameterized QCNNs had not been studied systematically for classical-data pattern recognition, despite the importance of classification and the expected suitability of parameterized circuits for NISQ hardware.

  • Method

    The study benchmarks fully parameterized, two-qubit QCNNs across circuit ansatze, quantum encodings, classical preprocessing methods, cost functions, and optimizers on MNIST and Fashion MNIST.

  • Results

    QCNNs achieved best-case accuracies of about 99% on MNIST and 94% on Fashion MNIST, and performed noticeably better than CNNs under similar training conditions.

  • Takeaways & Limitations

    Shallow, fully parameterized QCNNs with 12–51 free parameters provide a benchmarked approach for classical-data classification on near-term quantum hardware.

Abstract

from arXiv · show

With the rapid advance of quantum machine learning, several proposals for the quantum-analogue of convolutional neural network (CNN) have emerged. In this work, we benchmark fully parameterized quantum convolutional neural networks (QCNNs) for classical data classification. In particular, we propose a quantum neural network model inspired by CNN that only uses two-qubit interactions throughout the entire algorithm. We investigate the performance of various QCNN models differentiated by structures of parameterized quantum circuits, quantum data encoding methods, classical data pre-processing methods, cost functions and optimizers on MNIST and Fashion MNIST datasets. In most instances, QCNN achieved excellent classification accuracy despite having a small number of free parameters. The QCNN models performed noticeably better than CNN models under the similar training conditions. Since the QCNN algorithm presented in this work utilizes fully parameterized and shallow-depth quantum circuits, it is suitable for Noisy Intermediate-Scale Quantum (NISQ) devices.

I. INTRODUCTION

This work addresses the missing study of fully parameterized QCNNs for classifying classical data by benchmarking their designs on MNIST and Fashion MNIST. The models use two-qubit interactions and achieve high accuracy while outperforming CNNs under similar training conditions.

  • Research gap: Fully parameterized QCNN classification of classical data had not been systematically studied, motivating this benchmark.Prior QCNN work had focused on quantum many-body problems rather than classical-data pattern recognition.
  • Approach: The proposed QCNN uses only two-qubit interactions throughout the algorithm and is trained for supervised classification.The benchmark varies circuit structures, encodings, preprocessing methods, cost functions, and optimizers.
  • Results: 99% for MNIST and 94% for Fashion MNIST were the reported best-case classification accuracies.These results were obtained across the benchmarked QCNN configurations.
  • Results: QCNN performed noticeably better than CNN under similar training conditions on both benchmarking datasets.The comparison concerns the reported MNIST and Fashion MNIST classification benchmarks.
  • Classification framework: Binary classification training minimizes a cost function by optimizing the parameters of the quantum gates.After training, an unseen input is assigned a label using the optimized model.

B. Quantum Convolutional Neural Network

The QCNN uses a hierarchical, translationally invariant architecture in which repeated two-qubit convolution and pooling blocks progressively reduce the number of qubits. Its shallow structure also limits the number of trainable parameters and supports iterative classical or quantum gradient-based optimization.

  • Architecture: Hierarchical QCNN layers progressively reduce the number of qubits, analogous to pooling in a classical CNN.The architecture can use O(log(n)) layers for n input qubits.
  • Architecture: Within each layer, identical parameterized quantum-gate blocks are applied translationally invariantly to convolution and pooling operations.The convolution uses the same two-qubit ansatz across nearest-neighbour qubits, while pooling uses identical blocks within the layer.
  • Parameterization: QCNN unitary blocks always contain two-qubit circuits, with each layer combining li convolutional filters and one pooling operation.A two-qubit gate requires at most 15 parameters.
  • Parameterization: O(log(n)) trainable parameters are required when the number of filters per layer is constant, an exponential reduction relative to the general hierarchical structure.A hybrid variant can stop quantum processing at m qubits and pass measurement outcomes to a classical neural network.
  • Optimization: The measurement outcome feeds a cost function, after which parameters are updated iteratively using gradients calculated classically or through the parameter-shift rule.The schematic depicts alternating quantum evaluation and classical parameter updates.

C. Quantum data encoding

Quantum feature maps encode classical inputs as quantum states, and this work benchmarks multiple encoding strategies with different qubit and circuit-depth trade-offs. Amplitude encoding is compact in qubits but can incur substantial circuit depth, whereas qubit-based methods use more qubits for shallow encoding.

  • Quantum feature maps: Quantum feature mapping transforms classical data into a Hilbert-space quantum state and is required for applying quantum machine learning to classical data.The mapping is implemented by a data-dependent unitary transformation.
  • Amplitude encoding: Amplitude encoding maps an N-dimensional normalized vector into amplitudes of an n-qubit state when N = 2^n.It can represent exponentially many classical values in the quantum state.
  • Amplitude encoding: Amplitude encoding reduces optimized QCNN parameters doubly-exponentially with classical-data dimension but usually requires circuit depth O(poly(N)).A lower-depth alternative can use O(log(N)) depth at the cost of O(N) qubits.
  • Qubit encoding: Qubit encoding embeds each rescaled classical feature into a separate qubit and uses constant quantum circuit depth.Its qubit requirement scales as O(N).
  • Dense qubit encoding: Dense qubit encoding stores two classical data values in each qubit, mapping an N-dimensional input to N/2 qubits.The pairing of classical features assigned to each qubit can be chosen in different ways.

4. Hybrid Encoding

Hybrid encoding methods compromise between amplitude encoding's circuit width and qubit encoding's circuit depth by parallelizing amplitude encoding across independent qubit blocks.

  • Hybrid Encoding: Hybrid direct encoding (HDE) applies amplitude encoding independently to b blocks of m qubits in parallel.Each block encodes O(2^m) classical data, and the full system contains b2^m classical data.
  • Hybrid Encoding: Hybrid angle encoding (HAE) is introduced because differing block normalization constants can make HDE amplitudes an unfaithful data representation.HAE provides an alternative encoding intended to circumvent this normalization issue.
  • Hybrid Encoding: b blocks of m qubits can encode b(2^m − 1) classical data with the hybrid angle-encoding construction.The paper compares the performance of these hybrid encoding methods in Section IV.
  • Hybrid Encoding: Parallelization reduces hybrid circuit depth to O(2^m) while using O(mN/2^m) qubits, with m selected according to hardware trade-offs.Hybrid methods use fewer qubits than qubit encoding and shallower depth than amplitude encoding.

A. Ansatz

The QCNN uses shared convolutional and pooling ansatz templates built from two-qubit circuits, while training varies cost functions including MSE and cross-entropy.

  • A. Ansatz: All convolutional filters share one ansatz, and all pooling operations share another, reducing the parameters that must be optimized.Using different ansatzes for every filter could improve performance but would increase the number of optimized parameters.
  • A. Ansatz: The convolutional-layer templates combine single-qubit and two-qubit gates, with several prior circuits modified into two-qubit forms.Circuit 1 comes from a tree tensor network, while circuits 2, 3, 4, 5, 7, and 8 derive from Sim et al.'s circuit study.
  • A. Ansatz: The pooling layer applies a two-qubit circuit and traces out one qubit to reduce two-qubit states to one-qubit states.The selected pooling circuit contains two free parameters.
  • A. Ansatz: For convolutional circuit 9, the authors compare pooling with a parameterized two-qubit circuit against pooling consisting only of tracing out one qubit.The parameterized pooling gates may be redundant because circuit 9 is already an arbitrary SU(4) gate.
  • A. Ansatz: The benchmark tests both mean squared error and cross-entropy loss while updating variational parameters to minimize training-set cost.Class labels are remapped from {0, 1} to {1, −1} for the MSE formulation, whose prediction is a Pauli-Z expectation value.

2. Cross-Entropy Loss

Cross-entropy training interprets QCNN measurement probabilities as classification outputs, while the circuit design uses parameterized convolutional and pooling operations and classical preprocessing can reduce input dimension.

  • 2. Cross-Entropy Loss: Cross-entropy loss evaluates QCNN classification using probabilities of measuring computational-basis states from the final single-qubit measurement.For sample i, Pr[ψ_i(θ) = y_i] denotes the probability of measuring basis state |y_i⟩.
  • 2. Cross-Entropy Loss: The convolutional layer uses parameterized quantum-circuit configurations composed of single-qubit and two-qubit gate operations.The figure caption defines rotations R_i(θ), the Hadamard gate H, and the arbitrary single-qubit gate U3.
  • 2. Cross-Entropy Loss: The pooling layer applies controlled Rz(θ1) and Rx(θ2) rotations, then traces out the control qubit to reduce dimensionality.The rotations activate according to whether the control qubit is 1 or 0.
  • 2. Cross-Entropy Loss: High-dimensional data can require more qubits than current NISQ devices support, motivating classical dimensionality reduction before quantum encoding.The paper uses a simple one-hidden-layer autoencoder and feeds latent-space data into the quantum circuits.

A. QCNN results overview

The benchmark evaluates QCNN binary classification on MNIST and Fashion MNIST across circuit, encoding, preprocessing, and boundary designs. Results show strong accuracy, parameter–performance trade-offs, preprocessing dependence, and comparable open- versus periodic-boundary performance.

  • Benchmark setup: Binary classification uses MNIST and Fashion MNIST image data, selecting classes 0 and 1 from each ten-class dataset.Both datasets contain 28×28 images, and the benchmark evaluates classical simulations under varied QCNN conditions.
  • Accuracy and parameterization: 97.8% MNIST accuracy is achieved with ansatz 4 and amplitude encoding using 24 parameters, versus 98.4% with 51 parameters.Ansatze with more free parameters tend to produce higher scores, but smaller ansatze can reduce training time.
  • Preprocessing and encoding: PCA outperforms autoencoding for MNIST, whereas autoencoding performs better for Fashion MNIST, making preprocessing dataset-dependent.Hybrid encoding with PCA is generally weakened by a normalization issue, which hybrid angle encoding is designed to resolve.
  • Filter scaling: Increasing convolutional filters raises MNIST accuracy from about 86% to 96% in one configuration, but no general trend appears across configurations.For Fashion MNIST, reported improvements include about 88% to 90% and about 86% to 90% under specific circuit and encoding choices.
  • Boundary conditions: Open- and periodic-boundary QCNNs have similar classification performance for the two tested ansatze, while open-boundary ansatz 9b supports nearest-neighbour interactions.The comparison uses one convolutional filter per layer, with l1 = l2 = l3 = 1.

C. Comparison to CNN

The study compares QCNN and CNN classification under similarly constrained optimization conditions and parameter counts. QCNN generally achieves higher accuracy, lower variability, and faster training in the reported comparisons.

  • The compared CNNs use small input layers and parameter counts adjusted to resemble QCNN models, limiting direct comparison to qubit and dense encoding cases.
  • QCNN models perform better than corresponding CNN models on MNIST, while Fashion MNIST shows similar performance for CNN models with 44 and 56 parameters.
  • Figure 4 varies equal filter counts across three layers for two ansatze and five encoding schemes when examining classification accuracy.
  • QCNN models have considerably smaller standard deviations than CNN models on average, indicating lower sensitivity to random parameter initialization.

V. CONCLUSION

The paper benchmarks fully parameterized QCNNs for binary classification of classical MNIST and Fashion MNIST data using small quantum circuits. Across the tested settings, QCNNs achieve high accuracy and outperform comparable CNNs, while the mechanism behind the observed advantage remains unresolved.

  • The architecture supports two-qubit interactions throughout and includes encoding schemes that configure the trade-off between quantum circuit depth and width.
  • The benchmark tests 8-qubit QCNN models with 12 to 51 free parameters on binary MNIST and Fashion MNIST classification.
  • QCNN achieves close to 99% accuracy on MNIST and 94% on Fashion MNIST in the best reported cases.
  • QCNN performs noticeably better than CNN under similar training conditions on both benchmarking datasets.
  • The underlying principle of the demonstrated quantum advantage remains an open problem for future investigation.

Appendix A: Related works

The related-work discussion distinguishes this fully parameterized QCNN from quantum circuits that reproduce classical convolution arithmetic. It also situates the model among hierarchical variational circuits and comparable low-parameter CNN baselines.

  • The paper distinguishes QCNN from quanvolutional neural networks, which imitate classical convolution arithmetic with quantum circuits.
  • Quanvolutional neural networks are limited to qubit encoding and require a suitable parametric circuit whose qubit count matches filter size.
  • Hierarchical variational quantum circuits with O(log(n)) layers are described as avoiding barren plateaus and maintaining polynomial measurement precision requirements.
  • The paper notes that fully parameterized quantum-neuron networks represent an alternative approach whose relationship to QCNN remains future work.
  • The QCNN comparison with classical CNNs uses matched optimization settings and CNN structures adjusted to have similar trainable parameter counts.

Appendix C: QCNN simulation results for MSE loss

The appendix reports QCNN simulation results when mean squared error replaces cross-entropy and compares the model with hierarchical quantum classifiers. MSE gives similar QCNN results, while increasing HQC parameters beyond roughly 42 shows no clear performance trend.

  • Appendix C: QCNN simulation results for MSE loss: MSE-trained QCNN models obtain similar classification results to the cross-entropy-trained models reported in the main text.
  • Appendix C: QCNN simulation results for MSE loss: Tables VI and VII report mean accuracy and one standard deviation for MSE-trained QCNNs on MNIST and Fashion MNIST.
  • Appendix D: Classification with Hierarchical Quantum Classifier: HQC models have effective parameter counts that grow faster than those of QCNN models in the reported comparisons.
  • Appendix D: Classification with Hierarchical Quantum Classifier: Beyond 42 parameters, HQC classification performance shows no clear trend as the parameter count increases.
  • Appendix D: Classification with Hierarchical Quantum Classifier: The appendix identifies overfitting under increasing parameter counts as an open problem.
Loading 2108.00661v2…