# Quantum Circuit Synthesis Using Fuzzy-Logic-Assisted Genetic Algorithms
## 6 Discussion  
Our experimental investigations demonstrated that the GA-based compilers are able to produce competitive results for 2 qubits, when compared with industry standard compilers such as BQSkit and Qiskit. However, the investigation was inconclusive for 3 qubits since the compilers were unable to reach error thresholds within the provided time limit. As stated before, going from 2 qubits to 3 qubits dramatically increases the search space. For example, using the five basis gates used in this work, there are \(4^{2}+2=18\) possible circuits of depth 1 for 2 qubits. By contrast, there are \(4^{3}+6=70\) circuits of depth 1 for 3 qubits. As can be observed, the solution space grows exponentially (roughly about \(O(n_{\text{basis gates}}^{\text{lograms}})\) in our case). This effect is made more challenging as the depth of the circuit increases. Thus, it becomes harder for the GA to search this increased solution space. In addition, 3-qubit circuits are likely to have more parameterized gates, resulting in the numerical optimizer taking longer to converge. All of these factors contribute to the extended runtimes of the GAs for 3 qubits in its current form. Although the provided time limit was insufficient, the experimental data shows that the desired metrics do tend downwards over the generations. It therefore prompts the question of whether increasing the time limit, and/or using a higher population would counteract the increase in search space going from 2 to 3 qubits, and requires further investigation. It also stands to reason that with further performance optimizations or more computational resources, the GA-based compilers might achieve the desired error thresholds within shorter time limits and is also worth studying. Using runtime parameter adaptations appear to provide noticeable benefits for 2 qubit inputs, as seen in the previous section, in terms of number of new solutions discovered in the Pareto front and convergence speed. However, due to the issues discussed above, their effect on 3-qubit circuits is not apparent. Thus, while further experimentation is required for 3 qubits and beyond, the results for 2-qubit circuits show promise. Setting the compilation performance aside, the GA-based compilers proposed have additional benefits. Firstly, the GA only requires a unitary matrix as an input, and its performance does not depend on individual circuit structures. Moreover, the multi-objective optimization feature of NSGA enables us to add more compilation objectives easily, at the cost of more computation resources. This can be used to address additional compilation goals such as differentiating gates based on their error rates and reducing the number of high error gates, or weigh connections based on the likelihood of error and reduce the number of CNOTs on such error prone connections. Finally, the results show that the GAs appear to continuously make progress towards better fitnesses (i.e., lower values for metrics), even if slowly. As for future work, given the versatility of GAs, we believe there is a lot of room for improvement in terms of how the genetic operators of crossover, mutation and non-dominated sorting work. For example, the number of offspring produced from crossover was set at 2, and it is worth investigating if allowing more or less offspring from each parent pair would improve the GA convergence. It would also be interesting to study how the GA responds with a tournament size other than 2. For example, we could investigate if a dynamically adjusted tournament size, to control the selection pressure at runtime, would help with GA convergence. The tournament size and number of offspring together could also be used to control the trade-off between diversity of population and exploitation of solutions. For example, a higher tournament size coupled with higher number of offspring per parent pair would promote only high fitness individuals.