Table of Contents
Fetching ...

QuantumNAT: Quantum Noise-Aware Training with Noise Injection, Quantization and Normalization

Hanrui Wang, Jiaqi Gu, Yongshan Ding, Zirui Li, Frederic T. Chong, David Z. Pan, Song Han

TL;DR

QuantumNAT, a PQC-specific framework to perform noise-aware optimizations in both training and inference stages to improve robustness against noise is presented and post-measurement quantization is introduced to quantize the measurement outcomes to discrete values, achieving the denoising effect.

Abstract

Parameterized Quantum Circuits (PQC) are promising towards quantum advantage on near-term quantum hardware. However, due to the large quantum noises (errors), the performance of PQC models has a severe degradation on real quantum devices. Take Quantum Neural Network (QNN) as an example, the accuracy gap between noise-free simulation and noisy results on IBMQ-Yorktown for MNIST-4 classification is over 60%. Existing noise mitigation methods are general ones without leveraging unique characteristics of PQC; on the other hand, existing PQC work does not consider noise effect. To this end, we present QuantumNAT, a PQC-specific framework to perform noise-aware optimizations in both training and inference stages to improve robustness. We experimentally observe that the effect of quantum noise to PQC measurement outcome is a linear map from noise-free outcome with a scaling and a shift factor. Motivated by that, we propose post-measurement normalization to mitigate the feature distribution differences between noise-free and noisy scenarios. Furthermore, to improve the robustness against noise, we propose noise injection to the training process by inserting quantum error gates to PQC according to realistic noise models of quantum hardware. Finally, post-measurement quantization is introduced to quantize the measurement outcomes to discrete values, achieving the denoising effect. Extensive experiments on 8 classification tasks using 6 quantum devices demonstrate that QuantumNAT improves accuracy by up to 43%, and achieves over 94% 2-class, 80% 4-class, and 34% 10-class classification accuracy measured on real quantum computers. The code for construction and noise-aware training of PQC is available in the TorchQuantum library.

QuantumNAT: Quantum Noise-Aware Training with Noise Injection, Quantization and Normalization

TL;DR

QuantumNAT, a PQC-specific framework to perform noise-aware optimizations in both training and inference stages to improve robustness against noise is presented and post-measurement quantization is introduced to quantize the measurement outcomes to discrete values, achieving the denoising effect.

Abstract

Parameterized Quantum Circuits (PQC) are promising towards quantum advantage on near-term quantum hardware. However, due to the large quantum noises (errors), the performance of PQC models has a severe degradation on real quantum devices. Take Quantum Neural Network (QNN) as an example, the accuracy gap between noise-free simulation and noisy results on IBMQ-Yorktown for MNIST-4 classification is over 60%. Existing noise mitigation methods are general ones without leveraging unique characteristics of PQC; on the other hand, existing PQC work does not consider noise effect. To this end, we present QuantumNAT, a PQC-specific framework to perform noise-aware optimizations in both training and inference stages to improve robustness. We experimentally observe that the effect of quantum noise to PQC measurement outcome is a linear map from noise-free outcome with a scaling and a shift factor. Motivated by that, we propose post-measurement normalization to mitigate the feature distribution differences between noise-free and noisy scenarios. Furthermore, to improve the robustness against noise, we propose noise injection to the training process by inserting quantum error gates to PQC according to realistic noise models of quantum hardware. Finally, post-measurement quantization is introduced to quantize the measurement outcomes to discrete values, achieving the denoising effect. Extensive experiments on 8 classification tasks using 6 quantum devices demonstrate that QuantumNAT improves accuracy by up to 43%, and achieves over 94% 2-class, 80% 4-class, and 34% 10-class classification accuracy measured on real quantum computers. The code for construction and noise-aware training of PQC is available in the TorchQuantum library.

Paper Structure

This paper contains 25 sections, 2 theorems, 3 equations, 9 figures, 14 tables.

Key Result

theorem 1

(informal version). The measurement outcome $y$ of a quantum neural network for the training input data $x$ is transformed by the quantum noise that the system undergoes with a linear map $f(y_x) = \gamma y_x + \beta_x$, where the translation $\beta_x$ depends on the input $x$ and quantum noises, wh

Figures (9)

  • Figure 1: Left: Current quantum hardware has much larger error rates (around $10^{-3}$) than classical CPUs/GPUs. Right: Due to the errors, PQC (QNN) models suffer from severe accuracy drops. Different devices have various error magnitudes, leading to distinct accuracy. These motivate QuantumNAT, a hardware-specific noise-aware PQC training approach to improve robustness and accuracy.
  • Figure 2: Quantum Neural Networks Architecture. QNN has multiple blocks, each has an encoder to encode classical values to quantum domain, quantum layers with trainable weights, and a measurement layer that obtains classical values.
  • Figure 3: QuantumNAT Overview. (1) Post-measurement normalization matches the distribution of measurement results between noise-free simulation and real QC. (2) Based on realistic noise models, noise-injection inserts quantum error gates to the training process to increase the classification margin between classes. (3) Measurement outcomes are further quantized for denoising.
  • Figure 4: Post-measurement normalization reduces the distribution mismatch between noise-free simulation and noisy results, thus improving the Signal-to-Noise Ratio (SNR).
  • Figure 5: Noise injection via error gate insertion. X, Y, Z are sampled Pauli error gates. R is the injected readout error. Probabilities for gate insertion are obtained from real device noise models.
  • ...and 4 more figures

Theorems & Definitions (4)

  • theorem 1
  • definition 1
  • definition 2
  • theorem \ref{th:linear_noise}