QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Hanrui, Li, Zirui, Gu, Jiaqi, Ding, Yongshan, Pan, David Z., Han, Song
Natura: Preprint
Pubblicazione: 2022
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912205740441600
author Wang, Hanrui
Li, Zirui
Gu, Jiaqi
Ding, Yongshan
Pan, David Z.
Han, Song
author_facet Wang, Hanrui
Li, Zirui
Gu, Jiaqi
Ding, Yongshan
Pan, David Z.
Han, Song
contents Parameterized Quantum Circuits (PQC) are drawing increasing research interest thanks to its potential to achieve quantum advantages on near-term Noisy Intermediate Scale Quantum (NISQ) hardware. In order to achieve scalable PQC learning, the training process needs to be offloaded to real quantum machines instead of using exponential-cost classical simulators. One common approach to obtain PQC gradients is parameter shift whose cost scales linearly with the number of qubits. We present QOC, the first experimental demonstration of practical on-chip PQC training with parameter shift. Nevertheless, we find that due to the significant quantum errors (noises) on real machines, gradients obtained from naive parameter shift have low fidelity and thus degrading the training accuracy. To this end, we further propose probabilistic gradient pruning to firstly identify gradients with potentially large errors and then remove them. Specifically, small gradients have larger relative errors than large ones, thus having a higher probability to be pruned. We perform extensive experiments with the Quantum Neural Network (QNN) benchmarks on 5 classification tasks using 5 real quantum machines. The results demonstrate that our on-chip training achieves over 90% and 60% accuracy for 2-class and 4-class image classification tasks. The probabilistic gradient pruning brings up to 7% PQC accuracy improvements over no pruning. Overall, we successfully obtain similar on-chip training accuracy compared with noise-free simulation but have much better training scalability. The QOC code is available in the TorchQuantum library.
format Preprint
id arxiv_https___arxiv_org_abs_2202_13239
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning
Wang, Hanrui
Li, Zirui
Gu, Jiaqi
Ding, Yongshan
Pan, David Z.
Han, Song
Quantum Physics
Hardware Architecture
Computer Vision and Pattern Recognition
Machine Learning
Parameterized Quantum Circuits (PQC) are drawing increasing research interest thanks to its potential to achieve quantum advantages on near-term Noisy Intermediate Scale Quantum (NISQ) hardware. In order to achieve scalable PQC learning, the training process needs to be offloaded to real quantum machines instead of using exponential-cost classical simulators. One common approach to obtain PQC gradients is parameter shift whose cost scales linearly with the number of qubits. We present QOC, the first experimental demonstration of practical on-chip PQC training with parameter shift. Nevertheless, we find that due to the significant quantum errors (noises) on real machines, gradients obtained from naive parameter shift have low fidelity and thus degrading the training accuracy. To this end, we further propose probabilistic gradient pruning to firstly identify gradients with potentially large errors and then remove them. Specifically, small gradients have larger relative errors than large ones, thus having a higher probability to be pruned. We perform extensive experiments with the Quantum Neural Network (QNN) benchmarks on 5 classification tasks using 5 real quantum machines. The results demonstrate that our on-chip training achieves over 90% and 60% accuracy for 2-class and 4-class image classification tasks. The probabilistic gradient pruning brings up to 7% PQC accuracy improvements over no pruning. Overall, we successfully obtain similar on-chip training accuracy compared with noise-free simulation but have much better training scalability. The QOC code is available in the TorchQuantum library.
title QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning
topic Quantum Physics
Hardware Architecture
Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2202.13239