Quantum Transfer Learning for MNIST Classification Using a Hybrid Quantum-Classical Approach

  • 2025-07-31 16:45:54
  • Soumyadip Sarkar
  • 0

Abstract

We implement a hybrid quantum-classical model for image classification thatcompresses MNIST digit images into a low-dimensional feature space and thenmaps these features onto a 5-qubit quantum state. First, an autoencodercompresses each $28\times28$ image (784 pixels) into a 64-dimensional latentvector, preserving salient features of the digit with minimal reconstructionerror. We further reduce the latent representation to 5 principal componentsusing Principal Component Analysis (PCA), to match the 5 available qubits.These 5 features are encoded as rotation angles in a quantum circuit with 5qubits. The quantum feature map applies single-qubit rotations ($R_y$ gates)proportional to the feature values, followed by a Hadamard gate and a cascadeof entangling CNOT gates to produce a non-product entangled state. Measuringthe 5-qubit state yields a 32-dimensional probability distribution over basisoutcomes, which serves as a quantum-enhanced feature vector for classification.A classical neural network with a softmax output is then trained on these32-dimensional quantum feature vectors to predict the digit class. We evaluatethe hybrid model on the MNIST dataset and compare it to a purely classicalbaseline that uses the 64-dimensional autoencoder latent features forclassification. The results show that the hybrid model can successfullyclassify digits, demonstrating the feasibility of integrating quantum computingin the classification pipeline, although its accuracy (about 75\% on test data)currently falls below the classical baseline (about 98\% on the same compresseddata).

 

Quick Read (beta)

loading the full paper ...