Table of Contents
Fetching ...

Natural Quantization of Neural Networks

Richard Barney, Djamil Lakhdar-Hamina, Victor Galitski

TL;DR

A natural quantization of a standard neural network, where the neurons correspond to qubits and the activation functions are implemented via quantum gates and measurements, which finds a regime of"quantum advantage," where the validation error rate in the quantum realization is smaller than that in the classical model.

Abstract

We propose a natural quantization of a standard neural network, where the neurons correspond to qubits and the activation functions are implemented via quantum gates and measurements. The simplest quantized neural network corresponds to applying single-qubit rotations, with the rotation angles being dependent on the weights and measurement outcomes of the previous layer. This realization has the advantage of being smoothly tunable from the purely classical limit with no quantum uncertainty (thereby reproducing the classical neural network exactly) to a quantum case, where superpositions introduce an intrinsic uncertainty in the network. We benchmark this architecture on a subset of the standard MNIST dataset and find a regime of "quantum advantage," where the validation error rate in the quantum realization is smaller than that in the classical model. We also consider another approach where quantumness is introduced via weak measurements of ancilla qubits entangled with the neuron qubits. This quantum neural network also allows for smooth tuning of the degree of quantumness by controlling an entanglement angle, $g$, with $g=\fracπ2$ replicating the classical regime. We find that validation error is also minimized within the quantum regime in this approach. We also observe a quantum transition, with sharp loss of the quantum network's ability to learn at a critical point $g_c$. The proposed quantum neural networks are readily realizable in present-day quantum computers on commercial datasets.

Natural Quantization of Neural Networks

TL;DR

A natural quantization of a standard neural network, where the neurons correspond to qubits and the activation functions are implemented via quantum gates and measurements, which finds a regime of"quantum advantage," where the validation error rate in the quantum realization is smaller than that in the classical model.

Abstract

We propose a natural quantization of a standard neural network, where the neurons correspond to qubits and the activation functions are implemented via quantum gates and measurements. The simplest quantized neural network corresponds to applying single-qubit rotations, with the rotation angles being dependent on the weights and measurement outcomes of the previous layer. This realization has the advantage of being smoothly tunable from the purely classical limit with no quantum uncertainty (thereby reproducing the classical neural network exactly) to a quantum case, where superpositions introduce an intrinsic uncertainty in the network. We benchmark this architecture on a subset of the standard MNIST dataset and find a regime of "quantum advantage," where the validation error rate in the quantum realization is smaller than that in the classical model. We also consider another approach where quantumness is introduced via weak measurements of ancilla qubits entangled with the neuron qubits. This quantum neural network also allows for smooth tuning of the degree of quantumness by controlling an entanglement angle, , with replicating the classical regime. We find that validation error is also minimized within the quantum regime in this approach. We also observe a quantum transition, with sharp loss of the quantum network's ability to learn at a critical point . The proposed quantum neural networks are readily realizable in present-day quantum computers on commercial datasets.

Paper Structure

This paper contains 7 equations, 8 figures, 1 table.

Figures (8)

  • Figure 1: The classical binarized multi-layer perceptron network. It consists of an input layer of size $M$, $L$ hidden layers, each of size $N$, and an output layer.
  • Figure 2: The validation and training error rates for the classical network as training progresses. The training error rate quickly vanishes while the validation error rate bottoms out at a nonzero value. This is an indication of overfitting.
  • Figure 3: The quantum circuit implementing the hidden layers of the quantized network. Each step of the forward pass consists of rotating each qubit by an angle controlled by the classical channels, then measuring each qubit. These measurements are the activations which are then passed to the next layer of the network.
  • Figure 4: The validation error rate for a quantum network ($a=0.5$) after training as a function of the number of model results used to classify each image in the MNIST validation dataset.
  • Figure 5: (a) Validation error rate curves as training progresses in the quantized network for selected values of $a$. (b) The validation error rate as a function of $a$. The best result is achieved for nonzero $a$, indicating that quantum effects improve performance.
  • ...and 3 more figures