Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:1904.12697 · Physical Review A

Building quantum neural networks based on a swap test

Jian Zhao, Yuanhang Zhang, Changpeng Shao, Yu-Chun Wu, Guang‐Can Guo, Guo‐Ping Guo

Published Jul 23, 2019• 59 citations
arXivHTMLPDF

Abstract

An artificial neural network, consisting of many neurons in different layers, is an important method to simulate the human brain. Usually, one neuron has two operations: one is linear, the other is nonlinear. The linear operation is the inner product and the nonlinear operation is represented by an activation function. In this work, we introduce a kind of quantum neuron whose inputs and outputs are quantum states. The inner product and activation operator of the quantum neurons can be realized by quantum circuits. Based on the quantum neuron, we propose a model of a quantum neural network in which the weights between neurons are all quantum states. We also construct a quantum circuit to realize this quantum neural network model. A learning algorithm is proposed meanwhile. We show the validity of the learning algorithm theoretically and demonstrate the potential of the quantum neural network numerically.

DOI
10.1103/physreva.100.012334

Related papers

Quantum Neural Network Based on Swap Test and Phase Estimation

LIU Guangshuo LI Panchi

To address the integration of quantum computing and neural computing, this paper investigates a quantum neural network (QNN) model and its algorithm based on swap test and phase estimation. Firstly, a quantum circuit for swap tests with multi-qubit control is proposed, and a quantum neuron model is developed by combining this with phase estimation. The model uses quantum bits for inputs, weights, and outputs, where the phase of the weight qubits serves as the model parameters. Based on this quantum neuron, a QNN model is constructed, with measurements performed at the network output to obtain real-valued outputs. Various quantum circuits associated with the network model are designed in detail, and the input-output relationships for each network layer are derived according to quantum computing theory. Additionally, a method for adjusting network parameters based on the gradient descent algorithm is thoroughly developed. Finally, simulations are conducted on a classical computer using planar point set recognition and handwritten digit binary classification. Although these simulations do not verify the parallelism of quantum computing, they do validate the model??s execution effectiveness. The results show that the proposed model has a clear advantage in classification performance compared with a classical backpropagation (BP) neural network with the same parameter scale. This demonstrates that constructing QNN models based on multi-qubit swap tests and phase estimation is both effective and feasible, offering a new perspective for future research on quantum neural networks.

•Sep 1, 2025•0 citations

Quantum Neuron: an elementary building block for machine learning on quantum computers

Yudong Cao, Gian Giacomo Guerreschi, Alán Aspuru‐Guzik

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.

arXiv:1711.11240•Nov 30, 2017•113 citations

Nonlinear quantum neuron: A fundamental building block for quantum neural networks

Shilu Yan, Hongsheng Qi, Wei Cui

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.

arXiv:2011.03429•Physical Review A•Nov 25, 2020•46 citations

Learning Algorithm and Application of Quantum Neural Networks with Quantum Weights

Dianbao Mu, Zunyou Guan, Hong Zhang

A novel neural networks model with quantum weights is present.Firstly, based on the information processing modes of biology neuron and quantum computing theory, a quantum neuron model is presented, which is composed of weighting, aggregating, activating, and inspiriting.Secondly the quantum neural networks model based on quantum neuron is constructed in which the input and the output are real vectors; the linked weight and the activation value are qubits.On the basic of the gradient descent algorithm, a learning algorithm of this model is proposed.It is shown that this algorithm is super-linearly convergent under certain conditions and can increase the probability of getting the global optimal solution.Finally, the availability of the model is illustrated in both convergence speed and convergence rate by two application examples of pattern recognition and function approximation.

International Journal of Computer Theory and Engineering•Jan 1, 2013•27 citations

Implementing Any Nonlinear Quantum Neuron

Fernando M. de Paula Neto, Teresa B. Ludermir, Wilson Rosa de Oliveira +1 more

The ability of artificial neural networks (ANNs) to adapt to input data and perform generalizations is intimately connected to the use of nonlinear activation and propagation functions. Quantum versions of ANN have been proposed to take advantage of the possible supremacy of quantum over classical computing. To date, all proposals faced the difficulty of implementing nonlinear activation functions since quantum operators are linear. This brief presents an architecture to simulate the computation of an arbitrary nonlinear function as a quantum circuit. This computation is performed on the phase of an adequately designed quantum state, and quantum phase estimation recovers the result, given a fixed precision, in a circuit with linear complexity in function of ANN input size.

IEEE Transactions on Neural Networks and Learning Systems•Sep 25, 2019•31 citations

Design of quantum neuron model for quantum neural networks

Yao Zhang, Qiang Ni

Quantum neural network is a network which is to be composed of several quantum neurons, which is required to have a certain topological structure. In this article, we propose a new method to encode classical input data into quantum states to represent a quantum neuron, which has a low-complexity form and can be easily utilized to construct a quantum neural network. The numerical simulation of two classification tasks with the proposed quantum neuron model is conducted to show its validity.

Quantum Engineering•Aug 25, 2021•10 citations
An artificial neural network, consisting of many neurons in different layers, is an important method to simulate the human brain. Usually, one neuron has two operations: one is linear, the other is nonlinear. The linear operation is the inner product and the nonlinear operation is represented by an activation function. In this work, we introduce a kind of quantum neuron whose inputs and outputs are quantum states. The inner product and activation operator of the quantum neurons can be realized by quantum circuits. Based on the quantum neuron, we propose a model of a quantum neural network in which the weights between neurons are all quantum states. We also construct a quantum circuit to realize this quantum neural network model. A learning algorithm is proposed meanwhile. We show the validity of the learning algorithm theoretically and demonstrate the potential of the quantum neural network numerically.
To address the integration of quantum computing and neural computing, this paper investigates a quantum neural network (QNN) model and its algorithm based on swap test and phase estimation. Firstly, a quantum circuit for swap tests with multi-qubit control is proposed, and a quantum neuron model is developed by combining this with phase estimation. The model uses quantum bits for inputs, weights, and outputs, where the phase of the weight qubits serves as the model parameters. Based on this quantum neuron, a QNN model is constructed, with measurements performed at the network output to obtain real-valued outputs. Various quantum circuits associated with the network model are designed in detail, and the input-output relationships for each network layer are derived according to quantum computing theory. Additionally, a method for adjusting network parameters based on the gradient descent algorithm is thoroughly developed. Finally, simulations are conducted on a classical computer using planar point set recognition and handwritten digit binary classification. Although these simulations do not verify the parallelism of quantum computing, they do validate the model??s execution effectiveness. The results show that the proposed model has a clear advantage in classification performance compared with a classical backpropagation (BP) neural network with the same parameter scale. This demonstrates that constructing QNN models based on multi-qubit swap tests and phase estimation is both effective and feasible, offering a new perspective for future research on quantum neural networks.
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.
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.
A novel neural networks model with quantum weights is present.Firstly, based on the information processing modes of biology neuron and quantum computing theory, a quantum neuron model is presented, which is composed of weighting, aggregating, activating, and inspiriting.Secondly the quantum neural networks model based on quantum neuron is constructed in which the input and the output are real vectors; the linked weight and the activation value are qubits.On the basic of the gradient descent algorithm, a learning algorithm of this model is proposed.It is shown that this algorithm is super-linearly convergent under certain conditions and can increase the probability of getting the global optimal solution.Finally, the availability of the model is illustrated in both convergence speed and convergence rate by two application examples of pattern recognition and function approximation.
The ability of artificial neural networks (ANNs) to adapt to input data and perform generalizations is intimately connected to the use of nonlinear activation and propagation functions. Quantum versions of ANN have been proposed to take advantage of the possible supremacy of quantum over classical computing. To date, all proposals faced the difficulty of implementing nonlinear activation functions since quantum operators are linear. This brief presents an architecture to simulate the computation of an arbitrary nonlinear function as a quantum circuit. This computation is performed on the phase of an adequately designed quantum state, and quantum phase estimation recovers the result, given a fixed precision, in a circuit with linear complexity in function of ANN input size.