Quantum Neural Network (QNN) is a promising application towards quantum advantage on near-term quantum hardware. However, due to the large quantum noises (errors), the performance of QNN models has a severe degradation on real quantum devices. For 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 QNN and are only applicable to inference; on the other hand, existing QNN work does not consider noise effect. To this end, we present RoQNN, a QNN-specific framework to perform noise-aware optimizations in both training and inference stages to improve robustness. We analytically deduct and experimentally observe that the effect of quantum noise to QNN 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 QNN 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 RoQNN improves accuracy by up to 43%, and achieves over 94% 2-class, 80% 4-class, and 34% 10-class MNIST classification accuracy measured on real quantum computers. We also open-source our PyTorch library for construction and noise-aware training of QNN at https://github.com/mit-han-lab/pytorch-quantum .
翻译:QONN是近期量子硬件量子优势的一个很有希望的应用程序。然而,由于量子噪音(errors)很大,QNN模型的性能在真实量子装置上严重退化。例如,IBMQ-Yorktown的无噪音模拟和音响结果之间的精确差距超过60%。现有的减少噪音方法一般,没有利用QNN的独有特点,只适用于推断;另一方面,现有的QNNN工作不考虑噪声效应。为此,我们提出了QNNNNNN(QN)的准确性能,这是在培训和推导阶段都进行声效优化。我们从分析下到实验地观察到,量噪音对QNNN的测量结果的影响是从无噪音结果的线性图,而没有利用QNNN的特性特性特性特征分布差异,而现在的QNNNN(Q)的精确度框架是用来在培训和QQQQQ(NM)的升级过程中进行。最后,我们用NNNQ(NR)的音量质数据输入到NQ(NR)到D)的进度,最后用NQ(NQ)到M(NQ)到M(ND)的进度到M(ND)的音)的升级到M(OD)到D)的硬(O)的升级到M)的升级到M)的升级到D(O(O)到M)的升级到M)的升级到M)的升级到D(OD(O)的硬(OD(OD)(ND)(OD(OD)(ND)(ND)(ND)(M)(ND)(O)(O)(O)(O)(O)(O)(O)(O)(O)(O)(M)(M)(M)(M)(M)(M)(O)(O)(O)(O)(ND)(ND)(ND)(ND)(M)(M)(ND)(ND)(M)(M)(M)(N)(N)(N)(N)(ND)(N)(N)(N)(N)(N)(N)