The quality of raw materials is fundamental to the reliability and overall performance of final products, serving as the cornerstone of modern manufacturing standards. While traditional inspection methods can be effective, they are frequently time-consuming, labor-intensive, and unsuitable for high-throughput production environments. Recent advances in quantum computing offer significant advantages for processing large-scale data and complex feature representations, with strong potential to address the limitations of traditional inspection techniques. This study introduces an automated approach for grading raw materials, such as steel and fabric, which are widely used in industries including automotive, textiles, and general manufacturing, by integrating deep learning with quantum machine learning. A Hybrid Quantum Classical Neural Network (HQCNN) is proposed to enhance defect detection. The HQCNN utilizes a fine-tuned ResNet-18 backbone for robust feature extraction. Extracted features are used by a trainable depth controller that determines the complexity of a six-qubit variational quantum circuit (VQC) with data-adaptive, dynamic depth. Each VQC layer consists of rotations around the Y-axis (RY) and Z-axis (RZ), combined with Controlled-NOT (CNOT) gates arranged in a ring topology, with the total number of layers determined on a per-sample basis. The model is trained using a resource-aware loss function that penalizes excessive circuit depth, and the resulting quantum features are fused with classical features for final classification. Comprehensive ablation studies comparing the HQCNN against parameter-matched classical multi-layer perceptrons (MLPs) and fixed-depth quantum circuits demonstrate the fundamental advantage of the proposed approach. The dynamic HQCNN achieves 88.1 ± 2.4% accuracy on the complex metal surface defect dataset and 93.0 ± 1.8% on the fabric defects dataset. More importantly, it yields a statistically significant improvement in the macro F1-score (from 0.79 in classical parameter-matched baselines to 0.87), proving its superior capability in recognizing complex, minority-class defects while utilizing a fraction of the trainable parameters in the classification head compared to traditional architectures.
Quantum-enhanced deep learning models for automated defect detection in materials
Thompson Stephan

