Abstract
The Noisy Intermediate-Scale Quantum (NISQ) era presents significant hardware constraints, typically limiting available devices to between 5 and 50 qubits. This poses a major challenge for speech applications where input dimensions, such as Mel-spectrogram frames, often exceed available qubit counts. We present QSpeech, an open-source toolkit that introduces a low-qubit Variational Quantum Circuit (VQC) architecture. By utilizing Linear Transformation (LT) layers to compress high-dimensional data, QSpeech enables complex speech recognition and synthesis tasks on devices with as few as two qubits while addressing gradient stability issues like the barren plateau problem.
Introduction
Current quantum hardware is constrained by low qubit counts and high noise levels. Standard VQCs generally require a one-to-one mapping between input dimensions and qubits. For speech processing, where features can reach 256 dimensions, this requirement creates a prohibitive hardware gap. Furthermore, Quantum Neural Networks (QNNs) are susceptible to the "Barren Plateau" problem, where vanishing gradients during training hinder learning. QSpeech addresses these challenges by providing a framework for hardware-efficient and numerically stable quantum speech processing.
Methodology
Low-Qubit Variational Quantum Circuits
The primary innovation of QSpeech is the low-qubit VQC, which integrates classical Linear Transformation (LT) layers before and after the quantum processing stage to bridge the dimensionality gap.
- Dimensionality Squeezing: An input LT layer (implemented as a fully connected layer) compresses high-dimensional classical data into a vector size compatible with the available qubits.
- Quantum Processing: Data is encoded via $RY$ rotation gates, followed by entangling gates and parameterized unitary rotations $U(\theta)$, and finally measured.
- Output Expansion: A second LT layer expands the measured quantum states back to the dimensionality required by subsequent neural network stages.
- Gradient Stability: To mitigate vanishing gradients, an output clip operation is applied within the first LT layer, restricting values to a stable range of $[-3, 3]$.
The QSpeech Toolkit
QSpeech is built upon PennyLane and PyTorch, offering a modular hierarchy for quantum speech application development. It includes quantum implementations of standard neural network components such as Quantum Convolution (QConv), Quantum GRU (QGRU), and Quantum Attention.
Experimental Evaluation
The toolkit was evaluated on two core tasks: Speech Command Recognition (SCR) using the Google Speech Command-V2 dataset and Text-to-Speech (TTS) using the LJSpeech dataset.
Key Results
- Accuracy and Efficiency: On the Speech Command task, the low-qubit VQC achieved 47.69% accuracy with only 2 qubits, significantly outperforming a standard VQC (30.57%). Additionally, the proposed architecture trained approximately 10 times faster than the standard VQC.
- Speech Synthesis: The "QTacotron" model achieved a Mean Opinion Score (MOS) of 2.67 with 8 qubits. While slightly below the classical baseline (3.09), it demonstrates the feasibility of intelligible speech synthesis on NISQ-era hardware.
- Convergence: Hybrid models, such as the QTransformer-TTS, exhibited faster initial convergence compared to purely classical counterparts.
Discussion and Conclusion
QSpeech demonstrates that linear layers can serve as effective learnable adapters, preparing classical features for quantum processing. By restricting qubit counts and employing clipping operations, the framework stabilizes training and overcomes the barren plateau problem.
While classical baselines currently maintain a performance edge, the gap narrows as qubit counts increase. Future work will focus on optimizing LT layer weights and exploring more complex quantum architectures. QSpeech provides a foundational platform for advancing speech applications in the NISQ era.
Summary updated