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

02/26/2022
by   Hanrui Wang, et al.
0

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 4-class image classification tasks. The probabilistic gradient pruning brings up to 7 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.

READ FULL TEXT
research
10/21/2021

RoQNN: Noise-Aware Training for Robust Quantum Neural Networks

Quantum Neural Network (QNN) is a promising application towards quantum ...
research
04/29/2021

Optimal training of variational quantum algorithms without barren plateaus

Variational quantum algorithms (VQAs) promise efficient use of near-term...
research
07/16/2023

Computing the gradients with respect to all parameters of a quantum neural network using a single circuit

When computing the gradients of a quantum neural network using the param...
research
04/27/2023

An Empirical Comparison of Optimizers for Quantum Machine Learning with SPSA-based Gradients

VQA have attracted a lot of attention from the quantum computing communi...
research
07/31/2022

Parameter-Parallel Distributed Variational Quantum Algorithm

Variational quantum algorithms (VQAs) have emerged as a promising near-t...
research
10/18/2022

Quantum Machine Learning using the ZXW-Calculus

The field of quantum machine learning (QML) explores how quantum compute...
research
12/07/2022

Hardware Efficient Neural Network Assisted Qubit Readout

Reading a qubit is a fundamental operation in quantum computing. It tran...

Please sign up or login with your details

Forgot password? Click here to reset