Due to the linearity of quantum mechanics, it remains a challenge to design quantum generative machine learning models that embed nonlinear activations into the evolution of the state vector. However, some of the most successful classical generative models, such as those based on neural networks, involve highly nonlinear dynamics for quality training. In this paper we explore the effect of these dynamics in quantum generative modeling by introducing a model that adds nonlinear activations via a neural network structure onto the standard Born machine framework---the quantum neuron Born machine (QNBM). To achieve this, we utilize a previously introduced quantum neuron subroutine, which is a repeat-until-success circuit with midcircuit measurements and classical control. After introducing the QNBM, we investigate how its performance depends on network size, by training a three-layer QNBM with four output neurons and various input and hidden layer sizes. We then compare our nonlinear QNBM to the linear quantum circuit Born machine (QCBM). We allocate similar time and memory resources to each model such that the only major difference is the qubit overhead required by the QNBM. With gradient-based training, we show that while both models can easily learn a trivial uniform probability distribution, on a more challenging class of distributions, the QNBM achieves an almost three-times-smaller error rate than a QCBM with a similar number of tunable parameters. We therefore provide evidence that suggests that nonlinearity is a useful resource in quantum generative models, and we put forth the QNBM as a model with good generative performance and potential for quantum advantage.
Due to the linearity of quantum mechanics, it remains a challenge to design quantum generative machine learning models that embed nonlinear activations into the evolution of the state vector. However, some of the most successful classical generative models, such as those based on neural networks, involve highly nonlinear dynamics for quality training. In this paper we explore the effect of these dynamics in quantum generative modeling by introducing a model that adds nonlinear activations via a neural network structure onto the standard Born machine framework---the quantum neuron Born machine (QNBM). To achieve this, we utilize a previously introduced quantum neuron subroutine, which is a repeat-until-success circuit with midcircuit measurements and classical control. After introducing the QNBM, we investigate how its performance depends on network size, by training a three-layer QNBM with four output neurons and various input and hidden layer sizes. We then compare our nonlinear QNBM to the linear quantum circuit Born machine (QCBM). We allocate similar time and memory resources to each model such that the only major difference is the qubit overhead required by the QNBM. With gradient-based training, we show that while both models can easily learn a trivial uniform probability distribution, on a more challenging class of distributions, the QNBM achieves an almost three-times-smaller error rate than a QCBM with a similar number of tunable parameters. We therefore provide evidence that suggests that nonlinearity is a useful resource in quantum generative models, and we put forth the QNBM as a model with good generative performance and potential for quantum advantage.
Google’s AlphaGo represents the impressive performance of deep learning and the backbone of deep learning is the workhorse of highly versatile neural networks. Each network is made up of layers of interconnected neurons and the nonlinear activation function inside each neuron is one of the key factors that account for the unprecedented achievement of deep learning. Learning how to create quantum neural networks has been a long time pursuit since 1990’s from many researchers, unfortunately without much success. The main challenge is to know how to design a nonlinear activation function inside the quantum neuron, because the laws in quantum mechanics require the operations on quantum neurons be unitary and linear. A recent discovery uses a special quantum circuit technique called repeat-until-success to make a nonlinear activation function inside a quantum neuron, which is the hard part of creating this neuron. However, the activation function used in that work is based on the periodic tangent function. Because of this periodicity, the input to this function has to be restricted to the range of [0, π/2), which is a serious constraint for its applications in real world problems. The function’s periodicity also makes its neurons not suited for being trained with gradient descent as its derivatives oscillate. The purpose of our study is to propose a new nonlinear activation function that is not periodic so it can take any real numbers and its neurons can be trained with efficient gradient descent. Our quantum neuron offers the full benefit as a quantum entity to support superposition, entanglement, interference, while also enjoys the full benefit as a classical entity to take any real numbers as its input and can be trained with gradient descent. The performance of the quantum neurons with our new activation function is analyzed on IBM’s 5Q quantum computer and IBM’s quantum simulator.
Quantum computing enables quantum neural networks (QNNs) to have great potential to surpass artificial neural networks. The powerful generalization of neural networks is attributed to nonlinear activation functions. Although various models related to QNNs have been developed, they are facing the challenge of merging the nonlinear, dissipative dynamics of neural computing into the linear, unitary quantum system. In this paper, we establish different quantum circuits to approximate nonlinear functions and then propose a generalizable framework to realize any nonlinear quantum neuron. We present two quantum neuron examples based on the proposed framework. The quantum resources required to construct a single quantum neuron are polynomial in function of the input size. Finally, both IBM Quantum Experience results and numerical simulations illustrate the effectiveness of the proposed framework.
Even the most sophisticated artificial neural networks are built by aggregating substantially identical units called neurons. A neuron receives multiple signals, internally combines them, and applies a non-linear function to the resulting weighted sum. Several attempts to generalize neurons to the quantum regime have been proposed, but all proposals collided with the difficulty of implementing non-linear activation functions, which is essential for classical neurons, due to the linear nature of quantum mechanics. Here we propose a solution to this roadblock in the form of a small quantum circuit that naturally simulates neurons with threshold activation. Our quantum circuit defines a building block, the "quantum neuron", that can reproduce a variety of classical neural network constructions while maintaining the ability to process superpositions of inputs and preserve quantum coherence and entanglement. In the construction of feedforward networks of quantum neurons, we provide numerical evidence that the network not only can learn a function when trained with superposition of inputs and the corresponding output, but that this training suffices to learn the function on all individual inputs separately. When arranged to mimic Hopfield networks, quantum neural networks exhibit properties of associative memory. Patterns are encoded using the simple Hebbian rule for the weights and we demonstrate attractor dynamics from corrupted inputs. Finally, the fact that our quantum model closely captures (traditional) neural network dynamics implies that the vast body of literature and results on neural networks becomes directly relevant in the context of quantum machine learning.
Abstract In recent proposals of quantum circuit models for generative tasks, the discussion about their performance has been limited to their ability to reproduce a known target distribution. For example, expressive model families such as quantum circuit Born machines (QCBMs) have been almost entirely evaluated on their capability to learn a given target distribution with high accuracy. While this aspect may be ideal for some tasks, it limits the scope of a generative model’s assessment to its ability to memorize data rather than generalize . As a result, there has been little understanding of a model’s generalization performance and the relation between such capability and the resource requirements, e.g. the circuit depth and the amount of training data. In this work, we leverage upon a recently proposed generalization evaluation framework to begin addressing this knowledge gap. We first investigate the QCBM’s learning process of a cardinality-constrained distribution and see an increase in generalization performance while increasing the circuit depth. In the 12-qubit example presented here, we observe that with as few as 30 % of the valid data in the training set, the QCBM exhibits the best generalization performance toward generating unseen and valid data. Lastly, we assess the QCBM’s ability to generalize not only to valid samples, but to high-quality bitstrings distributed according to an adequately re-weighted distribution. We see that the QCBM is able to effectively learn the reweighted dataset and generate unseen samples with higher quality than those in the training set. To the best of our knowledge, this is the first work in the literature that presents the QCBM’s generalization performance as an integral evaluation metric for quantum generative models, and demonstrates the QCBM’s ability to generalize to high-quality, desired novel samples.
Quantum circuit Born machines are generative models which represent the probability distribution of classical dataset as quantum pure states. Computational complexity considerations of the quantum sampling problem suggest that the quantum circuits exhibit stronger expressibility compared to classical neural networks. One can efficiently draw samples from the quantum circuits via projective measurements on qubits. However, similar to the leading implicit generative models in deep learning, such as the generative adversarial networks, the quantum circuits cannot provide the likelihood of the generated samples, which poses a challenge to the training. We devise an efficient gradient-based learning algorithm for the quantum circuit Born machine by minimizing the kerneled maximum mean discrepancy loss. We simulated generative modeling of the BARS-AND-STRIPES dataset and Gaussian mixture distributions using deep quantum circuits. Our experiments show the importance of circuit depth and the gradient-based optimization algorithm. The proposed learning algorithm is runnable on near-term quantum device and can exhibit quantum advantages for probabilistic generative modeling.
Generative quantum machine learning models are trained to deduce the probability distribution underlying a given dataset, and to produce new, synthetic samples from it. The majority of such models proposed in the literature, like the Quantum Circuit Born Machine (QCBM), fundamentally work on a binary level. Real-world data, however, is often numeric, requiring the models to translate between binary and continuous representations. We analyze how this transition influences the performance of quantum models and show that it requires the models to learn correlations that are solely an artifact of the way the data is encoded, and not related to the data itself. At the same time, structure of the original data, like continuity, can be obscured in the binary representation, hindering generalization. To mitigate these effects, we propose a strategy based on Gray-codes that can be implemented with essentially no overhead, conserves structures in the data, and avoids artificial correlations in situations in which the standard approach creates them. Considering datasets drawn from various low-dimensional probability distributions, we verify that, in most cases, QCBMs using the reflected Gray code learn faster and more accurately than those with standard binary code. This shows that, as complement to specifically tailored circuit ansätze or data pre-processing, binary encodings can be used to introduce inductive biases into generative machine learning models.