Table of Contents
Fetching ...

Reduction of finite sampling noise in quantum neural networks

David A. Kreplin, Marco Roth

TL;DR

This work introduces the variance regularization, a technique for reducing the variance of the expectation value during the quantum model training, and demonstrates the reduced variance speeds up the training and lowers the output noise as well as decreases the number of necessary evaluations of gradient circuits.

Abstract

Quantum neural networks (QNNs) use parameterized quantum circuits with data-dependent inputs and generate outputs through the evaluation of expectation values. Calculating these expectation values necessitates repeated circuit evaluations, thus introducing fundamental finite-sampling noise even on error-free quantum computers. We reduce this noise by introducing the variance regularization, a technique for reducing the variance of the expectation value during the quantum model training. This technique requires no additional circuit evaluations if the QNN is properly constructed. Our empirical findings demonstrate the reduced variance speeds up the training and lowers the output noise as well as decreases the number of necessary evaluations of gradient circuits. This regularization method is benchmarked on the regression of multiple functions and the potential energy surface of water. We show that in our examples, it lowers the variance by an order of magnitude on average and leads to a significantly reduced noise level of the QNN. We finally demonstrate QNN training on a real quantum device and evaluate the impact of error mitigation. Here, the optimization is feasible only due to the reduced number of necessary shots in the gradient evaluation resulting from the reduced variance.

Reduction of finite sampling noise in quantum neural networks

TL;DR

This work introduces the variance regularization, a technique for reducing the variance of the expectation value during the quantum model training, and demonstrates the reduced variance speeds up the training and lowers the output noise as well as decreases the number of necessary evaluations of gradient circuits.

Abstract

Quantum neural networks (QNNs) use parameterized quantum circuits with data-dependent inputs and generate outputs through the evaluation of expectation values. Calculating these expectation values necessitates repeated circuit evaluations, thus introducing fundamental finite-sampling noise even on error-free quantum computers. We reduce this noise by introducing the variance regularization, a technique for reducing the variance of the expectation value during the quantum model training. This technique requires no additional circuit evaluations if the QNN is properly constructed. Our empirical findings demonstrate the reduced variance speeds up the training and lowers the output noise as well as decreases the number of necessary evaluations of gradient circuits. This regularization method is benchmarked on the regression of multiple functions and the potential energy surface of water. We show that in our examples, it lowers the variance by an order of magnitude on average and leads to a significantly reduced noise level of the QNN. We finally demonstrate QNN training on a real quantum device and evaluate the impact of error mitigation. Here, the optimization is feasible only due to the reduced number of necessary shots in the gradient evaluation resulting from the reduced variance.
Paper Structure (11 sections, 18 equations, 12 figures)

This paper contains 11 sections, 18 equations, 12 figures.

Figures (12)

  • Figure 1: Parameterized quantum circuit of the QNN used in all examples in this work. The first layer of $\hat{R}_y$ gates manipulates the initial state. The blueish highlighted layer includes the Chebychev input encoding in the $\hat{R}_x$ gates as well as the parameterized control manipulation of the quantum state. The layer is repeated $l$ times for a repeated input encoding. The last layer of $\hat{R}_y$ gates serves as a change of the basis that is used for measurement. For a hardware efficient approach, the rightmost controlled gate in the blueish layer is removed to avoid swapping.
  • Figure 2: The output of the QNN is evaluated for two cases: trained with (a) and without (b) variance regularization. The training is conducted using a noise-free simulator, and the output is computed with and without shots. For the shot-based simulation, 10$~\!$000 shots are utilized.
  • Figure 3: Different regularization parameter functions $\alpha_{a,b,v}(i)$ for various combinations of $a$, $b$ and $v$. The blue curve with $a=0.08, b=20, v=0.005$ is used for the experiments throughout this paper.
  • Figure 4: Graphs representing the ADAM optimization of a QNN using the shot-based QASM simulator. The upper panel (a) showcases the variance loss (excluding the prefactor $\alpha$), while the middle panel (b) displays the fitting loss throughout the optimization process. The bottom panel (c) illustrates the number of shots utilized in the gradient evaluation. All results are averaged values from 10 runs, and the individual results are depicted as thin lines. Results from the noise-free statevector simulator (SV) are represented by dashed lines.
  • Figure 5: Regression of various functions without (blue) and with (orange) variance regularization. The black lines show the reference function; the data points marked with an x are used for training the QNN. The training and the final inference are obtained from a shot-based QASM simulation using 5000 shots. The inference for the logarithm function is performed on a test set with an equidistant spacing of 0.002 while the spacing for the other functions is 0.004.
  • ...and 7 more figures