Patent WO-2023126866-A1 (WO)
Inventor: PRATI ENRICO
IPC: G06N3/048
Filed: 2022-12-29
Abstract: A computer implemented method for performing quantum calculations in a quantum neural network is described. The neural network considered in this method comprises at least one input layer comprising a first number N in  of input layer neurons adapted to receive respective input values x i  belonging to an input vector x. Each input layer neuron is configured to multiply the respective input value x i  by a respective weight value w i  belonging to a weight vector w. The aforesaid neural network further comprises at least one calculation neuron, operatively connected to the aforesaid input layer, and configured to provide a computation result y=f(z) calculated by applying an activation function f to an argument z. Such an argument z is a scalar number calculated by the calculation neuron as the sum of the products of the input values x i  by the respective weights w i  plus a bias value b. The method comprises the following steps: - encoding, by a first quantum process, the input values x i  of the input vector x into probability amplitudes of a n-qubits initial first quantum state, stored in an input register q, through a n-to-2 n  input encoding model, wherein the number of qubits n of the initial first quantum state is such that 2 n  is greater or equal to a second number equal to N in +3, where N in  corresponds to the input vector dimension; - applying a quantum operator, depending on the weight values wi of the weight vector w and the bias b, to said input register q to calculate said argument z as the addition of the bias b and the inner product of the input vector x and the weight vector w; - by the application of said quantum operator, producing as result a second quantum state, of the input register q, which has the value 1 and the value of the argument (z) encoded; - processing, by a second quantum process, said second quantum state of the input register (q), to calculate a value of each of a number of powers (d-1) of said argument (z), from the second order power (z 2 ) up to the d-th order power (z d ), using an additional quantum buffer register (a); - by the application of said second quantum process, producing as result a third (n+d)-qubits quantum state, of the input register (q) and the additional quantum buffer register (a), which has said values (1, z, z 2 ,..., z d ) encoded; - processing, by a third quantum process, said third quantum state to calculate said computation result y as a polynomial series expansion of the activation function f, through quantum states rotations, with the rotation angles depending on coefficients of said activation function polynomial series expansion; - encoding said calculated computation result y into a fourth quantum state, which is suitable either to be measured and detected or to be provided, as a not yet measured quantum state, to a further neuron of the neural network. A computer implemented method for implementing a quantum neural network is also described. A quantum computation system for performing quantum calculations in a quantum neural network and a quantum computation system for implementing a quantum neural network are also described.