Quantum neural network: Difference between revisions

Content deleted Content added
m task, replaced: NPJ Quant. Info. → NPJ Quantum Information
Rescuing 0 sources and tagging 1 as dead.) #IABot (v2.0.9.5
(38 intermediate revisions by 18 users not shown)
Line 1:
{{short description|Quantum Mechanics in NueralNeural NetworkNetworks}}
[[File:Neural Network - basic scheme with legends.png|thumb|SampleSimple model of a feed forward neural network. For a deep learning network, increase the number of hidden layers.]]
'''Quantum neural networks''' are computational [[neuralNeural network models(machine learning)|computational neural network]] models which are based on the principles of [[quantum mechanics]]. The first ideas on quantum neural computation were published independently in 1995 by [[Subhash Kak]] and Ron Chrisley,<ref>{{cite journal |first=S. |last=Kak |title=On quantum neural computing |journal=Advances in Imaging and Electron Physics |volume=94 |pages=259–313 |year=1995 |doi=10.1016/S1076-5670(08)70147-2 |isbn=9780120147366 }}</ref><ref>{{cite book |first=R. |last=Chrisley |chapter=Quantum Learning |title=New directions in cognitive science: Proceedings of the international symposium, Saariselka, 4–9 August 1995, Lapland, Finland |editor-first=P. |editor-last=Pylkkänen |editor2-first=P. |editor2-last=Pylkkö |publisher=Finnish Association of Artificial Intelligence |___location=Helsinki |pages=77–89 |year=1995 |isbn=951-22-2645-6 }}</ref> engaging with the theory of [[quantum mind]], which posits that quantum effects play a role in cognitive function. However, typical research in quantum neural networks involves combining classical [[artificial neural network]] models (which are widely used in machine learning for the important task of pattern recognition) with the advantages of [[quantum information]] in order to develop more efficient algorithms.<ref>{{cite journal|last1=da Silva|first1=Adenilton J.|last2=Ludermir|first2=Teresa B.|last3=de Oliveira|first3=Wilson R.|year=2016|title=Quantum perceptron over a field and neural network architecture selection in a quantum computer|journal=Neural Networks|volume=76|pages=55–64|arxiv=1602.00709|bibcode=2016arXiv160200709D|doi=10.1016/j.neunet.2016.01.002|pmid=26878722|s2cid=15381014}}</ref><ref>{{cite journal|last1=Panella|first1=Massimo|last2=Martinelli|first2=Giuseppe|year=2011|title=Neural networks with quantum architecture and quantum learning|journal=[[International Journal of Circuit Theory and Applications]]|volume=39|pages=61–77|doi=10.1002/cta.619|s2cid=3791858 }}</ref><ref>{{cite journal |first1=M. |last1=Schuld |first2=I. |last2=Sinayskiy |first3=F. |last3=Petruccione |arxiv=1408.7005 |title=The quest for a Quantum Neural Network |journal=Quantum Information Processing |volume=13 |issue=11 |pages=2567–2586 |year=2014 |doi=10.1007/s11128-014-0809-8 |bibcode=2014QuIP...13.2567S |s2cid=37238534 }}</ref> One important motivation for these investigations is the difficulty to train classical neural networks, especially in [[Big data|big data applications]]. The hope is that features of [[quantum computing]] such as [[quantum parallelism]] or the effects of [[quantum interference|interference]] and [[Quantum entanglement|entanglement]] can be used as resources. Since the technological implementation of a quantum computer is still in a premature stage, such quantum neural network models are mostly theoretical proposals that await their full implementation in physical experiments.
 
Most Quantum neural networks are developed as [[Feedforward neural network|feed-forward]] networks. Similar to their classical counterparts, this structure intakes input from one layer of qubits, and passes that input onto another layer of qubits. This layer of qubits evaluates this information and passes on the output to the next layer. Eventually the path leads to the final layer of qubits.<ref name=":0">{{Cite journal|last1=Beer|first1=Kerstin|last2=Bondarenko|first2=Dmytro|last3=Farrelly|first3=Terry|last4=Osborne|first4=Tobias J.|last5=Salzmann|first5=Robert|last6=Scheiermann|first6=Daniel|last7=Wolf|first7=Ramona|date=2020-02-10|title=Training deep quantum neural networks|url= |journal=Nature Communications|language=en|volume=11|issue=1|pages=808|doi=10.1038/s41467-020-14454-2|issn=2041-1723|pmc=7010779|pmid=32041956|arxiv=1902.10445|bibcode=2020NatCo..11..808B}}</ref><ref name="WanDKGK16" /> The layers do not have to be of the same width, meaning they don't have to have the same number of qubits as the layer before or after it. This structure is trained on which path to take similar to classical [[artificial neural network]]s. This is discussed in a lower section. Quantum neural networks refer to three different categories: Quantum computer with classical data, classical computer with quantum data, and quantum computer with quantum data.<ref name=":0" />
Line 11:
=== Quantum perceptrons ===
 
A lot of proposals attempt to find a quantum equivalent for the [[perceptron]] unit from which neural nets are constructed. A problem is that nonlinear activation functions do not immediately correspond to the mathematical structure of quantum theory, since a quantum evolution is described by linear operations and leads to probabilistic observation. Ideas to imitate the perceptron activation function with a quantum mechanical formalism reach from special measurements <ref>{{cite journal |first=M. |last=Perus |title=Neural Networks as a basis for quantum associative memory |journal=Neural Network World |volume=10 |issue=6 |pages=1001 |year=2000 |citeseerx=10.1.1.106.4583 |url=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106.4583&rep=rep1&type=pdf }}</ref><ref>{{cite journal |first1=M. |last1=Zak |first2=C. P. |last2=Williams |title=Quantum Neural Nets |journal=International Journal of Theoretical Physics |volume=37 |issue=2 |pages=651–684 |year=1998 |doi=10.1023/A:1026656110699 |s2cid=55783801 }}</ref> to postulating non-linear quantum operators (a mathematical framework that is disputed).<ref>{{Cite journal | doi=10.1006/jcss.2001.1769| title=Quantum Neural Networks| journal=Journal of Computer and System Sciences| volume=63| issue=3| pages=355–383| year=2001| last1=Gupta| first1=Sanjay| last2=Zia| first2=R.K.P.| arxiv=quant-ph/0201144| s2cid=206569020}}</ref><ref>{{cite journalweb |first1=J. |last1=Faber |first2=G. A. |last2=Giraldi |title=Quantum Models for Artificial Neural Network |year=2002 |url=http://arquivoswebvirtual01.lncc.br/pdfs~giraldi/TechReport/QNN-Review.pdf.gz }}{{Dead link|date=August 2025 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> A direct implementation of the activation function using the [[quantum circuit|circuit-based model of quantum computation]] has recently been proposed by Schuld, Sinayskiy and Petruccione based on the [[quantum phase estimation algorithm]].<ref>{{cite paperjournal |first1=M. |last1=Schuld |first2=I. |last2=Sinayskiy |first3=F. |last3=Petruccione |title=Simulating a perceptron on a quantum computer |journal=Physics Letters A |arxiv=1412.3635 |year=2014 |volume=379 |issue=7 |pages=660–663 |doi=10.1016/j.physleta.2014.11.061 |s2cid=14288234 }}</ref>
 
=== Quantum networks ===
 
At a larger scale, researchers have attempted to generalize neural networks to the quantum setting. One way of constructing a quantum neuron is to first generalise classical neurons and then generalising them further to make unitary gates. Interactions between neurons can be controlled quantumly, with [[unitary operator|unitary]] [[quantum logic gate|gates]], or classically, via [[measurement in quantum mechanics|measurement]] of the network states. This high-level theoretical technique can be applied broadly, by taking different types of networks and different implementations of quantum neurons, such as [[Integrated quantum photonics|photonically]] implemented neurons<ref name="WanDKGK16">{{cite journal|last1=Wan|first1=Kwok-Ho|last2=Dahlsten|first2=Oscar|last3=Kristjansson|first3=Hler|last4=Gardner|first4=Robert|last5=Kim|first5=Myungshik|year=2017|title=Quantum generalisation of feedforward neural networks|journal=NPJnpj Quantum Information|volume=3|issue=1 |pages=36|arxiv=1612.01045|bibcode=2017npjQI...3...36W|doi=10.1038/s41534-017-0032-4|s2cid=51685660}}</ref><ref>{{cite journal |first1=A. |last1=Narayanan |first2=T. |last2=Menneer |title=Quantum artificial neural network architectures and components |journal=Information Sciences |volume=128 |issue= 3–4|pages=231–255 |year=2000 |doi=10.1016/S0020-0255(00)00055-4 |s2cid=10901562 }}</ref> and [[quantum reservoir processor]] (quantum version of [[reservoir computing]]).<ref>{{cite journal |last1=Ghosh |first1=S. |last2=Opala |first2=A. |last3=Matuszewski |first3=M. |last4=Paterek |first4=P. |last5=Liew |first5=T. C. H. |doi=10.1038/s41534-019-0149-8 |title=Quantum reservoir processing |journal=NPJnpj Quantum Information |volume=5 |pages=35 |year=2019 |issue=1 |arxiv=1811.10335 |bibcode=2019npjQI...5...35G |s2cid=119197635 }}</ref> Most learning algorithms follow the classical model of training an artificial neural network to learn the input-output function of a given [[training set]] and use classical feedback loops to update parameters of the quantum system until they converge to an optimal configuration. Learning as a parameter optimisation problem has also been approached by adiabatic models of quantum computing.<ref>{{cite journalarXiv |first1=H. |last1=Neven |display-authors=1 |first2=Vasil S. |last2=Denchev |first3=Geordie |last3=Rose |first4=William G. |last4=Macready |arxiveprint=0811.0416 |title=Training a Binary Classifier with the Quantum Adiabatic Algorithm |year=2008 |class=quant-ph }}</ref>
 
Quantum neural networks can be applied to algorithmic design: given [[qubits]] with tunable mutual interactions, one can attempt to learn interactions following the classical [[backpropagation]] rule from a [[training set]] of desired input-output relations, taken to be the desired output algorithm's behavior.<ref>{{cite journal |first1=J. |last1=Bang |display-authors=1 |first2=Junghee |last2=Ryu |first3=Seokwon |last3=Yoo |first4=Marcin |last4=Pawłowski |first5=Jinhyoung |last5=Lee |doi=10.1088/1367-2630/16/7/073017 |title=A strategy for quantum algorithm design assisted by machine learning |journal=New Journal of Physics |volume=16 |issue= 7|pages=073017 |year=2014 |arxiv=1301.1132 |bibcode=2014NJPh...16g3017B |s2cid=55377982 }}</ref><ref>{{cite journal |first1=E. C. |last1=Behrman |first2=J. E. |last2=Steck |first3=P. |last3=Kumar |first4=K. A. |last4=Walsh |arxiv=0808.1558 |title=Quantum Algorithm design using dynamic learning |journal=Quantum Information and Computation |volume=8 |issue=1–2 |pages=12–29 |year=2008 |doi=10.26421/QIC8.1-2-2 |s2cid=18587557 }}</ref> The quantum network thus ‘learns’ an algorithm.
 
=== Quantum associative memory ===
 
The first quantum associative memory algorithm was introduced by Dan Ventura and Tony Martinez in 1999.<ref>{{cite journalbook |first1=D. |last1=Ventura |first2=T. |last2=Martinez |title=Artificial Neural Nets and Genetic Algorithms |chapter=A Quantum Associative Memory Based on Grover's Algorithm |chapter-url=https://pdfs.semanticscholar.org/d46f/e04b57b75a7f9c57f25d03d1c56b480ab755.pdf |archive-url=https://web.archive.org/web/20170911115617/https://pdfs.semanticscholar.org/d46f/e04b57b75a7f9c57f25d03d1c56b480ab755.pdf |url-status=dead |archive-date=2017-09-11 |title=A quantum associative memory based on Grover's algorithm |journal=Proceedings of the International Conference on Artificial Neural Networks and Genetics Algorithms |pages=22–27 |year=1999 |doi=10.1007/978-3-7091-6384-9_5 |isbn=978-3-211-83364-3 |s2cid=3258510 }}</ref> The authors do not attempt to translate the structure of artificial neural network models into quantum theory, but propose an algorithm for a [[quantum circuit|circuit-based quantum computer]] that simulates [[associative memory (psychology)|associative memory]]. The memory states (in [[Hopfield neural network]]s saved in the weights of the neural connections) are written into a superposition, and a [[Grover search algorithm|Grover-like quantum search algorithm]] retrieves the memory state closest to a given input. AnAs advantagesuch, liesthis inis thenot exponentiala storagefully capacity ofcontent-addressable memory states, howeversince theonly questionincomplete remains whether the model has significance regarding the initial purpose of Hopfield models as a demonstration of how simplified artificial neural networkspatterns can simulate features of thebe brainretrieved.
 
The first truly content-addressable quantum memory, which can retrieve patterns also from corrupted inputs, was proposed by Carlo A. Trugenberger.<ref>{{Cite journal |last=Trugenberger |first=C. A. |date=2001-07-18 |title=Probabilistic Quantum Memories |url=http://dx.doi.org/10.1103/physrevlett.87.067901 |journal=Physical Review Letters |volume=87 |issue=6 |article-number=067901 |doi=10.1103/physrevlett.87.067901 |pmid=11497863 |issn=0031-9007|arxiv=quant-ph/0012100 |bibcode=2001PhRvL..87f7901T |s2cid=23325931 }}</ref><ref name=":2">{{Cite journal |last=Trugenberger |first=Carlo A. |date=2002 |title=Quantum Pattern Recognition |journal=Quantum Information Processing |volume=1 |issue=6 |pages=471–493|doi=10.1023/A:1024022632303 |arxiv=quant-ph/0210176 |bibcode=2002QuIP....1..471T |s2cid=1928001 }}</ref><ref>{{Cite journal |last=Trugenberger |first=C. A. |date=2002-12-19 |title=Phase Transitions in Quantum Pattern Recognition |url=http://dx.doi.org/10.1103/physrevlett.89.277903 |journal=Physical Review Letters |volume=89 |issue=27 |article-number=277903 |doi=10.1103/physrevlett.89.277903 |pmid=12513243 |issn=0031-9007|arxiv=quant-ph/0204115 |bibcode=2002PhRvL..89A7903T |s2cid=33065081 }}</ref> Both memories can store an exponential (in terms of n qubits) number of patterns but can be used only once due to the no-cloning theorem and their destruction upon measurement.
 
Trugenberger,<ref name=":2" /> however, has shown that his probabilistic model of quantum associative memory can be efficiently implemented and re-used multiples times for any polynomial number of stored patterns, a large advantage with respect to classical associative memories.
 
=== Classical neural networks inspired by quantum theory ===
Line 28 ⟶ 32:
 
== Training ==
Quantum Neural Networks can be theoretically trained similarly to training classical/[[artificial neural network]]snetworks. A key difference lies in communication between the layers of a neural networks. For classical neural networks, at the end of a given operation, the current [[perceptron]] copies its output to the next layer of perceptron(s) in the network. However, in a quantum neural network, where each perceptron is a qubit, this would violate the [[no-cloning theorem]].<ref name=":0" /><ref>{{Cite book|last1=Nielsen|first1=Michael A|url=https://www.worldcat.org/title/quantum-computation-and-quantum-information/oclc/665137861|title=Quantum computation and quantum information|last2=Chuang|first2=Isaac L|date=2010|publisher=Cambridge University Press|isbn=978-1-107-00217-3|___location=Cambridge; New York|language=en|oclc=665137861}}</ref> A proposed generalized solution to this is to replace the classical [[Fan-out (software)|fan-out]] method with an arbitrary [[Unitary matrix|unitary]] that spreads out, but does not copy, the output of one qubit to the next layer of qubits. Using this fan-out Unitary (<math>U_f</math>) with a dummy state qubit in a known state (Ex. <math>|0\rangle</math> in the [[Qubit|computational basis]]), also known as an [[Ancilla bit]], the information from the qubit can be transferred to the next layer of qubits.<ref name="WanDKGK16" /> This process adheres to the quantum operation requirement of [[Reversible computing|reversibility]].<ref name="WanDKGK16" /><ref name=":1">{{Cite journal|last=Feynman|first=Richard P.|date=1986-06-01|title=Quantum mechanical computers|url=https://doi.org/10.1007/BF01886518|journal=Foundations of Physics|language=en|volume=16|issue=6|pages=507–531|doi=10.1007/BF01886518|bibcode=1986FoPh...16..507F|s2cid=122076550|issn=1572-9516|url-access=subscription}}</ref>
 
Using this quantum feed-forward network, deep neural networks can be executed and trained efficiently. A deep neural network is essentially a network with many hidden-layers, as seen in the sample model neural network above. Since the Quantum neural network being discussed utilizesuses fan-out Unitary operators, and each operator only acts on its respective input, only two layers are used at any given time.<ref name=":0" /> In other words, no Unitary operator is acting on the entire network at any given time, meaning the number of qubits required for a given step depends on the number of inputs in a given layer. Since Quantum Computers are notorious for their ability to run multiple iterations in a short period of time, the efficiency of a quantum neural network is solely dependent on the number of qubits in any given layer, and not on the depth of the network.<ref name=":1" />
 
=== Cost functions ===
To determine the effectiveness of a neural network, a cost function is used, which essentially measures the proximity of the network’snetwork's output to the expected or desired output. In a Classical Neural Network, the weights (<math>w </math>) and biases (<math>b </math>) at each step determine the outcome of the cost function <math>C(w, b)</math>.<ref name=":0" /> When training a Classical Neural network, the weights and biases are adjusted after each iteration, and given equation 1 below, where <math>y(x)</math> is the desired output and <math>a^\text{out}(x)</math> is the actual output, the cost function is optimized when <math>C(w, b)</math>= 0. For a quantum neural network, the cost function is determined by measuring the fidelity of the outcome state (<math>\rho^\text{out}</math>) with the desired outcome state (<math>\phi^\text{out}</math>), seen in Equation 2 below. In this case, the Unitary operators are adjusted after each iteration, and the cost function is optimized when C = 1.<ref name=":0" />
Equation 1 <math>C(w,b)={1 \over N}\sum_{x}{||y(x)-a^\text{out}(x)|| \over 2}</math>
 
Equation 2 <math>C ={1 \over N}\sum_{x}^N{\langle\phi^\text{out}|\rho^\text{out}|\phi^\text{out}\rangle}</math>
 
=== Barren plateaus ===
[[File:Barren_plateaus_of_VQA.webp|alt=The Barren Plateau problem becomes increasingly serious as the VQA expands|thumb|'''Barren plateaus of VQA'''<ref>{{Cite journal |last1=Wang |first1=Samson |last2=Fontana |first2=Enrico |last3=Cerezo |first3=M. |last4=Sharma |first4=Kunal |last5=Sone |first5=Akira |last6=Cincio |first6=Lukasz |last7=Coles |first7=Patrick J. |date=2021-11-29 |title=Noise-induced barren plateaus in variational quantum algorithms |journal=Nature Communications |language=en |volume=12 |issue=1 |page=6961 |arxiv=2007.14384 |bibcode=2021NatCo..12.6961W |doi=10.1038/s41467-021-27045-6 |issn=2041-1723 |pmc=8630047 |pmid=34845216}}</ref> Figure shows the Barren Plateau problem becomes increasingly serious as the VQA expands.]]
Gradient descent is widely used and successful in classical algorithms. However, although the simplified structure is very similar to neural networks such as CNNs, QNNs perform much worse.
 
Since the quantum space exponentially expands as the q-bit grows, the observations will concentrate around the mean value at an exponential rate, where also have exponentially small gradients.<ref name=":3">{{Cite journal |last1=McClean |first1=Jarrod R. |last2=Boixo |first2=Sergio |last3=Smelyanskiy |first3=Vadim N. |last4=Babbush |first4=Ryan |last5=Neven |first5=Hartmut |date=2018-11-16 |title=Barren plateaus in quantum neural network training landscapes |journal=Nature Communications |language=en |volume=9 |issue=1 |page=4812 |arxiv=1803.11173 |bibcode=2018NatCo...9.4812M |doi=10.1038/s41467-018-07090-4 |issn=2041-1723 |pmc=6240101 |pmid=30446662}}</ref>
 
This situation is known as Barren Plateaus, because most of the initial parameters are trapped on a "plateau" of almost zero gradient, which approximates random wandering<ref name=":3" /> rather than gradient descent. This makes the model untrainable.
 
In fact, not only QNN, but almost all deeper VQA algorithms have this problem. In the present [[Noisy intermediate-scale quantum era|NISQ era]], this is one of the problems that have to be solved if more applications are to be made of the various VQA algorithms, including QNN.
 
==See also==
Line 59 ⟶ 73:
 
[[Category:Artificial neural networks]]
[[Category:Neural circuits]]
[[Category:Quantum information science]]
[[Category:Quantum mechanics]]
[[Category:Quantum programming]]