Full text
University of Minho School of Engineering Márcio Eduardo Lima Mano ADAPT-VQC Adaptive Variational Quantum Classifier october 2023
University of Minho School of Engineering Márcio Eduardo Lima Mano ADAPT-VQC Adaptive Variational Quantum Classifier Masters Dissertation Master’s in Physics Engineering Dissertation supervised by Luís Paulo Santos André Sequeira october 2023
Copyright and Terms of Use for Third Party Work This dissertation reports on academic work that can be used by third parties as long as the internationally accepted standards and good practices are respected concerning copyright and related rights. This work can thereafter be used under the terms established in the license below. Readers needing authorization conditions not provided for in the indicated licensing should contact the author through the RepositóriUM of the University of Minho. License granted to users of this work: CC BY https://creativecommons.org/licenses/by/4.0/ i
Acknowledgements I would like to extend my heartfelt appreciation to all those who played a crucial role in the completion of this work and the attainment of my master’s degree. First and foremost, I want to express my deep gratitude to my supervisors. They not only introduced me to the captivating realm of quantum machine learning but also proposed an engaging and thoughtprovoking theme for this dissertation. Their unwavering support, encouragement, and guidance throughout the entire process were invaluable. I would also like to extend my heartfelt thanks to my parents, brother, and the rest of my family. Over the past five years, they have been unwavering pillars of strength, providing constant support and comfort during the most challenging moments. Their presence and understanding mean the world to me, and I am profoundly grateful for their love and encouragement. I want to express my sincere appreciation to my girlfriend for being by my side and providing unwavering support over the past years. Your companionship and encouragement have been a constant source of strength, and I am truly thankful for your presence in my life. I’d like to extend my gratitude to all my friends, both old and new, who have accompanied me on this journey. Your friendship has been a source of joy and support, and the good times we’ve shared both inside and outside of classes have enriched my life. Thank you for being a part of my experience and for the cherished moments we’ve created together. This work is dedicated to each one of you, and I am immensely grateful for the privilege of sharing this journey with all of you. Your contributions, support, and presence have made this accomplishment all the more meaningful. Thank you for being an integral part of my journey. ii
Statement of Integrity I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. University of Minho, Braga, october 2023 Márcio Eduardo Lima Mano iii
Abstract This dissertation explores the potential of Quantum Computing, particularly in the context of Variational Quantum Algorithms (VQA), like the Variational Quantum Classifier (VQC). It focuses on overcoming challenges such as noise in quantum circuits and optimization complexities. The research introduces adaptive strategies for VQC, enabling dynamic adjustments to circuit depth and expressibility during training. This flexibility aims to improve classification accuracy on datasets. The dissertation starts with a literature review of VQA algorithms, especially adaptive strategies, drawing insights from various domains, including chemistry. Next, it details the proposed adaptive approaches for VQC and presents rigorous experiments to evaluate their performance across diverse datasets, comparing them to the standard VQC. The results show promise with improved accuracy and reduced circuit depth. However, it’s important to note that this work primarily serves as an introduction to the concept of adaptive approaches for classification, focusing on enhancing VQC within its existing context. In summary, this dissertation provides insights into enhancing VQC performance and contributes incrementally to quantum computation in the realm of classification. Adaptive VQC addresses challenges posed by noisy quantum devices and offers opportunities for further research in quantum classification algorithms. Keywords QML, VQC, VQA, Depth, Ansatz iv
Resumo Esta dissertação explora o potencial da Computação Quântica, particularmente no contexto de Algoritmos Quânticos Variacionais (VQA), como o Classificador Quântico Variacional (VQC). Ele se concentra na superação de desafios como ruído em circuitos quânticos e complexidades de otimização. Esta dissertação introduz estratégias adaptativas para VQC, permitindo ajustes dinâmicos na profundidade e expressibilidade do circuito durante o treino. Esta flexibilidade visa melhorar a precisão da classificação de um conjunto de dados. A dissertação começa com uma revisão da literatura sobre algoritmos VQA, especialmente estratégias adaptativas, extraindo insights de vários domínios, incluindo da química. A seguir, detalha as abordagens adaptativas propostas para VQC e apresenta experimentos rigorosos para avaliar seu desempenho em diversos conjuntos de dados, comparando-os com o VQC padrão. Os resultados são promissores pois monstrarm uma maior precisão e profundidade de circuito reduzida. No entanto, é importante notar que este trabalho serve principalmente como uma introdução ao conceito de abordagens adaptativas para classificação, focando no aprimoramento do VQC dentro do seu contexto existente. Em resumo, esta dissertação fornece ideos sobre como melhorar o desempenho do VQC e contribui de forma incremental para a computação quântica no domínio da classificação. O VQC adaptativo aborda desafios colocados por dispositivos quânticos ruidosos e oferece oportunidades para pesquisas adicionais em algoritmos de classificação quântica. Palavras-chave QML, VQC, VQA, Profundidade, Ansatz v
Contents 1 Introduction 1 1.1 Context ........................................ 1 1.2 Motivation ...................................... 3 1.3 Contribution ..................................... 4 1.4 Summary ....................................... 5 2 Variational Quantum Algorithms 6 2.1 Context ........................................ 6 2.2 Standard VQA’s .................................... 7 2.2.1 VQE ..................................... 7 2.2.2 QAOA .................................... 8 2.2.3 VQC ..................................... 8 2.3 Adaptive VQA’s .................................... 9 2.3.1 Rotoselect Algorithm ............................. 9 2.3.2 ADAPT .................................... 11 2.3.3 TETRIS-ADAPT ................................ 12 2.3.4 Vans ..................................... 13 2.3.4.1 Simplification of the Circuit .................... 14 2.3.4.2 Parameter Optimization ...................... 14 2.3.4.3 Vans characteristics ........................ 15 2.3.5 Summary .................................. 15 3 Problems, Challenges, and Proposed Solutions 19 3.1 Proposed Solutions .................................. 20 3.1.1 Rotoselect .................................. 21 3.1.2 ADAPT .................................... 24 vi
65 Antazes Generated by the Rotoselect Algorithm for a Single Ansatz Layer with Different Entanglement Strategies ............................... 76 66 Antazes Generated by the Rotoselect Algorithm for Two Ansatz Layers with Different Entanglement Strategies ................................. 76 67 Anstaz used by the Standard VQC version for a Single Encode and Anstaz Layer with Different Entanglement Strategies ........................... 76 68 Anstaz used by the Standard VQC version for a Single Encode and Two Anstaz Layers with Different Entanglement Strategies ......................... 76 69 Antazes Generated by the ADAPT Algorithm ...................... 77 70 Antazes Generated by the Rotoselect Algorithm for a Single Encode and Anstaz Layer with Different Entanglement Strategies ......................... 78 71 Antazes Generated by the Rotoselect Algorithm for a Single Encode Layer and Two Anstaz Layers with Different Entanglement Strategies ..................... 78 72 Antazes Generated by the Rotoselect Algorithm for Two Encode and a Single Anstaz Layer with Different Entanglement Strategies ......................... 78 73 Antazes Generated by the Rotoselect Algorithm for Two Encode Layers and Two Anstaz Layers with Different Entanglement Strategies ..................... 78 74 Anstaz used by the Standard VQC version for a Single Encode and Anstaz Layer with Different Entanglement Strategies ........................... 79 75 Anstaz used by the Standard VQC version for a Single Encode and Two Anstaz Layers with Different Entanglement Strategies ......................... 79 76 Antazes Generated by the ADAPT Algorithm ...................... 80 xiii
List of Tables 1 Adaptive Algorithms simple overview .......................... 18 xiv
Acronyms ADAPT Adaptive Derivative Assembled Problem Tailored. ML Machine Learning. NISQ Noisy Intermediate-Scale Quantum. PCA Principal Component Analysis. QAOA Quantum Approximate Optimization Algorithm. QML Quantum Machine Learning. QUBO Quadratic Unconstrained Binary Optimization. VQA Variational Quantum Algorithm. VQC Variational Quantum Classifier. VQE Variational Quantum Eigensolver. xv
Glossary accuracy Accuracy is a performance metric commonly used to evaluate the effectiveness of a machine learning model. It represents the proportion of correctly predicted instances (samples) in the total number of instances in the dataset. ansatz Parametrized quantum circuit used to represent a solution to a given problem. It serves as a trial wavefunction, typically employed in variational algorithms, where the objective is to find the optimal parameters that minimize a certain cost function. barren plateau In the context of quantum computing and quantum algorithms, a barren plateau refers to a specific challenge that arises when training Quantum Neural Networks (QNNs), or a parameterized circuit, using classical optimization algorithms. It describes a situation where the gradients of the QNN’s parameters become exponentially small as the number of qubits in the quantum circuit increases, leading to severe obstacles in optimizing the network. cost In the context of machine learning and optimization algorithms, cost (also known as loss or objective function) is a measure that quantifies the discrepancy between the predicted output of a model and the actual target values in a dataset. The objective of a machine learning algorithm is to minimize this cost function during the training process to achieve accurate predictions on new, unseen data. depth Quantum circuit depth refers to the number of sequential layers of quantum gates in a quantum circuit. expectation value In the context of quantum mechanics, it signifies the typical or average value of a physical quantity (represented by an operator) that a quantum system is expected to have when subjected to measurement. neural network Neural networks are computational models inspired by the structure and functioning of the human brain. They are a subset of machine learning algorithms designed to process comxvi
plex data and perform various tasks, including pattern recognition, classification, regression, and optimization. short coherence time property of quantum systems in which quantum states, including superpositions and entanglements, are highly susceptible to disruption and can exist only briefly before experiencing decoherence. Coherence time quantifies the duration for which a quantum system retains its delicate quantum characteristics and executes coherent quantum operations without substantial interference from external influences. xvii
Chapter 1 Introduction 1.1 Context Quantum computation has garnered significant attention due to its potential to solve tasks that classical computation struggles to accomplish within a reasonable timeframe [3]. One such example is the efficient factorization of large integers, which can theoretically be achieved on quantum computers using Shor’s algorithm [4]. The recent surge in interest in Machine Learning (ML) within both quantum and classical computing can be attributed to the vast amount of data that requires processing. With the exponential growth of data in recent years, researchers have been compelled to explore new and improved methods of data processing [5]. Pattern recognition in data stands as a common application of machine learning. Quantum Machine Learning (QML) has emerged as a promising approach, capable of identifying distinct patterns that classical ML may overlook, particularly when dealing with extensive datasets. Quantum computers process information differently, leveraging phenomena like quantum coherence and entanglement [5]. However, at present, there is insufficient evidence to suggest that quantum algorithms consistently outperform the best classical alternatives. The current state of quantum computers is characterized by noise and short coherence time, making real-world applications of ML problems almost unfeasible on quantum processors. These quantum computers are referred to as Noisy Intermediate-Scale Quantum (NISQ) devices [6]. The presence of noise and coherence limitations introduces errors into the system, thus constraining the performance of certain algorithms [7]. To address these challenges, algorithms like the Variational Quantum Algorithm (VQA) family have been developed, which remain at the forefront of the quest for quantum advantage [1]. Variational or parametrized quantum circuits are quantum circuits dependent on free parameters. 1
These circuits typically yield a scalar cost for a given task based on the expectation value (with potential classical post-processing). The free parameters, denoted as θ, are tuned through a classical optimization algorithm that queries the quantum device. The iterative optimization process seeks to find better parameter candidates with each step, thereby addressing systematic errors automatically during optimization. This feature makes variational circuits particularly appealing for near-term quantum devices [8]. Algorithms employing parameterized circuits, such as the VQA family, utilize a cost function C(θ)to encode the problem and a set of parameters θto encode the solution. The parameterized ansatz, akin to a neural network, is trained to minimize the cost function. In some cases, a training dataset ρkis used during optimization, while a testing dataset validates the model. Through an iterative loop between a quantum and a classical computer, the quantum device estimates the cost function or its gradient, and a classical optimizer navigates the cost function landscape to minimize it. Upon meeting a specific criterion, the process terminates, and the VQA output provides an estimation of the solution [1]. Figure 1: Schematic diagram of a VQA, from [1] The hybrid computation approach, which involves utilizing both classical and quantum computation, offers a promising compromise. This technique employs quantum parameterized circuits in conjunction with classical optimizers to optimize the parameters within the circuit. Numerous researchers have investigated these algorithms as potential candidates for achieving a quantum advantage on NISQ devices, finding applications in various domains such as dynamical simulation [9], combinatorial optimization [10], and, notably, machine learning [11]. Despite considerable efforts, VQA, including applications like the Variational Quantum Classifier (VQC), are not without their limitations. These constraints stem from both quantum and classical considerations, and although VQA shows promise, it is not yet perfect. VQC, as the name implies, is specifically designed for the classification of datasets. 2
1.2 Motivation The motivation behind the VQC lies in its ability to accurately predict the labels of input data points, akin to classical neural network where non-linearity plays a crucial role in achieving successful outcomes [1]. To identify patterns in the data, a VQC employs a quantum circuit comprising an encoding block E(x)for converting classical data points into quantum states (when dealing with classical datasets), a parameterized circuit block U(θ)serving as the neural network, and a measurement block Mγ responsible for transforming quantum states into an expectation value that can be processed by a classical device, where γcorresponds to the type of measurement. The parameters θare iteratively adjusted using a classical optimizer to minimize a cost function C(θ), which encodes the classification problem. The optimization loop continues until a specific criterion is met. Various challenges arise in VQC and VQA due to errors introduced by noise in the quantum system, which increases with the number of gates and qubits (also known as the ansatz depth). Optimization issues, such as falling into local minima traps and encountering barren plateaus, can also hinder performance [12,7]. Improving VQC and VQA requires addressing the issue of noise in the circuit, which is influenced not only by the hardware but also by the number and type of gates. Noise can be advantageous in certain scenarios, such as when dealing with saddle points [13], but generally, its presence is undesirable. One approach to reducing noise is to adopt a shallower ansatz, known as a hardware-efficient ansatz, which utilizes easily implemented gates, such as rotation gates, and minimizes depth overhead by applying twoqubit gates to adjacent qubits that are readily connected [1,14]. However, in some cases, increasing the ansatz depth becomes necessary to introduce more parameters, leading to more errors and optimization difficulties, especially when informed initial parameter guesses are not available, or problem-specific ansatz designs are required [1]. An increase in the number of parameters in the circuit enhances its expressibility, i.e., its ability to represent any state on the Hilbert space. While this may seem advantageous, it can impede optimization by flattening the cost landscape and making gradient-based optimization challenging. Overparameterization, where the number of parameters surpasses a critical threshold Mc, can help reduce the number of local minima in both quantum and classical machine learning. However, it can also complicate optimization due to increased expressibility [1,15,16]. To tackle the aforementioned challenges, this dissertation aims to introduce innovative approaches for crafting problem-specific ansatz. These approaches fall under the category of adaptive algorithms, 3
characterized by their ability to generate an ansatz tailored to the specific problem during the training phase. This process grants the optimizer complete control over the required depth, potentially eliminating the need to experiment with various ansatz structures for problem-solving purposes. Additionally, this approach offers a fixed form of parameter initialization, streamlining the optimization process. 1.3 Contribution As mentioned in Section 1.2, the primary challenges leading to VQC failure are noise and optimization difficulties. Therefore, this dissertation aims to propose an optimization method for building problemagnostic circuits suitable for classifying datasets. The key is to design an ansatz with a short depth yet sufficient expressibility to capture essential patterns. Generally, higher depth corresponds to higher expressibility, but an optimal balance must be struck to avoid issues with the classical optimizer, such as barren plateaus and local minima. To achieve this objective, this dissertation intends to investigate adaptive approaches already employed in other VQA methodologies. These approaches provide the optimizer with control over the ansatz structure. This freedom allows the optimizer to adjust the cost function landscape to avoid barren plateaus and local minima traps effectively. The optimizer is tasked with optimizing not only the parameters of the operators but also the composition and/or position of the operators. This reduction in the number of parameters makes the system more robust to noise and barren plateaus while approximating a local minimum close to the global minimum, where the solution lies [7,17]. Although the training process may be slower than standard VQC training due to optimizing the ansatz structure, better accuracy and a more generalized circuit that can be applied to different datasets are expected. Since no existing literature covers an adaptive approach specifically for VQCs, this dissertation will study and adapt existing adaptive algorithms from other problem domains, particularly in the chemistry field, to classification problems. The proposed approach will be evaluated through several steps: 1. Adapting existing adaptive algorithms for classification problems; 2. Verifying the applicability of the adapted algorithms in the classification paradigm; 3. Developing an adaptive variational algorithm tailored to classification problems based on insights from existing adaptive variational algorithms; 4. Comparing the results of the proposed adaptive approach with standard VQC in terms of accuracy and depth. 4
The dissertation aims to offer fresh insights into addressing the challenges encountered in Variational Quantum Classification (VQC), thereby paving the way for enhanced performance in quantum classification tasks. It achieves this by demonstrating scenarios where adaptive approaches outperform the standard VQC algorithm. Specifically, this work demonstrates the application of two adaptive algorithms, the Rotoselect algorithm and the ADAPT algorithm, to classify three different datasets of varying dimensions. These datasets include two fictitious datasets and one real dataset, the ’Iris’ dataset. Through this exploration, it becomes evident that these approaches can yield improved results with relatively short-depth ansatzes. The Rotoselect algorithm achieves this by dynamically modifying the entanglement in the ansatz, accomplished through adjustments in the axes and rotation angles. In contrast, the ADAPT algorithm capitalizes on the sequential inclusion of operators, underscoring the advantages of this approach. Both adaptive approaches surpassed the standard VQC in certain scenarios, particularly when operating with a reduced number of parameters. The reduction in parameter count remains a primary objective for these adaptive algorithms. While these results may not constitute groundbreaking advancements in the field of QML, they shed light on the potential for creating adaptive solutions in Variational Quantum Classification, a domain within quantum computing that has thus far lacked substantial progress. 1.4 Summary To summarize, VQA’s algorithms are good candidates for achieving some type of quantum advantage on noisy devices due to their ability to mitigate systematic noise and the fact that they can be used to solve a variety of problems, making it an interesting type of algorithm to study. VQC is a specific algorithm in the VQA family that suffers from the same issues as the other algorithms in the VQA family due to their similar structure. As evidenced by several studies that have showcased enhancements over the standard version, it is strongly suggested that an adaptive variant of the VQC could potentially offer advantages, particularly with regard to accuracy, which stands as one of the primary metrics for evaluating the performance of a classification model. By allowing the optimizer to dynamically adjust the ansatz structure during the training process, the adaptive approach can achieve an optimal balance between circuit depth and expressibility, which in turn may lead to improved accuracy in classification tasks. As a result, the adaptive VQC holds promise as a potential solution to address the common challenges faced by VQC algorithms, thereby advancing the state-of-the-art in quantum classification and opening new avenues for quantum advantage on noisy devices. 5
sumption of extensive classical and quantum resources. Consequently, this brute-force methodology is impractical for large systems. The optimizer calculates the gradients of all unitary operators within the set with respect to θd. It then adds the operator with the largest gradient in magnitude to the ansatz. This addition of a new operator and parameter increases the dimension of the cost function in a direction that results in the most significant reduction in cost. This process is repeated iteratively until certain criteria are met, effectively constructing the adaptive ansatz. An advantage of ADAPT over Rotoselect is the freedom to define the pool of operators, provided they are Hermitian operators. This flexibility empowers the optimizer to choose from a range of operators, including those with varying entanglement entropy. By incorporating Pauli strings of different sizes in the pool, the optimizer can select between operators with low entanglement (shorter strings) and those with higher entanglement (longer strings) [17]. ADAPT eliminates the need for prior knowledge of the problem’s necessary depth, as the optimizer determines the appropriate depth during training. However, a maximum depth can be predefined. The algorithm aims to mitigate barren plateaus by reducing the number of parameters and attempts to bypass local traps by reshaping the cost function landscape. This process guides the optimization toward approximating a global minimum [7]. While ADAPT strives to maintain a minimum depth, there is no guarantee that all gates are essential for the cost function. Redundant gates can still exist, which may impact the algorithm’s performance. Moreover, ADAPT’s iterative nature may result in longer computational times, particularly when dealing with large operator pools [7]. 2.3.3 TETRIS-ADAPT From the perspective of the authors, [19], the TETRIS-ADAPT algorithm represents an advancement over the ADAPT algorithm by further reducing the ansatz depth without requiring additional quantum resources. The strategy employed in the TETRIS-ADAPT algorithm is akin to the ADAPT algorithm described in Sec.2.3.2 but with a crucial difference in how operators are added. Instead of introducing one operator at a time, TETRIS-ADAPT incorporates multiple operators and their parameters simultaneously in each iteration. The algorithm starts by adding the operator with the highest gradient and then continues to include the operator with the next highest gradient, ensuring that the qubits affected by the new operator differ 12
from those influenced by the previously added operator. This process is repeated iteratively, introducing operators with smaller or equal gradients, until all available qubits are utilized or the operator pool is depleted. As justified in [19], TETRIS-ADAPT achieves circuits shallower than the ADAPT algorithm while maintaining a similar number of CNOTs. By offering the optimizer greater freedom to explore the Hilbert space within each iteration, this algorithm enhances the expressibility of ADAPT-VQE without increasing the ansatz depth. TETRIS-ADAPT yields results comparable to the ADAPT algorithm but with significantly reduced depth. Its improved resilience to noise and errors holds promise for real-world applications on quantum hardware, making it a potential candidate for practical implementation. 2.3.4 Vans The Vans (Variable Ansatz) algorithm was designed to address trainability and noise-related challenges by maintaining a shallow ansatz [12]. This algorithm can dynamically add and remove gates based on a set of predefined rules. Similar to previous algorithms, the Vans algorithm requires the definition of a pool of operators. However, it offers more flexibility in the choice of operators. Any operator can be added to the pool, as long as the parameterized operators can be compiled to the identity operator. In other words, a parameterized operator V(λ)∈ D exists only if there is a set of parameters λsuch that V(λ) = 1. The authors [12] suggest allowing some deviation to increase the number of regions that can be explored, which would otherwise require numerous iterations. The process of adding gates in the Vans algorithm starts by randomly selecting one operator from the set of predefined operators, with each operator having an equal chance of being chosen. Next, the algorithm determines which qubits the chosen operator will be applied to. This qubit selection process is stochastic, but it is weighted for two or more qubit operators. Qubits with low or no entropy are given a higher probability of being selected, which effectively increases the overall entropy of the system without introducing excessive error. Once the operator and the qubits are chosen, the operator is added to the ansatz and initialized to the identity, or a state close to it if needed [12]. 13
2.3.4.1 Simplification of the Circuit When a new operator is added, the Vans algorithm performs a circuit simplification step to remove redundant and unnecessary gates, ensuring a concise and efficient ansatz. The simplification process involves the following rules: 1. Removal of Initial CNOT gates: CNOT gates acting at the beginning of the circuit are removed; 2. Removal of Initial Rotations: Rotations about the z-axis that act at the beginning of the circuit are removed; 3. Elimination of Consecutive CNOTs: Consecutive CNOT gates that share the same control and target qubits are eliminated. This rule helps reduce redundant CNOT operations in the circuit; 4. Combination of Consecutive Rotations: Two or more consecutive rotations around the same axis and acting on the same qubit are combined to form a single rotation. This rule aims to consolidate multiple rotations into more concise representations; 5. Consolidation of Sequential Single-Qubit Rotations: If three or more single-qubit rotations are sequentially acting on the same qubit, they are combined into a general single-qubit rotation of the type Rz(θ1)Rx(θ2)Rz(θ3)or Rx(θ1)Rz(θ2)Rx(θ3), which has the same action as the preceding rotations; 6. Removal of Non-Influential Gates: Gates that do not significantly affect the cost function are removed. This is determined by comparing the cost values obtained from the ansatz with and without the gate. If there is no significant impact or if the cost function increases with the addition of the gate, it is removed from the circuit. However, in a classification problem, where the input state to the ansatz is not the all-zero state |0⟩⊗n, rules (1) and (2) can be omitted since the initial gates may have a significant effect on the circuit’s behavior. 2.3.4.2 Parameter Optimization After the simplification stage, the Vans algorithm proceeds to optimize the parameters of the ansatz. The optimization process is followed by another round of circuit simplification. The cycle of optimization and simplification continues until the circuit reaches a point where no further simplification is possible. 14
During the parameter optimization step, the algorithm aims to find the values of the parameters that minimize the cost function. The parameters are updated iteratively using optimization techniques such as gradient descent or other classical optimization algorithms. After each optimization iteration, the algorithm evaluates the new cost value obtained from the updated circuit. The system accepts the alterations with a probability based on the change in the cost value: the bigger the cost difference (as long as the new cost is lower than the previous one), the higher the acceptance probability. This probabilistic acceptance mechanism allows the algorithm to explore the parameter space effectively and avoid getting stuck in local minima. By iteratively optimizing the parameters and simplifying the circuit, the Vans algorithm achieves a balance between expressibility and depth, leading to more efficient and effective quantum circuits for classification tasks [12]. 2.3.4.3 Vans characteristics The Vans algorithm offers the user the highest degree of flexibility in building the operator pool among all the algorithms mentioned in this document. It not only adds operators but also removes redundant gates, resulting in a reduction of the circuit’s depth and improved noise resistance. As a stochastic algorithm, there is no guarantee of finding the best solution for the problem, and there is a possibility of failure to find an appropriate solution, although the probability of such occurrences is low. While the authors [19] do not specify the exact number of resources used, given the tasks performed by this algorithm, it can be expected to be computationally demanding and relatively slow, requiring a substantial amount of resources. Nevertheless, the trade-off for improved flexibility and noise resistance may justify the computational cost in certain applications. 2.3.5 Summary The adaptive approaches discussed here are innovative variations of VQAs that aim to address the challenges posed by noise on quantum processors and optimization difficulties on classical processors. These adaptive algorithms leverage the flexibility of quantum circuits to dynamically adjust their structure and parameters, making them more efficient and versatile in tackling complex problems. 1. Rotoselect Algorithm: The Rotoselect algorithm brings adaptivity into play by facilitating the direct optimization of individ15
ual parameters, circumventing the traditional reliance on gradient descent methods. This approach involves the exploration of different rotation gates, with parameters and gate choices being updated sequentially. By optimizing parameters one at a time, this method streamlines the circuit optimization process, making parameter optimization faster and more straightforward. Its successful application in quantum chemistry underlines its effectiveness, particularly in the context of groundstate estimation. 2. ADAPT Algorithm: The Adaptive Derivative Assembled Problem Tailored (ADAPT) algorithm is a remarkable and adaptive variational approach compatible with QAOA and VQE. It stands out for its dynamic growth of the ansatz, providing the optimizer with fine-grained control over the circuit’s depth. The algorithm’s architecture relies on a set of Pauli strings, which are exponentiated to create corresponding unitary operators. By calculating gradients with respect to the parameters, the algorithm selects the operator with the most significant gradient (in absolute value) and incorporates it into the ansatz, initializing parameter optimization. This iterative process continues until specific termination criteria are met, such as reaching a maximum depth or achieving a desired convergence threshold. The adaptivity of the Adaptive Derivative Assembled Problem Tailored (ADAPT) algorithm facilitates efficient exploration of the Hilbert space and aims to circumvent barren plateaus and local traps that often impede traditional Variational Quantum Algorithm (VQA) methods. Consequently, the ADAPT algorithm demonstrates enhanced trainability and noise resilience, surpassing conventional approaches. Its inherent adaptivity positions it as a compelling choice for versatile and widely applicable Quantum Machine Learning (QML) tasks. The ADAPT algorithm holds significant promise in empowering quantum algorithms to address a multitude of real-world challenges spanning diverse fields, including quantum chemistry simulations, optimization, and Machine Learning (ML) tasks. 3. TETRIS-ADAPT Algorithm: The TETRIS-ADAPT algorithm draws inspiration from ADAPT and introduces an even more efficient approach to constructing shallower circuits. Unlike ADAPT, TETRIS-ADAPT adds multiple gates and parameters simultaneously, effectively increasing the number of parameters without significantly increasing the circuit depth. Remarkably, this improved approach maintains the same level of performance and yields identical solutions as the ADAPT algorithm. 16
The key advantage of TETRIS-ADAPT lies in its ability to substantially reduce circuit depth while preserving solution quality. This remarkable characteristic holds significant promise for real-world quantum applications, where noise and limited quantum resources pose challenges. By efficiently exploring the parameter space and optimizing circuit structures, TETRIS-ADAPT empowers quantum algorithms to achieve enhanced expressibility without compromising on the quality of results. With TETRIS-ADAPT’s innovative methodology, quantum computing applications, ranging from quantum chemistry simulations to optimization tasks and ML, stand to benefit from improved efficiency and effectiveness. As quantum technologies continue to evolve, adaptive algorithms like TETRISADAPT provide a compelling avenue for unlocking the full potential of quantum computing in tackling complex real-world problems. 4. Vans Algorithm: The Vans algorithm stands out as a versatile and adaptive approach, offering users a wide range of options to construct the operator pool. This algorithm possesses the unique ability to add and remove gates, optimizing both parameters and circuit structure. By eliminating redundant gates, it effectively reduces the circuit depth and enhances noise resilience. Although its stochastic nature may not always guarantee the optimal solution, its adaptability makes it well-suited for a diverse array of problems. The Vans algorithm’s flexibility and efficiency make it a promising candidate for various QML tasks, providing a valuable tool for tackling real-world challenges in quantum computing applications. In conclusion, these adaptive approaches demonstrate the potential of adaptivity in VQAs to achieve quantum advantage on noisy devices and outperform standard VQA algorithms. Their dynamic adjustments of circuit structures and parameter optimization enable improved performance in various QML applications, opening avenues for further research and advancements in quantum computing. 17
Table 1: Adaptive Algorithms simple overview Algorithms Vans RotoSelect ADAPT TETRIS-ADAPT Pool ∀V(λ)∈D∃λ∗:V(λ∗)=1σx,σyeσz Set of Pauli Strings Set of Pauli Strings Operator Choice Stochastically Minimal value of the cost function Largest gradient in magnitude Largest gradient in magnitude Depth Variable Fixed Variable Variable Entanglement flexibility Flexible Fixed Flexible Flexible 18
Chapter 3 Problems, Challenges, and Proposed Solutions As discussed in Chapter 1,Variational Quantum Algorithm (VQA) face significant challenges, particularly concerning noise and difficulties in classical optimization. Researchers have focused on addressing these issues, with specific emphasis on algorithms like Variational Quantum Eigensolver (VQE) and Quantum Approximate Optimization Algorithm (QAOA) [7,18,25,24,26,20,21,17]. However, the application of adaptive algorithms to classification problems remains relatively limited, with only the Vans algorithm [12], discussed in Section 2.3.4, giving them attention. While the Vans algorithm provides adaptive capabilities for classification, its ”greedy” nature demands significant computational resources for practical-sized problems. The challenges faced by the VQC algorithm present an opportunity to explore the potential of adaptive algorithms such as Rotoselect and ADAPT. These algorithms hold promise in enhancing VQA’s robustness, efficiency, and noise resistance. This dissertation aims to investigate the adaptation of Rotoselect and ADAPT algorithms to the VQC framework, paving the way for more powerful and practical quantumbased machine learning solutions for real-world challenges. The dissertation primarily addresses challenges posed by classical optimizers and quantum limitations in VQC. The objective is to achieve improved performance and robustness by reducing the ansatz depth through classical computation, known for its reliability compared to quantum computation. A key focus is on developing problem-tailored ansatz structures to handle challenges such as barren plateaus, overfitting, and underfitting during problem trainability. A fixed parameter initialization approach will be devised for universal application to diverse problems while efficiently managing algorithm complexity. Additionally, the research emphasizes evaluating the efficiency of adaptive algorithms with respect to circuit depth and solution accuracy. This involves exploring additional benchmarking and evaluation metrics to emphasize circuit depth reduction and solution accuracy enhancement in adaptive algorithms for VQC. 19
It is important to note that it was considered a set of fictitious and real datasets composed of classical data. Consequently, encoding blocks are used to convert classical data into quantum states. Choosing an appropriate encoding is crucial for achieving desirable results. Two encoding strategies were utilized, although the in-depth study of encoding techniques lies outside the scope of this dissertation. Moreover, it is imperative to conduct a comprehensive resource analysis for adaptive algorithms. While the Rotoselect algorithm offers valuable insights into resource utilization [24], a more thorough examination is essential to evaluate the practicality and scalability of these adaptive approaches. Which is not done in this dissertation due to time constraints. By combining experimental analysis and rigorous evaluation, this dissertation aims to introduce adaptive approaches in the VQC domain and bring quantum machine learning closer to practical implementation in various domains. The goal is to contribute to the development of quantum-based machine learning solutions that effectively address real-world challenges and applications. 3.1 Proposed Solutions This dissertation is dedicated to the adaptation of two algorithms, namely, the Rotoselect algorithm (Section 2.3.1) and the ADAPT algorithm (Section 2.3.2). The selection of these specific algorithms is driven by distinct factors: The Rotoselect algorithm is appealing due to its simplicity and intuitive design. However, it has a significant limitation: it relies directly on the expected value of a Hamiltonian for its optimization. In the context of solving the classification problems addressed in this dissertation, this reliance can potentially introduce a bottleneck to the core problem, mainly due to the need for post-processing associated with the expected value. Conversely, the ADAPT algorithm stands out due to its versatility. It is applicable in both Variational Quantum Eigensolver (VQE) and Quantum Approximate Optimization Algorithm (QAOA) scenarios. This versatility positions it as a promising candidate for adaptation to classification problems. These algorithms have been chosen for adaptation based on their unique attributes, and this dissertation explores their potential to address classification challenges effectively. Among the studied algorithms, the Vans algorithm, despite its complexity and versatility, is not considered appropriate for this master’s thesis. Its computational demands and extensive optimization steps make it challenging to implement within the constraints of this study. On the other hand, while the TETRISADAPT algorithm showcases improvement over the ADAPT algorithm, it demonstrates enhanced perfor20
mance with a significant number of qubits. In the present dissertation, the emphasis is on maintaining a reasonable number of qubits to ensure manageable optimization times and computational resources. The selected algorithms, Rotoselect and ADAPT, will be thoroughly investigated in the context of classification problems. The objective is to explore their adaptation potential, overcome challenges related to trainability, and enhance their performance and applicability in quantum machine learning applications. By analyzing and adapting these algorithms, this research seeks to contribute to the development of more robust and efficient quantum-based machine learning solutions. 3.1.1 Rotoselect As elucidated in Section 2.3.1, the Rotoselect algorithm’s optimizer systematically modifies the rotation angle and axis individually, while maintaining the other gates and angles fixed within the quantum circuit. Fixed Gate and Parameter Fixed Gate and Parameter Fixed Gate and Parameter Encoding Gate and Parameter being optimized Figure 3: Schematic representation of the Rotoselect algorithm adapted for a classification problem, depicting the two qubits engaged in the process. Figure 3portrays the adapted schematic of the Rotoselect algorithm tailored for a classification problem involving two qubits. In this illustration, the gate denoted by the red label symbolizes the gate undergoing optimization, while the remaining gates remain unaltered. The circuit is instantiated three times, with each instance sharing a common structure except for the gate bearing red labels, which vary in angular orientation. Specifically, one instance encompasses a rotation around the xx axis, another revolves around the yy axis, and the final instance gyrates around the zz axis. While the original Rotoselect algorithm relies on Equation 2.2 to ascertain the optimal value for the 21
Chapter 4 Experimental Result: Rotoselect This section is dedicated to showcasing significant outcomes derived from the implementation of the RotoSelect algorithm across a variety of datasets with distinct dimensions. The assessment involves the utilization of two different angle-based encoding methods with the algorithm, as it will be possible to see the performance of this algorithm is highly dependent on the encoding used. Modifications will be applied to the circuit’s structure, like variations in the number of encode and ansatz layers and different entanglement strategies for three and four qubits. The ensuing analysis aims to provide a comprehensive understanding of the algorithm’s behavior, featuring graphical depictions of accuracy, entanglement, and other pertinent metrics over the training process. In order to make reading of this section easier additional graphs can be found in Appendix A. The examination begins with datasets spanning varying dimensions, progressing from the smallest to the largest. 4.1 Analysis of Performance for Two-Qubit Systems The initial dataset under scrutiny is the ”Ad Hoc” dataset, sourced from the ”qiskit” library” [27]. This elementary dataset comprises only two features and is generated using the ”IQPEmbedding” encoding. The data is linearly separable through the application of the same encoding technique. The dataset includes a testing dataset with 150 samples and a training dataset with 500 samples. To initiate the investigation, the number of encoding layers will be increased, and their influence on performance will be assessed. Figure 5illustrates a single repetition of the ”IQPEmbedding” encoding block, the encoding strategy used to try and solve this classification problem, with additional layers involving a sequential duplication of the depicted structure. The initial ansatz structure comprises a single layer, which includes two orthogonal axis rotations (Y and Z) and CNOT entanglement. Additionally, two more orthogonal axis rotations are added at the end 28
0 1 H H RZ RZ RZ Figure 5: Single Layer of IQPEmbedding Encoding for Two Qubit for parameter fine-tuning. The selection of this initial ansatz is entirely arbitrary. It was chosen primarily because it’s a commonly employed ansatz capable of addressing a broad spectrum of classification problems. 0 1 RY RY RZ RZ RY RY RZ RZ Figure 6: Structure of the Initial Single Layer in the Fixed Ansatz for the Two-Qubit Rotoselect Algorithm During optimization, 10 cycles sequentially optimize individual rotation gates and their angles. Each step represents the optimization of one rotation angle, with each cycle corresponding to the optimization of every gate and its respective parameter on the ansatz. Figure 7demonstrates a close approximation between the actual cost and the estimated cost, as outlined in equation 3.1, indicating a highly accurate approximation. The optimization results for a single encode and ansatz layer are illustrated below. Figure 8a highlights the highest accuracy achieved on the testing dataset, reaching 88%. Figure 8b demonstrates that the algorithm, despite having the freedom to choose the rotation axes and angles of the gates, is capable of altering the circuit’s entanglement1even without the ability to modify entanglement gates like a CNOT gate. Consequently, the resulting ansatz structure is as depicted in Figure 9. Unfortunately, the previous circuit structure did not yield a high-confidence solution. There are several 1This metric, known as the Meyer-Wallach measure, was introduced by David A. Meyer and Norbert R. Wallach in their paper [28]. It serves as a tool for quantifying entanglement in pure multi-qubit states, drawing inspiration from the concept of concurrence. Concurrence is a well-established measure of entanglement tailored for two-qubit states. The Meyer-Wallach measure takes this concept a step further, applying it to systems with more than two qubits. It’s defined by deconstructing the multi-qubit state into two-qubit subsystems and quantifying the entanglement that exists between these subsystems. 29
0 10 20 30 40 50 60 70 80 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training Cost Sinusoidal Cost Approximation Figure 7: Evaluating the Cost and Approximated Cost for the Quantum Circuit Architecture With a Single Layer of Encoding and Ansatz and Two Qubits 0 10 20 30 40 50 60 70 80 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 10 20 30 40 50 60 70 80 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 8: Quantum Circuit Architecture: One Encode Layer, One Ansatz Layer, and Two Qubits 0 1 RX RY RZ RZ RY RX RY RY Figure 9: Final Quantum Circuit Ansatz Derived from the RotoSelect Algorithm for the Quantum Circuit Architecture: One Encode Layer, One Ansatz Layer, and Two Qubits 30
adjustable aspects within the structure, such as the number of parameters, the addition of more ansatz layers, or the incorporation of additional encoding layers. In the subsequent investigation, the emphasis will be on varying the number of encoding layers since increasing the number of ansatz layers would significantly extend the computation time. By increasing the number of encode layers while keeping the initial ansatz structure identical to that shown in Figure 6and initializing the parameters at zero, valuable insights can be gleaned from the results, illustrated in Figure 10. 0 10 20 30 40 50 60 70 80 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 10 20 30 40 50 60 70 80 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 10: Quantum Circuit Architecture: Two Encode Layers, One Ansatz Repetition, and Two Qubits As it can be seen, there is a significant improvement in accuracy. The testing dataset accuracy now peaks at 100%, which is a remarkable result for a classification problem. 0 1 RZ RX RZ RX RZ RY RY RY Figure 11: Final Quantum Circuit Ansatz Derived from the RotoSelect Algorithm for the Quantum Circuit Architecture: Two Encode Layers, One Ansatz Layer, and Two Qubits This final structure closely resembles the one shown in Figure 9, where 62.5% of the gates remain the same. This highlights the adaptability of the algorithm, which only by changing the number of encode layers can modify the ansatz structure to find better solutions. Furthermore, it demonstrates that the preferred gates that the algorithm tends to change are the first 4gates (before the CNOT gate), with 50% 31
of them being altered, while the last 4gates (after the CNOT gate) experience only one change. With an increase in the number of encode layers to three, the obtained results are illustrated in Figure 12. 0 10 20 30 40 50 60 70 80 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 10 20 30 40 50 60 70 80 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 12: Quantum Circuit Architecture: Three Encode Layers, One Ansatz Layer, and Two Qubits Here can easily be seen that there is a drastic decrease in performance, where now the testing dataset accuracy only peaks at 77.3(3)% It is also possible to see in figure 12b that the optimizer has a difficult problem, while compared with figure 8b, in controlling the necessary entanglement. 0 1 RY RX RZ RY RY RY RX RY Figure 13: Final Quantum Circuit Ansatz Derived from the RotoSelect Algorithm for the Quantum Circuit Architecture: Three Encode Layers, One Ansatz Layer, and Two Qubits Is possible to see that in figure 13 the ansatz structure differs the most from the other two, explaining why the algorithm results in worse results. As evident from the presented figures, it becomes apparent that the algorithm’s optimal performance is achieved when employing two encode layers and a single ansatz layer. That can be even better noticed when the accuracy associated with the testing dataset for each of the quantum circuit architectures deployed above is plotted in the same graph, Figure 14. 32
0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training E1 E2 E3 E4 Figure 14: Comparative Analysis of Quantum Circuits with Different Numbers of Encode Layers (E1, E2, E3, E4) The significant drop in algorithm performance for structures with more than two layers of encoding blocks emphasizes the pivotal role of an effective encoding strategy. This observation underscores the RotoSelect algorithm’s sensitivity, akin to traditional Variational Quantum Classifiers, to the quality of the chosen encoding approach. To further investigate the role of the number of ansatz layers, a fixed number of encoding layers will be maintained while systematically increasing the number of ansatz layers. Instead of directly duplicating the number of gates and thereby significantly increasing the parameter count, each additional ansatz layer introduces only a pair of orthogonal rotations per qubit, while retaining the last two sets of rotation gates at the end. This approach aligns with the primary objective of the adaptive RotoSelect algorithm, which prioritizes maintaining a low circuit depth. This concept is visually demonstrated in Figure 15. 0 1 RY RY RZ RZ RY RY RZ RZ RY RY RZ RZ (a) Two Ansatz Layers 0 1 RY RY RZ RZ RY RY RZ RZ RY RY RZ RZ RY RY RZ RZ (b) Three Ansatz Layers Figure 15: Comparison of Initial Ansatz Structures for Different Numbers of Ansatz Layers The analysis of the number of ansatz layers will focus on various layer counts. Additional graphs and details are available in Appendix Ato enhance the readability of the results section. A comprehensive comparison of all results is depicted in Figure 16. To ensure smoother visualiza33
tions and enable the comparison of convergence patterns, 100 data points were sampled from the original curves. In this representation, each point corresponds to a percentage of the algorithm’s execution progress. Notably, every 10 points collectively represent one cycle for all the curves. 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 Figure 16: Comparison of Quantum Circuits with Different Numbers of Ansatz Layers (A1-A7) while maintaining a fixed number of encode layers (one encode layer) with normalized curves 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 Figure 17: Comparison of Quantum Circuits with Different Numbers of Ansatz Layers (A1-A7) while maintaining a fixed number of encode layers (two encode layers) with normalized curves Increasing the number of ansatz layers has a minimal impact on algorithm accuracy. However, it’s important to note that ansatz structures with more gates and parameters require fewer cycles to achieve comparable accuracy compared to those with fewer gates. Keep in mind that each cycle involving more 34
parameters and gates also entails more iterations per cycle. Interestingly, having an even number of ansatz repetitions results in the most efficient convergence time. 4.2 Analysis of Performance for Three-Qubit Systems Introducing a binary fictitious dataset comprising three features, each falling within the range of 0,2π. Unlike the previous dataset, a unique encoding strategy is being employed here due to certain challenges encountered. The earlier encoding technique proved ineffective in solving this dataset. Both the adaptive algorithms and the conventional Variational Quantum Classifier (VQC) faced difficulties in finding solutions. Consequently, it became necessary to explore an alternative encoding methodology to address this issue. In this instance, a straightforward angle embedding strategy, as described in [29], was employed. This strategy entails representing one feature per qubit using angle encoding. It’s important to note that the results obtained using the encoding technique illustrated in Figure 5will not be presented in this work. These results fail to provide insights into the functioning of the adaptive approaches for this specific dataset. As previously mentioned, the encoding technique plays a critical role in the classification task. However, investigating this role falls beyond this work’s objectives, so all the results for this particular dataset will be presented with a single encode layer. This dataset consists of 70 data points for the training dataset and 30 data points for the testing dataset. For each experiment with different numbers of ansatz layers and parameters, 30 cycles will be performed. As a result, each gate and parameter will be optimized 30 times. Using the initial ansatz structure depicted in Figure 15 for more than two qubits provides flexibility in implementing various qubit entanglement arrangements. This study will explore two distinct entanglement strategies to gain a deeper understanding of the algorithm’s behavior. 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (a) Linear Entanglement 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (b) Full Entanglement Figure 18: Examples of Different Qubit Entanglement Strategies These arrangements are known as linear entanglement, illustrated in Figure 18a, and full entanglement, demonstrated in Figure 18b. Notably, the rotoselect algorithm preserves the positioning and quantity 35
of CNOT gates. Consequently, an expectation arises that these varying entanglement strategies will yield divergent results and exhibit distinct trends in performance. In Figure 19, the cost function and its approximation defined in Equation 3.1, for a single ansatz layer and encoding using both entanglement strategies are presented. The figures show that the approximation maintains reasonable accuracy, although it doesn’t reach the precision exhibited by the two-qubit algorithm (Figure 7). 0 50 100 150 200 250 300 350 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training Cost Sinusoidal Cost Approximation (a) Linear Entanglement 0 50 100 150 200 250 300 350 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Cost Cost Evolution during Training Cost Sinusoidal Cost Approximation (b) Full Entanglement Figure 19: Cost and Approximated Cost Evaluation for the Quantum Circuit Architecture with One Encode Repetition, One Ansatz Repetition and Three Qubits The classification outcomes for this dataset are displayed below. Results for one to seven ansatz layers will be exhibited, commencing with one layer in Figure 20 and 21. 0 50 100 150 200 250 300 350 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 50 100 150 200 250 300 350 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 20: Quantum Circuit Architecture: One Encode Layer, One Ansatz Layer, Linear Entanglement, and Three Qubits 36
0 50 100 150 200 250 300 350 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 50 100 150 200 250 300 350 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 21: Quantum Circuit Architecture: One Encode Layer, One Ansatz Layer, Full Entanglement, and Three Qubits Comparing Figures 20 and 21, it’s evident that the algorithm performs better with linear entanglement. Notably, the total entanglement entropy increases for linear entanglement but then quickly drops to around 0.2. By increasing the number of parameters and consequently the depth of the ansatz using the approach depicted in Figure 15, the following results are observed in Figures 22 and 23 0 100 200 300 400 500 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 100 200 300 400 500 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 22: Quantum Circuit Architecture: One Encode Layer, Two Ansatz Layers, Linear Entanglement, and Three Qubits Though not immediately evident, the algorithm’s performance was slightly inferior to that depicted in Figure 20b. Notably, the accuracy curves for the testing dataset (red curve) exhibit more fluctuations compared to the graph in Figure 20a, where the accuracy value for the testing dataset initially peaked at 37
0 20 40 60 80 100 120 140 160 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 20 40 60 80 100 120 140 160 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 33: Quantum Circuit Architecture: Three Encode Layers, One Ansatz Layer, Linear Entanglement, and Four Qubits 0 20 40 60 80 100 120 140 160 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 20 40 60 80 100 120 140 160 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Mayer Wallach measurment Mayer-Wallach Measurement of the Entenglement during Training (b) Entanglement Figure 34: Quantum Circuit Architecture: Three Encode Layers, One Ansatz Layer, Full Entanglement, and Four Qubits the number of encode layers across different entanglement strategies. By evaluating these trends, a more comprehensive perspective on the impact of the number of encode layers can be obtained. Both Figures 35a and 35b provide insightful evidence of the substantial influence encoding has on the algorithm’s performance, reaffirming the earlier discussions regarding the paramount role of effective encoding techniques. Importantly, these results underscore the pivotal nature of proper encoding, as it can significantly shape the algorithm’s performance trajectory. Of particular interest is the differing response of the linear entanglement and full entanglement strategies to encoding techniques. The linear entanglement strategy appears to be more susceptible to the 44
0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training E1 E2 E3 E4 (a) Linear Entanglement 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training E1 E2 E3 E4 (b) Full Entanglement Figure 35: Comparative Analysis of Quantum Circuits with Different Numbers of Encode Layers (E1, E2, E3, E4), with normalized curves. impact of encoding, showcasing its best performance with two encode layers while experiencing a decline with four encode layers. In contrast, the full entanglement strategy doesn’t appear to be as affected as the linear entanglement strategy. It consistently achieves almost the same performance across different numbers of encode layers, with the exception of one encode layer. 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (a) Linear Entanglement 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (b) Full Entanglement Figure 36: Comparison of Quantum Circuits with Different Numbers of Ansatz Layers (A1-A7), with normalized curves (One Encode repetition). An analysis of ansatz depth’s influence reveals that, as shown in Figures 36a,36b,37a, and 37b, its impact is less pronounced compared to the effect of encoding. However, a crucial observation emerges: the Linear Entanglement strategy consistently yields similar results across various depths, emphasizing its resilience to changes in ansatz depth. On the contrary, the Full Entanglement strategy exhibits sensitivity 45
0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (a) Linear Entanglement 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (b) Full Entanglement Figure 37: Comparison of Quantum Circuits with Different Numbers of Ansatz Layers (A1-A7), with normalized curves (Two Encode repetition). to ansatz depth, echoing the findings in Section 4.1. Notably, employing two encode repetitions (Figures 37a and 37b) consistently provides improved results, and the discrepancy in outcomes stemming from varying ansatz depth is notably narrower compared to using a single encode layer (Figures 36a and 36b). 4.4 Summary The algorithm’s performance is influenced by several factors, including ansatz structure, ansatz depth, entanglement strategy, encode structure, and encode depth. Remarkably, the algorithm consistently achieves high accuracy, often reaching 100% precision. Among the findings, the linear entanglement strategy consistently performs well across different numbers of ansatz layers, proving its robustness. The impact of encoding is substantial, with effective encoding techniques significantly enhancing the algorithm’s performance. Interestingly, the full entanglement strategy shows greater sensitivity to ansatz depth, while the Linear Entanglement strategy remains relatively stable. Furthermore, the relationship between entanglement entropy and performance isn’t straightforward. One conclusion can be drawn: after the algorithm reaches a confident solution, the Mayer-Wallach Measurement of entanglement seems to stabilize. This suggests that the algorithm, even though it has no ability to change the entanglement gates directly by having the freedom to adjust the axes of rotations and their angles, can effectively control the entanglement within the circuit. In conclusion, the performance of the RotoSelect algorithm is influenced by complex interactions 46
among various parameters. Effective encoding techniques and entanglement strategies are crucial, but the optimal approach can vary depending on the specific problem and context. This underscores the need for an adaptive algorithm that also selects the two-qubit gates, as learning the structure of entanglement is crucial, which the RotoSelect algorithm does not account for. 47
Chapter 5 Experimental Result: ADAPT This section explores the results of the ADAPT algorithm across datasets of varying dimensions. One of the key differences between the ADAPT algorithm and the previously discussed RotoSelect algorithm is the ADAPT algorithm’s ability to incorporate unparameterized two-qubit gates like CNOTs. This feature provides greater control over the entanglement of the quantum circuit. Additionally, the ADAPT algorithm does not have a fixed circuit structure. Instead, it builds the ansatz from scratch during the optimization process. This means that new operators are added dynamically, taking into account the partial gradients of these operators, as discussed in Section 2.3.2. Two angle-based encoding methods will be employed to emphasize their influence on algorithm performance. Structural modifications involve changes in the number of encode layers while maintaining consistency with 10 parameterized operators for all experiments. Each parameter optimization is performed using the SPSA1optimizer from the PennyLane library, with 300 iterations per optimization step. This sums up to a total of 10 ×300 iterations for the experiments, the pool used for all the results is the same one described in Section 2.3.2. The objective is to provide a comprehensive understanding of the algorithm’s behavior, using graphical representations for metrics like accuracy and cost throughout training. This section follows a structure similar to Section 4and employs the same datasets. 5.1 Analysis of Performance for Two-Qubit Systems Utilizing the same dataset featured in Section 4.1 and employing the ”IQPEmbedding” encoding depicted in Figure 5, the objective is to try and solve the problems with the inclusion of 10 parameterized operators. The results will be presented below, with an examination of variations in the number of encode layers. 1TThe SPSA algorithm is designed to efficiently estimate gradients through perturbations during optimization. These perturbations involve introducing random parameter changes within the objective function. This unique approach equips SPSA with robustness, enabling it to approximate gradients accurately, even when faced with challenges such as noise, quantum hardware limitations, or other sources of uncertainty [30]. 48
0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 500 1000 1500 2000 2500 3000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 38: Quantum Circuit Architecture: One Encode Layer, Ten Parameterized Operators and Two Qubits Several noteworthy observations can be made instantly when observing figure 38. Firstly, especially at the outset of the optimization process, there is a discernible pattern: when a new operator is introduced to the circuit, it manifests as a sudden spike in the accuracy curve (as seen in Figure 38a), and conversely, as a sharp dip in the cost curve (as seen in Figure 38b). These behaviors are desirable in this type of algorithm because they indicate that adding operators has a positive impact on algorithm performance, with accuracy increasing and cost decreasing as a result. Another notable observation is the presence of frequent fluctuations in the accuracy curve (as seen in Figure 38a). These fluctuations occur during the parameter optimization process, and while expected to some extent, they are generally not desired. 0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 500 1000 1500 2000 2500 3000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 39: Quantum Circuit Architecture: Two Encode Layers, Ten Parameterized Operators and Two Qubits 49
Increasing the number of encode layers to two has notable effects. The dips in the cost function become more frequent with the addition of operators, while the fluctuations in accuracy become less conspicuous. Interestingly, the accuracy reaches a peak at 100%, and the cost function converges to almost half the value achieved with a single encode layer. This behavior underscores the influence of the number of encode layers on the optimization process. The results in both figures 38 and 39 align with those obtained in Section 4.1, particularly in terms of accuracy. 0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 500 1000 1500 2000 2500 3000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 40: Quantum Circuit Architecture: Three Encode Layers, Ten Parameterized Operators and Two Qubits As observed in section 4.1, the implementation with two encode layers yields the most favorable results. With three encode layers, figure 40, the jumps in the accuracy curve and the dips in the cost function become less pronounced when compared to the results in figure 39. However, it’s important to note that the fluctuations in accuracy are more conspicuous in this scenario compared to the fluctuations in figure 38. When comparing figure 41 with figure 14, it becomes apparent that adaptive algorithms, although fundamentally distinct from each other in terms of their underlying methodologies and approaches, surprisingly demonstrate striking similarities in terms of accuracy. This observation raises intriguing questions about the fundamental principles that may be influencing the convergence of these seemingly disparate algorithms. It is noteworthy that despite differences in their core mechanisms, both adaptive algorithms appear to converge toward comparable levels of accuracy. This convergence behavior may suggest the existence of certain common features or principles inherent in the problems they address or in the optimization 50
0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training E1 E2 E3 E4 Figure 41: Comparative Analysis of Quantum Circuits with Different Numbers of Encode Layers (E1, E2, E3, E4) landscapes they navigate. Furthermore, an exploration and comprehension of these accuracy similarities could yield valuable insights into the broader realm of optimization algorithms, particularly those employing adaptive strategies. It might open the door to the development of hybrid algorithms that harness the strengths of both approaches, potentially leading to even more impressive results. This cross-fertilization of ideas and techniques is a hallmark of scientific progress that can lead to exciting breakthroughs across various domains. 5.2 Analysis of Performance for Three-Qubit Systems Utilizing the identical dataset and ”AngleEmbending” encode technique employed in Section 4.2. In figure 42a, a distinctive behavior in the accuracy curve becomes evident. Initially, it peaks at an impressive 90%, showcasing the algorithm’s rapid capacity to achieve high accuracy. However, when introducing a new operator, an intriguing pattern emerges. Instead of experiencing a further boost in accuracy, as one might expect, the accuracy takes a sharp decline, settling at around 80%. This observation implies that merely adding more operators to the quantum circuit doesn’t necessarily guarantee improved accuracy on the testing dataset. It’s worth noting that while the cost function decreases, indicating optimization progress, this decrease primarily reflects an increase in the accuracy of the training dataset. Remarkably, this phenomenon shares similarities with Figure 25a, where the accuracy of the testing dataset also exhibits an early surge to 90% during optimization but then gradually descends to around 80%. This intriguing parallel in behavior prompts further investigation into the underlying dynamics of both the 51
0 200 400 600 800 1000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 200 400 600 800 1000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 42: Quantum Circuit Architecture: One Encode Layer, Ten Parameterized Operators and Three Qubits ADAPT algorithm and the RotoSelect algorithm, as such insights could potentially lead to advancements in optimization algorithms. 5.3 Analysis of Performance for Four-Qubit Systems In the case of the ”Iris” dataset, both ”AngleEmbedding” encode and the ”IQPEmbedding” technique were applied, following the methodology used in Section 4.3, the results for the ”AngleEmbedding” technique can be seen in Appendix A. Using the ”IQPEmbedding” encoding, which previously yielded suboptimal results in Section 4.3, it was expected that this encoding approach would also lead to less favorable outcomes for this specific dataset when compared to the ”AngleEmbedding” encode showcased in figure 54. As it can be seen in figure 43, the testing dataset peaked at 96.6% accuracy. This accuracy, although quite high, falls slightly short of the perfect 100% accuracy achieved with the angle-based encoding, and it’s noteworthy that this level of accuracy was attained with the addition of more operators than in the angle-based encoding scenario. Increasing the number of encode layers to two the results are showcased in figure 44. In contrast to previous sections, increasing the number of encode layers to two did not yield an improvement in performance. This comparison is more apparent when examining figure 45. In Figure 45, it is evident that the strategy with a single encode layer yielded the best results, even though they are very similar to the results obtained from the two encode layers structure. 52
0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 500 1000 1500 2000 2500 3000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 43: Quantum Circuit Architecture: One Encode Layer, Ten Parameterized Operators and Four Qubits 0 500 1000 1500 2000 2500 3000 Number of iterations 0 20 40 60 80 100 Accuracy Accuracy Evolution During Training Test Dataset Train Dataset (a) Accuracy 0 500 1000 1500 2000 2500 3000 Number of iterations 0.0 0.2 0.4 0.6 0.8 1.0 Cost Cost Evolution during Training (b) Cost Figure 44: Quantum Circuit Architecture: Two Encode Layers, Ten Parameterized Operators and Four Qubits 5.4 Summary The ADAPT algorithm is a versatile quantum machine learning approach. It exhibits a high degree of flexibility in adapting to various datasets and encoding strategies. ADAPT efficiently optimizes parameterized quantum circuits, enabling them to tackle complex classification tasks. It demonstrates the potential to achieve high accuracy, often reaching 100% accuracy on both training and testing datasets, albeit with variations depending on factors such as encode strategy, number of encode layers and dataset characteristics. The algorithm’s sensitivity to these factors highlights the importance of effective encoding techniques and the potential for optimizing quantum circuits to solve classification problems. The operator pool used 53
0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training Standard RotoSelect ADAPT (a) Linear 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training Standard RotoSelect ADAPT (b) Full Figure 51: Comparison of Three Algorithms: Standard, Rotoselect, and ADAPT with Two Encode Layers and One Ansatz Layer (These curves were sampled). 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training Standard RotoSelect ADAPT (a) Linear 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training Standard RotoSelect ADAPT (b) Full Figure 52: Comparison of Three Algorithms: Standard, Rotoselect, and ADAPT with Two Encode Layers and Two Ansatz Layers (These curves were sampled). 6.4 Summary In this section, we provide a summarized comparative analysis of three quantum machine learning algorithms: RotoSelect, ADAPT, and the conventional (Standard) Variational Quantum Classifier (VQC). The main objective is to assess strengths and weaknesses across different datasets and problem dimensions. The key findings are as follows: Two-Qubit Systems • RotoSelect and ADAPT outperformed the Standard VQC, particularly when employing a single en60
code layer; • Even with fewer parameters, the adaptive algorithms achieved equivalent or superior accuracy compared to the Standard VQC, demonstrating their potential to reduce circuit depth. Three-Qubit Systems • The choice of entanglement strategy significantly affected algorithm performance, showing the main advantage of the ADAPT algorithm; • In scenarios with a single ansatz layer, the Standard VQC outperformed ADAPT for linear entanglement, while ADAPT excelled with full entanglement; • With two ansatz layers, both adaptive algorithms surpassed the Standard VQC, especially for full entanglement. Four-Qubit Systems • The adaptive algorithms consistently outperformed or achieved comparable performance to the Standard VQC, regardless of the entanglement strategy; • The adaptive algorithms excelled in scenarios with fewer ansatz layers and multiple encode layers, emphasizing their effectiveness in specific contexts. Overall, the adaptive algorithms demonstrated their potential to improve classifier performance, especially in reducing circuit depth. However, their performance varied depending on problem characteristics, such as the choice of encoding strategy, entanglement strategy, and the number of ansatz and encode layers. These findings highlight the complexity of quantum machine learning and the need for tailored approaches based on specific problem requirements. 61
Chapter 7 Conclusions and future work 7.1 Conclusions In this comprehensive exploration of quantum machine learning algorithms, the investigation into the performance and behavior of two adaptive algorithms, ADAPT and RotoSelect, in comparison to the conventional Variational Quantum Classifier (VQC) has yielded several key conclusions and insights: 1. Promise of Adaptive Algorithms: Both ADAPT and RotoSelect algorithms have demonstrated potential in adapting and optimizing quantum circuits for classification tasks. They exhibit competitive performance across diverse experiments, highlighting their viability in quantum machine learning; 2. Hyperparameter Sensitivity: The performance of adaptive algorithms is notably sensitive to hyperparameter settings, including the number of encode repetitions and ansatz repetitions. Finetuning these parameters proves crucial for achieving optimal results; 3. Encoding Strategy Impact: The selection of an encoding strategy significantly influences algorithm performance. While angle-based encoding generally proves effective, the performance of the ”IQPEmbedding” encoding varies depending on the dataset and algorithm. Understanding dataset characteristics is essential for choosing the appropriate encoding strategy; 4. Relevance of Entanglement Strategies: The choice of entanglement strategy within an ansatz circuit has a substantial impact on the performance of adaptive algorithms. Different strategies, such as linear and full entanglement, exhibit distinct effects on algorithm convergence and accuracy; 5. Reduced Circuit Complexity: Adaptive algorithms excel in delivering accurate results with reduced circuit depth and fewer parameters compared to the conventional VQC. This aligns with their primary objective of compressing quantum circuits; 62
6. Competitive Performance: Adaptive algorithms frequently outperform the conventional VQC, particularly in scenarios featuring linear entanglement. However, under specific conditions, the Standard VQC algorithm may demonstrate superior performance; 7. Complexity of Quantum Machine Learning: The findings underscore the intricate nature of quantum machine learning. There is no one-size-fits-all algorithm; instead, the approach must be tailored to the specific problem; 8. Potential for Hybrid Approaches: Combining the strengths of both adaptive algorithms may pave the way for hybrid algorithms that leverage both approaches, potentially enhancing overall performance; 9. Future Research Directions: Further research is warranted to refine and optimize adaptive algorithms for quantum classification tasks. Exploring additional datasets and problem domains will provide a more comprehensive understanding of their capabilities and limitations. In summary, this study contributes some insights to the field of adaptive approaches for quantum machine learning. It underscores the potential of adaptive algorithms while emphasizing the significance of meticulous hyperparameter tuning and the selection of an appropriate encoding strategy. As quantum computing technology advances, these algorithms may play a pivotal role in harnessing quantum computers’ power for practical machine learning applications. 7.2 Prospect for future work As the field of quantum machine learning continues to evolve, there remains a significant scope for enhancing the performance and versatility of adaptive quantum algorithms. In this section, we outline potential avenues for future research and development, focusing on two promising algorithms: RotoSelect and ADAPT. These algorithms have shown promise in simplifying quantum circuit designs and improving classification accuracy, but further advancements are needed to fully unlock their potential. RotoSelect: 1. Circuit Structure Variations: An intriguing direction for future research involves exploring innovative methods to introduce greater flexibility into the circuit structure. By developing techniques that enable dynamic modifications to the circuit topology during the optimization process, researchers could adapt the quantum circuit to the complexity of specific problems, potentially reducing the need for manual hyperparameter tuning; 63
2. Dynamic Entanglement Strategies: Exploring the adaptability of entanglement strategies represents a pivotal area for future research. Developing strategies that dynamically adjust the level of entanglement based on specific problem characteristics could lead to the creation of more efficient quantum circuits suitable for a broader spectrum of problems. Notably, algorithms like ADAPT and VAns already possess the capacity to introduce entanglement, and in the case of the VAns algorithm, even remove it. This adaptability paves the way for versatile and problem-tailored quantum solutions [1,7]. 3. Gates’ Limitations: One of the most significant drawbacks of the Rotoselect algorithm is its reliance on specific entanglement strategies. To enhance this algorithm and enable it to tailor ansatz structures more effectively for individual problems, granting it greater control over circuit entanglement is essential; 4. Advanced Cost Function Optimization: To further enhance the algorithm’s efficiency, researchers could delve into advanced approaches for optimizing the cost function directly. By developing quantum-native optimization techniques tailored to the specific cost functions encountered in quantum machine learning, it may be possible to achieve more accurate and reliable results. ADAPT: 1. Operator Generation Methods: Innovations in operator generation are crucial for ADAPT’s continued development. Researchers can investigate techniques that dynamically construct operators based on the current quantum state, training data, or optimization progress. These approaches have the potential to create more efficient and expressive operator sets; 2. Efficient Operator Pools: An intriguing avenue for future research involves expanding the scope of operators employed by ADAPT. By introducing diverse pools of operators, such as higher-order or custom-defined operators, researchers can bolster the algorithm’s capacity for expression and classification. This enhancement enables the algorithm to tackle an even broader spectrum of problems. Additionally, exploring optimized methods for selecting these operators is imperative, especially when dealing with large-scale systems, as exhaustive searches are computationally impractical. 3. Improved Parameter Optimization: The optimization of parameters is a critical aspect of ADAPT. Future work should focus on identifying and implementing more robust and efficient opti64
mization algorithms. These enhancements aim to reduce the parameter optimization fluctuations observed in previous results, ensuring more stable convergence and improved accuracy; 4. Ansatz Customization: To tailor the ansatz more effectively, research efforts can be directed toward methods that automatically remove unnecessary gates or adjust the circuit structure during the optimization process. These adaptive strategies seek to strike a balance between performance and resource efficiency. Numerous opportunities for enhancement remain, particularly in harnessing the adaptive capabilities to construct the encoding block. This is significant as the encoding block’s role in shaping the classification algorithms’ performance has become increasingly evident. In summary, the future work outlined here underscores the commitment to advancing the capabilities of RotoSelect and ADAPT. These algorithms hold some promise in the quantum machine learning landscape, and ongoing research and development efforts are poised to unlock their full potential. As quantum computing technology matures, these enhancements can play a pivotal role in harnessing its power to solve complex real-world problems. 65
Bibliography [1] M. Cerezo, Andrew Arrasmith, Ryan Babbush, Simon C. Benjamin, Suguru Endo, Keisuke Fujii, Jarrod R. McClean, Kosuke Mitarai, Xiao Yuan, Lukasz Cincio, and Patrick J. Coles. Variational Quantum Algorithms. Nat Rev Phys , 3(9):625–644, September 2021. arXiv:2012.09265 [quant-ph, stat]. [2] Angus Lowe. Quantum circuit structure learning. https://pennylane.ai/qml/demos/ tutorial_rotoselect, 09 2019. Date Accessed: 2023-05-11. [3] Alex Wilkins. Quantum computers proved to have ‘quantum advantage’ on some tasks, 2022. [4] Shor IBM. Shor’s algorithm, 2022. [5] Jacob Biamonte, Peter Wittek, Nicola Pancotti, Patrick Rebentrost, Nathan Wiebe, and Seth Lloyd. Quantum machine learning. Nature , 549(7671):195–202, September 2017. Number: 7671 Publisher: Nature Publishing Group. [6] John Preskill. Quantum Computing in the NISQ era and beyond. Quantum , 2:79, August 2018. arXiv:1801.00862 [cond-mat, physics:quant-ph]. [7] Harper R. Grimsley, George S. Barron, Edwin Barnes, Sophia E. Economou, and Nicholas J. Mayhall. ADAPT-VQE is insensitive to rough parameter landscapes and barren plateaus, April 2022. arXiv:2204.07179 [physics, physics:quant-ph]. [8] PennyLane. Variational circuits — PennyLane, 2022. [9] Ying Li and Simon C. Benjamin. Efficient Variational Quantum Simulator Incorporating Active Error Minimization. Phys. Rev. X , 7(2):021050, June 2017. Publisher: American Physical Society. [10] QAOA Qiskit. Solving combinatorial optimization problems using QAOA. 66
[11] Danyal Maheshwari, Daniel Sierra-Sosa, and Begonya Garcia-Zapirain. Variational Quantum Classifier for Binary Classification: Real vs Synthetic Dataset. IEEE Access , 10:3705–3715, 2022. Conference Name: IEEE Access. [12] M. Bilkis, M. Cerezo, Guillaume Verdon, Patrick J. Coles, and Lukasz Cincio. A semi-agnostic ansatz with variable structure for quantum machine learning, January 2022. arXiv:2103.06712 [quant-ph, stat]. [13] Ying Fang, Zhaofei Yu, and Feng Chen. Noise Helps Optimization Escape From Saddle Points in the Synaptic Plasticity. Front Neurosci , 14:343, April 2020. [14] Abhinav Kandala, Antonio Mezzacapo, Kristan Temme, Maika Takita, Markus Brink, Jerry M. Chow, and Jay M. Gambetta. Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature , 549(7671):242–246, September 2017. Number: 7671 Publisher: Nature Publishing Group. [15] Yuxuan Du, Zhuozhuo Tu, Xiao Yuan, and Dacheng Tao. Efficient measure for the expressivity of variational quantum algorithms. Phys. Rev. Lett. , 128(8):080506, February 2022. arXiv:2104.09961 [quant-ph]. [16] Martin Larocca, Nathan Ju, Diego García-Martín, Patrick J. Coles, and M. Cerezo. Theory of overparametrization in quantum neural networks, September 2021. arXiv:2109.11676 [quant-ph, stat]. [17] Yanzhu Chen, Linghua Zhu, Chenxu Liu, Nicholas J. Mayhall, Edwin Barnes, and Sophia E. Economou. How Much Entanglement Do Quantum Optimization Algorithms Require?, May 2022. arXiv:2205.12283 [quant-ph]. [18] Ho Lun Tang, V.O. Shkolnikov, George S. Barron, Harper R. Grimsley, Nicholas J. Mayhall, Edwin Barnes, and Sophia E. Economou. Qubit-ADAPT-VQE: An Adaptive Algorithm for Constructing Hardware-Efficient Ans\”atze on a Quantum Processor. PRX Quantum , 2(2):020310, April 2021. Publisher: American Physical Society. [19] Panagiotis G. Anastasiou, Yanzhu Chen, Nicholas J. Mayhall, Edwin Barnes, and Sophia E. Economou. TETRIS-ADAPT-VQE: An adaptive algorithm that yields shallower, denser circuit ans\”atze, September 2022. arXiv:2209.10562 [quant-ph]. 67
[20] Linghua Zhu, Ho Lun Tang, George S. Barron, F. A. Calderon-Vargas, Nicholas J. Mayhall, Edwin Barnes, and Sophia E. Economou. An adaptive quantum approximate optimization algorithm for solving combinatorial problems on a quantum computer, July 2022. arXiv:2005.10258 [quant-ph]. [21] Jiahao Yao, Haoya Li, Marin Bukov, Lin Lin, and Lexing Ying. Monte Carlo Tree Search based Hybrid Optimization of Variational Quantum Circuits. In Proceedings of Mathematical and Scientific Machine Learning , pages 49–64. PMLR, September 2022. ISSN: 2640-3498. [22] VQE Qiskit. Simulating Molecules using VQE. [23] Mark Lewis and Fred Glover. Quadratic Unconstrained Binary Optimization Problem Preprocessing: Theory and Empirical Analysis, May 2017. arXiv:1705.09844 [cs]. [24] Mateusz Ostaszewski, Edward Grant, and Marcello Benedetti. Structure optimization for parameterized quantum circuits, January 2021. arXiv:1905.09692 [quant-ph]. [25] Hugh G. A. Burton, Daniel Marti-Dafcik, David P. Tew, and David J. Wales. Exact electronic states with shallow quantum circuits through global optimisation, June 2022. arXiv:2207.00085 [physics, physics:quant-ph]. [26] Quantum circuit structure learning — PennyLane, 2022. [27] Qiskit Development Team. Qiskit machine learning ad hoc data, 2018. Date Accessed: 2023-01-24. [28] David A. Meyer and Nolan R. Wallach. Global entanglement in multiparticle systems. Journal of Mathematical Physics , 43(9):4273–4278, aug 2002. [29] M. Schuld and F. Petruccione. Machine Learning with Quantum Computers . Quantum Science and Technology. Springer International Publishing, 2021. [30] J.C. Spall. Implementation of the simultaneous perturbation algorithm for stochastic optimization. IEEE Transactions on Aerospace and Electronic Systems , 34(3):817–823, 1998. 68
Appendix A Support work A.1 Rotoselect A.1.1 Four-Qubit Systems AngleEmbedding Encode 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (a) Linear Entanglement 0 20 40 60 80 100 Percentage of Completion 0 20 40 60 80 100 Accuracy Testing Dataset Accuracy Evolution During Training A1 A2 A3 A4 A5 A6 A7 (b) Full Entanglement Figure 53: omparison of Quantum Circuits with Different Numbers of Ansatz Layers (A1-A7), with normalized curves, using angle-based encoding. Both Figure 53a and 53b clearly demonstrate the algorithm’s ability to rapidly achieve 100% accuracy shortly after initialization, regardless of the number of parameters. This outcome underscores the algorithm’s proficiency in achieving high performance with shallower ansatz structures, aligning with its objective of minimizing ansatz depth. Notably, the entanglement strategy appears to have minimal impact on the algorithm’s performance. A.2 ADAPT A.2.1 Four-Qubit Systems AngleEmbedding Encode As depicted in figure 54a, the ADAPT algorithm effectively resolves the problem using a minimal parameter count of only three, achieving a perfect accuracy rate of 100% for both the training and testing datasets. 69
A.4.2 Circuit Analysis: Three Qubits 0 1 2 RZ RZ RZ RZ RY RZ RX RY RY RY RY RY (a) Linear 0 1 2 RZ RX RZ RZ RX RX RZ RY RY RY RX RY (b) Full Figure 65: Antazes Generated by the Rotoselect Algorithm for a Single Ansatz Layer with Different Entanglement Strategies 0 1 2 RX RY RX RX RX RZ RY RZ RX RX RY RZ RY RY RY RX RY RY (a) Linear 0 1 2 RX RX RZ RX RZ RY RX RY RX RX RZ RX RY RY RZ RY RY RY (b) Full Figure 66: Antazes Generated by the Rotoselect Algorithm for Two Ansatz Layers with Different Entanglement Strategies 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (a) Linear 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (b) Full Figure 67: Anstaz used by the Standard VQC version for a Single Encode and Anstaz Layer with Different Entanglement Strategies 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (a) Linear 0 1 2 RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ RY RY RY RZ RZ RZ (b) Full Figure 68: Anstaz used by the Standard VQC version for a Single Encode and Two Anstaz Layers with Different Entanglement Strategies 76
0 1 2 I RX I RZ I I RX I RX RZ I RX RX RZ RX I RX RZ I RX I RX RZ I RX I RX RZ RX I I RX RZ I RX RX RZ RX I RX I RZ I I RX RX I RZ RX I Figure 69: Antazes Generated by the ADAPT Algorithm 77
A.4.3 Circuit Analysis: Four Qubits 0 1 2 3 RZ RX RZ RX RY RX RY RY RY RY RY RY RX RX RY RX (a) Linear 0 1 2 3 RZ RX RZ RX RY RY RZ RZ RZ RY RX RY RY RX RY RY (b) Full Figure 70: Antazes Generated by the Rotoselect Algorithm for a Single Encode and Anstaz Layer with Different Entanglement Strategies 0 1 2 3 RY RY RY RX RX RY RZ RY RY RY RY RY RZ RY RX RX RY RY RY RZ RX RX RX RY (a) Linear 0 1 2 3 RY RY RY RY RX RX RX RX RY RZ RY RY RZ RZ RX RZ RY RY RX RX RX RY RX RY (b) Full Figure 71: Antazes Generated by the Rotoselect Algorithm for a Single Encode Layer and Two Anstaz Layers with Different Entanglement Strategies 0 1 2 3 RX RZ RX RY RZ RY RY RX RX RX RY RY RX RY RX RY (a) Linear 0 1 2 3 RX RX RZ RY RX RZ RX RY RY RX RX RY RY RX RX RY (b) Full Figure 72: Antazes Generated by the Rotoselect Algorithm for Two Encode and a Single Anstaz Layer with Different Entanglement Strategies 0 1 2 3 RX RZ RY RX RZ RZ RY RY RY RX RY RX RX RY RY RY RY RY RY RY RY RX RX RY (a) Linear 0 1 2 3 RX RY RZ RX RY RZ RY RY RZ RY RZ RZ RY RZ RZ RY RY RX RX RX RX RY RX RY (b) Full Figure 73: Antazes Generated by the Rotoselect Algorithm for Two Encode Layers and Two Anstaz Layers with Different Entanglement Strategies
0 1 2 3 RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ (a) Linear 0 1 2 3 RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ (b) Full Figure 74: Anstaz used by the Standard VQC version for a Single Encode and Anstaz Layer with Different Entanglement Strategies 0 1 2 3 RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ (a) Linear 0 1 2 3 RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ RY RY RY RY RZ RZ RZ RZ (b) Full Figure 75: Anstaz used by the Standard VQC version for a Single Encode and Two Anstaz Layers with Different Entanglement Strategies
0 1 2 3 I RX I RZ RX I I I H I I RZ H I I I RX H H RZ H H RX RX RX H RZ H RX RX H RX H RZ H H RX RX RX H I RZ I H RX RX RX RX RX RZ RX RX RX I I RX RZ RX I I RX H RX RZ RX H RX H I I RZ H I I (a) One Encode Layer 0 1 2 3 H I I I RZ I I H I I RX I RZ I I RX RX H RX I RZ I H RX RX H I I RZ I I H H RZ H H I I I RZ I H I I H H I H RZ I H H H H RX RX RZ RX H RX H RX H RZ RX H H RX H H RZ H RX H (b) Two Encode Layers Figure 76: Antazes Generated by the ADAPT Algorithm