Quantum computer-oriented evolutionary quantum architecture search method
By optimizing the quantum neural network structure using an adaptive binary tournament selection algorithm and an adaptive double-threshold small-angle pruning method, the problem of information discrepancies between offspring and parents in quantum architecture search is solved, resulting in a more efficient and reliable quantum architecture design suitable for resource-constrained quantum computing devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing quantum architecture search methods suffer from significant information differences between offspring and parents, leading to slower convergence speeds and longer evolution times. Furthermore, existing evolutionary algorithms struggle to accurately assess the potential of quantum neural network architectures, resulting in insufficient search efficiency and accuracy.
An adaptive binary tournament selection algorithm, an inheritable mutation algorithm, and an adaptive double-threshold small-angle pruning method are employed. By dynamically adjusting the elite ratio and mutation position, combined with quantum architecture search technology, the quantum neural network structure is optimized, reducing the number of quantum logic gates and circuit depth.
It improves the accuracy and robustness of quantum architecture design, reduces the number of quantum logic gates, is suitable for resource-constrained, noisy, medium-scale quantum devices, and enhances search efficiency and accuracy.
Smart Images

Figure CN121660120A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum machine technology, and in particular to an evolutionary quantum architecture search method for quantum computers. Background Technology
[0002] With the development of deep learning, neural networks are increasingly being used in computer vision. Numerous models, such as AlexNet, ResNet, U-Net, and YOLO, have demonstrated impressive performance in image processing tasks. However, the "black box" nature of feature extraction and inference processes in neural networks complicates the design of efficient network architectures, thus driving the rise of neural network architecture search techniques.
[0003] In the field of quantum computing, the principle of quantum superposition is often used to achieve parallel data processing, providing efficient computational resources for traditional neural network computing. Researchers have designed quantum neural networks by combining qubits and quantum logic gates; these, as an extension of quantum machine learning, are also known as variable quantum algorithms. Variable quantum algorithms are widely used in tasks such as quantum chemistry and quantum machine learning. However, the performance of variable quantum algorithms is greatly influenced by the parameterized quantum architecture structure. A parameterized quantum architecture consists of various quantum logic gates, and different combinations of quantum architectures produce significantly different results for the algorithm. Therefore, inspired by neural network architecture search, researchers have attempted to apply similar methods to the design of quantum architectures.
[0004] Recently, quantum architecture search has been used to automate the search for optimal parameter circuits and is applied to variational quantum algorithms. Quantum architecture search can be broadly categorized into three types based on search strategies: gradient-based methods, reinforcement learning-based methods, and evolutionary algorithms. On the one hand, gradient-based methods perform well with simple data, but they are prone to getting trapped in local optima. On the other hand, while reinforcement learning-based methods address the problem of getting trapped in local optima, the large sample size required for architecture search leads to enormous computational resource consumption. Furthermore, policy instability during training can cause significant training fluctuations. In contrast, evolutionary algorithms can effectively address these difficulties. By simulating the natural selection process, evolutionary algorithms can effectively avoid getting trapped in local optima. Moreover, the population exhibits natural parallelism during evolution, allowing the algorithm to fully utilize computational resources and accelerate the search process.
[0005] While evolutionary quantum neural network architecture search algorithms can identify superior quantum architectures for various applications, these algorithms typically employ binary tournament selection or roulette wheel selection to determine which individuals advance to the next generation. Furthermore, most existing evolutionary quantum architecture search algorithms generate new generations of architectures solely through mutation or crossover operations, leading to significant differences between the new generation and its parent generations.
[0006] In quantum evolutionary algorithms, selection is used to identify highly fit individuals to promote the inheritance of superior genes. However, due to the large number of individuals in a quantum population, it is impossible to adequately train all individuals, making it difficult to accurately assess architectural potential during the evaluation phase. Therefore, it is necessary to explore more effective offspring selection strategies to ensure that better architectural models are ultimately chosen.
[0007] Most existing evolutionary quantum architecture search strategies rely on traditional mutation mechanisms, leading to significant information differences between offspring and parent structures. This can slow down population convergence and require a longer evolutionary time to obtain a network structure with ideal performance. Therefore, achieving an effective balance between offspring updates and parent information inheritance is a key challenge for improving algorithm efficiency and convergence.
[0008] Therefore, there is an urgent need to propose an efficient and robust evolutionary quantum architecture search method that can achieve optimal quantum architecture design with fewer quantum logic gates under specific tasks. Simultaneously, this method should effectively alleviate the information inconsistency problem between offspring and parent architectures, thereby significantly improving the efficiency and accuracy of quantum architecture search and providing a competitive solution for the structural optimization of quantum neural networks. Summary of the Invention
[0009] The purpose of this invention is to provide an evolutionary quantum architecture search method for quantum computers, so as to achieve a more efficient and reliable automated design process for quantum architectures.
[0010] The present invention solves the above-mentioned technical problems through the following technical solutions. An evolutionary quantum architecture search method for quantum computers, characterized by comprising the following steps: S1. Determine the search space in single quantum gate and double quantum gate according to different image datasets. Based on the search space, randomly initialize several quantum chromosomes, each quantum chromosome corresponding to a quantum architecture. S2. Quantize and encode the image data, and correlate the image information in the form of quantum state tensor products; S3. Before the model training phase, all quantum architectures to be trained need to be decoded into their corresponding quantum architectures. Then, the training rounds are evaluated for each decoded quantum architecture, and the training results of each quantum architecture are saved for subsequent iterations of the evolutionary algorithm. S4. Repeat steps S5 to S11 until the specified number of iterations is reached. S5. Repeat steps S6 to S10 until the number of offspring is not less than the set value. S6. During the iteration process of the evolutionary algorithm, the proportion of elites in each generation is calculated first. This proportion increases linearly during the evolution process. S7, Quantum Architecture Elite Collection From the top of fitness ranking These individuals are composed of several parts and are directly added to the mating pool. In this context, the fitness ranking is from highest to lowest. S8. Randomly select two individuals from the remaining individuals and compare their fitness. The individual with higher fitness is directly added to the mating pool. Repeat this step until the mating pool is reached. Once full, proceed to the next step; S9. Perform an elite crossover strategy on individuals in the mating pool to obtain new offspring individuals and add them to the offspring population; S10. Perform heritable mutation operations on individuals in the mating pool and determine the mutation location by traversing the structural information of the parental architecture; S11. Decode the elite offspring into corresponding quantum architectures. Evaluate the quantum architectures in each training round and save the training results of each quantum architecture for subsequent iterations of the evolutionary algorithm. S12. After reaching the specified number of iterations, return the individual with the highest fitness as the optimal individual, and perform rounds of training and parameter adjustment on the quantum architecture corresponding to the individual on the current dataset. During the training process, insert an adaptive double-threshold small-angle pruning method with an intermittent strategy: trigger an iteration of the adaptive double-threshold small-angle pruning method every time a preset interval of rounds is reached and the system enters a plateau.
[0011] Preferably, step S6, calculating the elite ratio for each generation, includes: in, , For the maximum number of generations, the th The proportion of elites in the generation is , It is the minimum of all elite proportions. This is the maximum value among all elite proportions.
[0012] Preferably, based on the elite ratio, the number of elites in the g-th generation. The calculation formula is as follows: ; in Indicates the population size.
[0013] Preferably, step S9 includes: S9.1, when two parents have the same gene at the same position, copy all the same gene to the corresponding position in the offspring; S9.2, for the unassigned position in the offspring, without gene conflict with the parents, randomly and uniformly select one gene from the genes at that position in the two parents for copying; repeat the operations from S9.1 to S9.2 to generate several offspring.
[0014] Preferably, the formula for selecting the mutation site in S10 is as follows: in This can be derived from the following formula: The above formula is used to determine the two parents. and Index of differences in gene values ,middle The architecture encoding position i for parent p, The architecture encoding position i of parent e.
[0015] Preferably, the adaptive dual-threshold small-angle pruning method includes: Each revolving door has a set local threshold. It consists of the following weighting terms: in Indicates the first Bit, Indicates the first layer, For a batch size The k-th layer estimates the gradient magnitude of the gate with respect to the loss function. In terms of qubits Noise on the surface, To advance with training rounds The coefficient that is slowly increasing, among which And satisfy .
[0016] Preferably, internal and external thresholds are set. ,when When it is directly judged as 0, among which From the perspective of quantum logic gates; when Enter the candidate zone; if it has been in the candidate zone for the past K rounds, delete it; when... Then retain it.
[0017] Preferably, step S12 further includes: after each adaptive dual-threshold small-angle pruning method, using a learning rate Short-range fine-tuning, among which ,conduct The system performs fine-tuning, followed by evaluating task metrics on a validation set. If the metrics do not deteriorate or improve, the structural change is retained; if the metrics deteriorate beyond a threshold, the most recent change is rolled back and the system is tightened accordingly. The final circuit structure and its parameters are output as the optimal quantum architecture for the current dataset. At the same time, statistical indicators are given: total number of gates, number of two quantum gates and test set indicators, which are used to verify the performance comparison.
[0018] Preferably, in step S11, before the quantum architecture undergoes rounds of training and parameter adjustment, the individual with the highest fitness obtained in the evolutionary stage is decoded into a quantum architecture, and its corresponding parameters are loaded as the initial parameters for training and parameter adjustment.
[0019] This invention combines an adaptive binary tournament selection algorithm, an inheritable mutation algorithm, and an adaptive double-threshold small-angle pruning method to efficiently optimize quantum neural network structures using quantum architecture search technology. During iterative evolution, high-fitness and high-potential structures are dynamically preserved, mitigating the difficulty of architecture selection caused by insufficient early training. Simultaneously, by traversing and inheriting parental structural information, mutation locations are precisely determined, reducing the structural information differences between offspring and parent architectures and accelerating model convergence. In the final training stage, the adaptive double-threshold small-angle pruning method dynamically sets angle thresholds to precisely eliminate redundant small-angle operations with minimal impact on circuit performance, further reducing the number of quantum logic gates and circuit depth. This method not only improves the accuracy and robustness of quantum architecture design but also reduces the number of quantum logic gates, making it particularly suitable for resource-constrained noisy medium-scale quantum (NISQ) devices. This framework is widely applicable to tasks such as image classification, and is especially suitable for quantum machine learning applications that require a balance between efficiency and performance. Attached Figure Description
[0020] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only one embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a comparison chart of the accuracy of the method of this invention and the classic model on four datasets; Figure 2 This is a comparison chart of the classification accuracy of the method of this invention with other search methods on four datasets for a single category pair; Figure 3This is a comparison chart of the classification accuracy of the method of this invention with other search methods on CIFAR10 for multiple category pairs; Figure 4 This is a comparison chart of the classification accuracy of the method of this invention with other search methods on CIFAR100 for multiple category pairs; Figure 5 This is a comparison chart of the classification accuracy of the method of this invention with other search methods on multiple category pairs in Fashion-MNIST; Figure 6 This is a comparison chart of the classification accuracy of the method of this invention with other search methods on MNIST for multiple category pairs.
[0022] Figure 7 This is a comparison chart of the number of quantum logic gates in the method of this invention, the classical model, and other search methods on four datasets. Detailed Implementation
[0023] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention. Furthermore, the accompanying drawings of the present invention are merely simple illustrations and are intended to be understood beforehand. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention.
[0024] Example 1: This example provides an evolutionary quantum architecture search method for quantum computers, characterized by the following steps: S1. Determine the search space in single quantum gate and double quantum gate according to different image datasets. Based on the search space, randomly initialize several quantum chromosomes, each quantum chromosome corresponding to a quantum architecture. S2. Quantize and encode the image data, and correlate the image information in the form of quantum state tensor products; S3. Before the model training phase, all quantum chromosomes to be trained need to be decoded into corresponding quantum architectures. Then, the training rounds are evaluated for each decoded quantum architecture, and the training results of each quantum architecture are saved for subsequent iterations of the evolutionary algorithm. The training rounds are a relatively small number of rounds for fine-tuning the parameters in the later stages, preferably 3 epochs.
[0025] S4. Repeat steps S5 to S11 until the specified number of iterations is reached. S5. Repeat steps S6 to S10 until the number of offspring is not less than the set value. S6. During the iteration process of the evolutionary algorithm, the proportion of elites in each generation is calculated first. This proportion increases linearly during the evolution process. S7, Quantum Architecture Elite Collection From the top of fitness ranking These individuals are composed of several parts and are directly added to the mating pool. In this context, the fitness ranking is from highest to lowest. S8. Randomly select two individuals from the remaining individuals and compare their fitness. The individual with higher fitness is directly added to the mating pool. Repeat this step until the mating pool is reached. Once full, proceed to the next step; S9. Perform an elite crossover strategy on individuals in the mating pool to obtain new offspring individuals and add them to the offspring population; S10. Perform heritable mutation operations on individuals in the mating pool and determine the mutation location by traversing the structural information of the parental architecture; S11. Decode the elite offspring into corresponding quantum architectures. Evaluate the quantum architectures in each training round and save the training results of each quantum architecture for subsequent iterations of the evolutionary algorithm. S12. After reaching the specified number of iterations, return the individual with the highest fitness as the optimal individual, and perform epoch training and parameter tuning on the quantum architecture corresponding to that individual on the current dataset. During the training process, an adaptive double-threshold small-angle pruning method is intermittently inserted: an adaptive double-threshold small-angle pruning method iteration is triggered every time a preset epoch interval is reached and a plateau is formed. The number of training and parameter tuning epochs in step S12 is more than the number of training epochs in step S3, preferably 200-400 epochs.
[0026] The combination of S7 and S8 constitutes the adaptive binary bidding selection algorithm of this invention. S7 selects a suitable number of elite architectures. S8 randomly selects two architectures from the remaining population for comparison, choosing the one with higher fitness to enter the mating pool. S7 in the algorithm ensures that architectures with high fitness are selected, while S8 ensures that architectures with high potential enter the mating pool.
[0027] Preferably, step S6, calculating the elite ratio for each generation, includes: in, , For the maximum number of generations, the th The proportion of elites in the generation is , It is the minimum of all elite proportions. This is the maximum value among all elite proportions.
[0028] Preferred, based on the proportion of elites, the first Number of elites in a generation The calculation formula is as follows: ; in This represents the population size, rounded up.
[0029] In step S7, the individuals are directly added to the mating pool. In, that is: , Indicates the current generation of the population. Let i represent the i-th individual. express fitness function, express The ranking.
[0030] Preferably, step S9 includes: S9.1, when two parents have the same gene at the same position, copy all the same gene to the corresponding position in the offspring; S9.2, for the unassigned position in the offspring, without gene conflict with the parents, randomly and uniformly select one gene from the genes at that position in the two parents for copying; repeat the operations from S8.1 to S8.2 to generate several offspring.
[0031] In step S10, when two parents have the same gene at the same location, that is... ,in and These are the values of the two parents at position i, respectively. All identical genes are copied to the corresponding positions in the offspring.
[0032] Preferably, the formula for selecting the mutation site in step S10 is as follows: in This can be derived from the following formula: The above mutation information formula is used to determine the mutation information of two parents. and Index of differences in gene values ,middle The architecture encoding position i for parent p, The architecture encoding position i of parent e.
[0033] Mutations are made only at these locations where differences exist, thus preserving the shared genetic information of the parents while introducing new variations. Elite offspring are then selected.
[0034] This embodiment constructs a search space using different quantum logic gates for different image datasets; it initializes a candidate set of quantum gate combinations in the search space to generate circuit structure feature codes; it evaluates the initialized candidate set on the dataset to obtain the fitness ranking of each quantum gate combination on the current image processing task; it dynamically adjusts the proportion of elites using an adaptive binary bidding selection algorithm, prioritizing the retention of high-potential and high-fitness architectures to fill the mating pool; and it employs an inheritable mutation algorithm to perform targeted mutations at different sites while maintaining the continuity of parental structural information, thereby accelerating convergence and improving population diversity.
[0035] Example 2: This example should be understood as including at least all the features of any of the foregoing examples, and further improving upon them; Preferably, the adaptive dual-threshold small-angle pruning method includes: Each revolving door has a set local threshold. It consists of the following weighting terms: in Indicates the first Bit, Indicates the first layer, For a batch size The k-th layer estimates the gradient magnitude of the gate with respect to the loss function. In terms of qubits Noise on the surface, To advance with training rounds The coefficient that is slowly increasing, among which And satisfy In the early stages of training, it's necessary to retain the more effective quantum gates and increase their sensitivity. In the later stages of training, as gradients generally decrease, the noise weights are appropriately increased. and scheduling weight In the early stages of training, the focus should be on parameter sensitivity. To retain quantum gates that contribute significantly to the task, therefore... Increase the weights appropriately; here, in the later stages of training, since the overall gradient decreases, further increase the weights of noise and scheduling. That is, increase the intensity in the early stages of training. , Randomly adjust the values so that the sum of the three is 1, during the later stages of training. Unchanged, increased The goal is to make the sum of the three equal to 1.
[0036] In step S12, the individual with the highest fitness obtained in the evolutionary stage is decoded into a quantum architecture, and its corresponding parameters are loaded as initial parameters; hyperparameters such as the upper limit of training rounds, learning rate, batch size, early stopping threshold, and the trigger interval of the adaptive double-threshold small-angle pruning method are set.
[0037] The optimal circuit is trained on the current dataset in multiple rounds. During the training process, an adaptive double-threshold small-angle pruning method is inserted in an intermittent manner: the adaptive double-threshold small-angle pruning method is triggered once every time the circuit enters a plateau period after a preset interval.
[0038] Preferably, to avoid repeated additions / deletions due to some logic gates fluctuating around the threshold, internal and external thresholds are set. .when When θ is directly determined to be 0, it is θ = 0, where θ is the angle of the quantum logic gate; when Enter the candidate zone; if it has been in the candidate zone for the past K rounds, delete it; when... If so, keep it. K is the system default value, which can be set by staff based on experience.
[0039] Preferably, step S12 further includes: after each adaptive dual-threshold small-angle pruning method, using a learning rate Short-range fine-tuning, among which ,conduct The system performs fine-tuning, followed by evaluating task metrics on a validation set. If the metrics do not deteriorate or improve, the structural change is retained; if the metrics deteriorate beyond a threshold, the most recent change is rolled back and the system is tightened accordingly. The system outputs the final circuit structure and its parameters as the optimal quantum architecture for the current dataset. It also provides statistical metrics: total number of gates, number of dual quantum gates, and test set metrics to verify performance comparison. The comparison metrics are the relevant standard metrics preset by the system.
[0040] Preferably, in step S11, before the quantum architecture undergoes rounds of training and parameter adjustment, the individual with the highest fitness obtained in the evolutionary stage is decoded into a quantum architecture, and its corresponding parameters are loaded as the initial parameters for training and parameter adjustment.
[0041] In the final stage of training, this embodiment employs an adaptive dual-threshold small-angle pruning method. By dynamically setting angle thresholds, it precisely eliminates redundant small-angle operations that have minimal impact on circuit performance, thereby further reducing the number of quantum logic gates and circuit depth. This not only improves the accuracy and robustness of quantum architecture design but also reduces the number of quantum logic gates, making it particularly suitable for resource-constrained noisy medium-scale quantum (NISQ) devices.
[0042] The experimental platform used in this embodiment of the invention has the following performance characteristics: Intel Xeon Gold 6330 CPU (2.00GHz), 128 GB of memory, and the software environment is Ubuntu 20.04 and Python 3.6.
[0043] Figure 1 The classification accuracy of the proposed method was compared with that of four other classic models on the CIFAR10, CIFAR100, Fashion-MNIST, and MNIST datasets. The horizontal axis represents different models, and the vertical axis represents the classification accuracy of the corresponding method for a single class pair on each dataset. As can be observed from the figure, the proposed method, GEM-QAS, demonstrates superiority on all four datasets, achieving higher classification accuracy compared to the other methods. Specifically, GEM-QAS achieves classification accuracies of 68.75%, 84.82%, 85.16%, and 96.09% on the CIFAR10, CIFAR100, Fashion-MNIST, and MNIST datasets, respectively, with an average improvement exceeding that of other methods by approximately 10%. The other four methods show relatively similar accuracy across different datasets, exhibiting a consistent overall trend and stable performance, but all significantly lower than GEM-QAS. This indicates that the search method proposed in this invention demonstrates good performance advantages and robustness in single-class pair classification tasks across different datasets.
[0044] Figure 2 The figure shows the changes in classification accuracy of the proposed method and four other search methods (RandomSearch, QAS, EQNAS, and QEA-QCNN) on four datasets: CIFAR10, CIFAR100, Fashion-MNIST, and MNIST, as a function of training epochs. The horizontal axis "Epoch" represents the number of training epochs, and the vertical axis "Accuracy" represents the classification accuracy at that epoch. As can be observed from the figure, with the increase of training epochs, the accuracy of the proposed method GEM-QAS quickly reaches a high level and stabilizes, while the performance of the other four benchmark methods fluctuates and improves slowly. This indicates that other methods struggle to effectively improve accuracy or reach a stable state with deeper training. In contrast, the proposed GEM-QAS method consistently demonstrates a certain performance advantage and better stability on all four datasets. Regardless of changes in the dataset or the number of training epochs, this method can quickly achieve higher classification accuracy and maintain stability, demonstrating the superiority and robustness of the proposed method across different datasets.
[0045] Figure 3This paper presents a comparison of the classification accuracy of the proposed method with four other search methods on multiple class pairs in the CIFAR-10 dataset. The horizontal axis represents the different class pairs used in the test (e.g., "Airplane-Automobile", "Automobile-Bird"), and the vertical axis represents the classification accuracy of the corresponding class pairs. Due to differences in image features between classes, the accuracy of various search methods fluctuates significantly across different class pairs. This difference is particularly pronounced in difficult-to-distinguish class pairs such as "Bird-Cat" and "Frog-Horse". Overall, the proposed method demonstrates a significant advantage on multiple class pairs, achieving the highest classification accuracy. This result indicates that the proposed method possesses stronger robustness and better generalization ability, effectively improving the classification performance of complex class pairs.
[0046] Figure 4 This paper compares the classification accuracy of the proposed method with four other search methods on multiple class pairs in the CIFAR-100 dataset. The results show that while there are some differences in accuracy across different class pairs, the overall trend is consistent. The GEM-QAS method consistently outperforms the other methods, with its advantage particularly evident in more difficult-to-distinguish class pairs (such as "Cats-Cups" and "Apple-Oranges"). This indicates that the proposed method exhibits better adaptability and stability when handling fine-grained classification tasks with high class similarity, thereby improving classification accuracy.
[0047] Figure 5This paper presents a comparison of the classification accuracy of the proposed method with four other search methods on multiple different class pairs in the Fashion-MNIST dataset. The horizontal axis represents the selected class pairs used in the tests, including binary classification tasks of varying difficulty such as "T-shirt-Trouser," "Dress-Coat," and "Sandal-Shirt." The vertical axis represents the classification accuracy for the corresponding class pairs. Due to the significant visual differences between categories in Fashion-MNIST, the different methods perform more similarly on some class pairs, such as the "Sneaker-Bag" classification task, where the differences between methods are relatively small. However, in class pairs with relatively large visual differences, such as "T-shirt-Trouser" and "Sandal-Shirt," the performance of each method varies. Overall, the proposed GEM-QAS method consistently achieves the best classification performance, with higher accuracy than the other four search methods on multiple test class pairs. Furthermore, this method demonstrates extremely high stability and advantages in class pairs that are difficult to distinguish, reducing the occurrence of classification errors. In multiple category pairs, the average classification accuracy of the method of this invention is about 9.5% higher than that of the other four search methods, which fully demonstrates its versatility and efficiency in classification tasks of different difficulty.
[0048] Figure 6 This paper presents a comparison of the classification accuracy of the proposed method with four other methods on multiple digit class pairs in the MNIST dataset. The horizontal axis represents the digit class pairs used for classification, such as "0-1", "2-3", "4-5", etc., while the vertical axis represents the classification accuracy for the corresponding class pairs. Observing the experimental results in the figure reveals that although the visual differences between digit classes in the MNIST dataset are significant, the classification performance of each method still exhibits a certain degree of fluctuation and instability, reflected in the changes in the relative rankings of the benchmark methods across different class pairs. However, the proposed GEM-QAS method demonstrates a stable and significant performance advantage across all class pairs, achieving the best classification accuracy for each pair. Especially in highly similar digit class pairs (such as "3-4" and "5-6"), the classification performance advantage of the GEM-QAS method is more prominent, demonstrating its efficient and accurate recognition capability for digit image features. Overall, the proposed method maintains a significantly better performance than other benchmark methods across all test class pairs, demonstrating excellent stability and robustness.
[0049] Figure 7This figure shows the comparison of the number of quantum logic gates required by the proposed method, classical models, and other search methods on four datasets. The horizontal axis represents different datasets, while the vertical axis represents the number of logic gates required by each method. Observing the experimental data in the figure reveals that although the complexity and feature distribution of different datasets vary, the proposed method demonstrates a performance advantage on multiple datasets, requiring fewer logic gates (156, 154, 161, and 147 respectively), highlighting its efficient design characteristics. The advantage of the GEM-QAS method is particularly evident on the CIFAR10 and MNIST datasets, demonstrating its superior resource optimization capabilities. Overall, the proposed method consistently outperforms QCNN and QEA-OCNN on multiple test datasets, showcasing its excellent stability and efficiency.
Claims
1. A method for searching evolutionary quantum architectures for quantum computers, characterized in that, Includes the following steps: S1. Determine the search space in single quantum gate and double quantum gate according to different image datasets. Based on the search space, randomly initialize several quantum chromosomes, each quantum chromosome corresponding to a quantum architecture. S2. Quantize and encode the image data, and correlate the image information in the form of quantum state tensor products; S3. Before the model training phase, decode all the quantum chromosomes to be trained into the corresponding quantum architectures; Subsequently, the training rounds are evaluated for each decoded quantum architecture, and the training results of each quantum architecture are saved for subsequent iterations of the evolutionary algorithm. S4. Repeat steps S5 to S11 until the specified number of iterations is reached. S5. Repeat steps S6 to S10 until the number of offspring is not less than the set value. S6. During the iteration process of the evolutionary algorithm, the proportion of elites in each generation is calculated first. This proportion increases linearly during the evolution process. S7, Quantum Architecture Elite Collection From the top of fitness ranking These individuals are composed of several parts and are directly added to the mating pool. In this context, the fitness ranking is from highest to lowest. S8. Randomly select two individuals from the remaining individuals and compare their fitness. The individual with higher fitness is directly added to the mating pool. Repeat this step until the mating pool is reached. Once full, proceed to the next step; S9. Perform an elite crossover strategy on individuals in the mating pool to obtain new offspring individuals and add them to the offspring population; S10. Perform heritable mutation operations on individuals in the mating pool and determine the mutation location by traversing the structural information of the parental architecture; S11. Decode the elite offspring into corresponding quantum architectures. Evaluate the quantum architectures in each training round and save the training results of each quantum architecture for subsequent iterations of the evolutionary algorithm. S12. After reaching the specified number of iterations, return the individual with the highest fitness as the optimal individual, and perform rounds of training and parameter adjustment on the quantum architecture corresponding to the individual on the current dataset. During the training process, insert an adaptive double-threshold small-angle pruning method with an intermittent strategy: trigger an iteration of the adaptive double-threshold small-angle pruning method every time a preset interval of rounds is reached and the system enters a plateau.
2. The evolutionary quantum architecture search method for quantum computers as described in claim 1, characterized in that, Step S6 calculates the elite ratio for each generation, including: in, , For the maximum number of generations, the th The proportion of elites in the generation is , The minimum of all elite ratios This is the maximum value among all elite proportions.
3. The evolutionary quantum architecture search method for quantum computers as described in claim 2, characterized in that, Based on the proportion of elites, the first Number of elites in a generation The calculation formula is as follows: ;in Indicates the population size.
4. The evolutionary quantum architecture search method for quantum computers as described in claim 2, characterized in that, Step S9 includes: S9.1, when two parents have the same gene at the same position, copy all the same gene to the corresponding position in the offspring; S9.2, for the unassigned position in the offspring, without gene conflict with the parents, randomly and uniformly select one gene from the genes at that position in the two parents for copying; repeat the operations from S9.1 to S9.2 to generate several offspring.
5. The evolutionary quantum architecture search method for quantum computers as described in claim 4, characterized in that, The formula for selecting the mutation site in S10 is as follows: in This can be derived from the following formula: The above formula is used to determine the two parents. and Index of differences in gene values ,in The architecture encoding position i for parent p, The architecture encoding position i is for parent e.
6. The evolutionary quantum architecture search method for quantum computers as described in claim 5, characterized in that, The adaptive dual-threshold small-angle pruning method includes: Each revolving door has a set local threshold. It consists of the following weighting terms: in Indicates the first Bit, Indicates the first layer, For a batch size Bitde The layer estimates the gradient magnitude of the gate with respect to the loss function. In terms of qubits Noise on the surface, To advance with training rounds The coefficient that is slowly increasing, among which And satisfy .
7. The evolutionary quantum architecture search method for quantum computers as described in claim 6, characterized in that, Set internal and external thresholds ,when The time is determined to be 0, where θ is the angle of the quantum logic gate; when Enter the candidate zone; if it has been in the candidate zone for the past K rounds, delete it; when... Then retain it.
8. The evolutionary quantum architecture search method for quantum computers as described in claim 7, characterized in that, Step S11 further includes: after each adaptive double-threshold small-angle pruning method, using a learning rate Short-range regulation, of which ,conduct The pace is then adjusted, and task metrics are evaluated on the validation set. If the metrics do not deteriorate or improve, the current structural change is retained; if the metrics deteriorate beyond a threshold, the most recent change is rolled back, and the pace is tightened accordingly. The final circuit structure and its parameters are output as the optimal quantum architecture for the current dataset. At the same time, statistical indicators are given: total number of gates, number of two quantum gates and test set indicators, which are used to verify the performance comparison.
9. The evolutionary quantum architecture search method for quantum computers as described in claim 8, characterized in that, In step S12, before the quantum architecture undergoes multiple rounds of training and parameter adjustment, the individual with the highest fitness obtained in the evolutionary stage is decoded into a quantum architecture, and its corresponding parameters are loaded as the initial parameters for training and parameter adjustment.