QSpeech: Low-Qubit Quantum Speech Application Toolkit

Zhenhou Hong, Jianzong Wang, Xiaoyang Qu, Chendong Zhao, Wei Tao, Jing Xiao

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.

  1. 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.
  2. Quantum Processing: Data is encoded via $RY$ rotation gates, followed by entangling gates and parameterized unitary rotations $U(\theta)$, and finally measured.
  3. Output Expansion: A second LT layer expands the measured quantum states back to the dimensionality required by subsequent neural network stages.
  4. 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 proposed low-qubit VQC architecture featuring Linear Transformation (LT) blocks.

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.

The hierarchical architecture of the QSpeech toolkit, showing libraries and backends.

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

Abstract

Quantum devices with low qubits are common in the Noisy Intermediate-Scale Quantum (NISQ) era. However, Quantum Neural Network (QNN) running on low-qubit quantum devices would be difficult since it is based on Variational Quantum Circuit (VQC), which requires many qubits. Therefore, it is critical to make QNN with VQC run on low-qubit quantum devices. In this study, we propose a novel VQC called the low-qubit VQC. VQC requires numerous qubits based on the input dimension; however, the low-qubit VQC with linear transformation can liberate this condition. Thus, it allows the QNN to run on low-qubit quantum devices for speech applications. Furthermore, as compared to the VQC, our proposed low-qubit VQC can stabilize the training process more. Based on the low-qubit VQC, we implement QSpeech <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</sup> <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</sup> Our implementation of QSpeech is publicly available at https://github.com/zhenhouhong/QSpeech, a library for quick prototyping of hybrid quantum-classical neural networks in the speech field. It has numerous quantum neural layers and QNN models for speech applications. Experiments on Speech Command Recognition and Text-to-Speech show that our proposed low-qubit VQC outperforms VQC and is more stable.
BibTeX
@inproceedings{hong2022qspeech,
  author = {Zhenhou Hong and Jianzong Wang and Xiaoyang Qu and Chendong Zhao and Wei Tao and Jing Xiao},
  title = {{QSpeech: Low-Qubit Quantum Speech Application Toolkit}},
  booktitle = {IJCNN},
  year = {2022},
  url = {https://openreview.net/forum?id=aHmAb10xmON},
}

Loading related content...

Figure