# Review Quantum Circuit Synthesis for [PERSON]'s Algorithm Oracle
## 4 State of the Art
### Neural Network Methodologies  
Classical neural networks have also been explored for generating quantum circuits by using these networks as classical encoding and decoding systems of the result obtained by a quantum circuit, taking care of the preprocessing and post-processing process in a hybrid algorithm [13]. This implies that starting from a quantum algorithm such as [PERSON]'s, a set of neural networks with a limited number of layers can be used to define or generate parts of the quantum circuit, such as the oracle, as well as being able to perform error mitigation through an implementation of a classical neural network at the output of the quantum circuit [33]. [PERSON] has a proposition for generating quantum oracles based on neural networks. He starts from a unitary matrix that defines the oracle to be applied and uses two sets of neural networks to transform the matrix into trackable circuits [29]. The first step consists of taking a matrix, \(U\), and decomposing it into simpler matrices, as shown in Equation (17). This step is conducted with a GRU network where each input represents a row in the matrix, and the output is the rows of the simplified matrix. \[U\approx U_{1}U_{2}\dots U_{j}\dots U_{N} \tag{17}\]  
The second network is a RELU network with two layers of 2000 neurons. These layers take as input the values of one of the simplified matrices, \(U_{j}\), and obtain a list of coefficients, \(c\), representing the exponential operations that construct the matrix in consideration, as is shown in Equation (18). These coefficients determine the lie algebra that can be easily translated to quantum gates [29]. \[U_{j}\approx\exp\left(c_{1}^{j}\tau_{1}\right)\dots\exp\left(c_{m}^{j}\tau_{m}\right) \tag{18}\]  
In this case, [PERSON] measures the viability of this approach with an implementation in Python and TensorFlow (a neural network library) using the Euclidean distance between the expected and obtained results. He took five thousand pairs of training sets, of which five hundred were used as validation. The reported error of this approach was 0.16. The limitations of this approach are that the problem of generating the oracle is only taken into consideration from the matrix to quantum translation, and the scalability of this network is not great, which is why it was only evaluated for three qubits. Another approach to the oracle construction of neural networks was completed by [PERSON] [13]. He proposed a way of decomposing a unitary operation in a set of quantum gates from a universal set. He starts with a circuit, as is shown in Figure 5, and defines the input of the neural network as the desired inputs and outputs of the circuit because the neural network is going to try to obtain the gates that receive output \(O_{i}\) based on the inputs \(A\) and \(B\). Figure 5: Quantum circuit representation of bell state for a neural network. Then, they define a set of gates that will operate on the circuit, like the ones shown in Equation (19). \[CV(0,3),CV(1,3),CX(0,2),CX(1,2) \tag{19}\]  
A probability vector was created using the operation set as a starting point, as shown in Equation (20). The idea of the neural network was to assign a probability to the most relevant gate for generating the circuit. That way, we can reverse the operation and obtain the desired input. \[P=(CV(0,3),CV(1,3),CX(0,2),CX(1,2)) \tag{20}\]  
This approach was simulated using ten complex neural network layers and two fully connected layers. The implementation was evaluated on 1.13 million input-output pairs using batch sizes of 64 and epochs of 40. Finally, the number of two-qubit gates used in the quantum circuit measured the resulting quantum circuits. The results from this approach give better performance in terms of the quantum gates used than other work conducted using a random approach to circuit search. It is important to consider that this approach is limited to the desired input and output pairs, but it gives better performance than the approach to \(U\) matrix generation given by [PERSON].