Quantum machine learning using genetic algorithms
Determining the configuration of quantum neural networks through genetic algorithms solves the problem of gradient descent in quantum computers, and realizes efficient and accurate machine learning task processing on quantum computers.
Patent Information
- Application Number
- CN202510132678.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-02-07
- Filing Date
- 2025-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
Traditional machine learning models are difficult to optimize in quantum computers because traditional optimization techniques such as gradient descent are not feasible due to the indifferentiation and probability properties of quantum information. The noise problem of NISQ computers leads to the poor plateau of gradient functions, making it difficult to optimize the objective function to obtain high-precision results.
Genetic algorithms are used to determine the quantum neural network (QNN) configuration, by generating candidate QNN configuration groups, simulate execution and calculate fitness indicators, iterative evolution is performed to identify the target QNN configuration with the highest fitness, and optimize genetic searches in combination with guided features and random sampling.
It provides a feasible and effective QNN configuration method for computing on quantum computers, avoids NIBP-related problems, improves computing efficiency and accuracy, and can handle machine learning tasks in complex problem domains.
Smart Images

Figure CN120449971A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to systems and methods related to machine learning using quantum computers. Background Art
[0002] Traditional machine learning models, such as neural networks, have provided significant advances in the computational power of traditional computers for solving classification or regression problems. By mimicking biological structures and processes in traditional computers, neural networks offer superior accuracy and efficiency.
[0003] Quantum computers exploit the quantum mechanical properties of matter to perform calculations. In quantum computing, information is represented using quantum bits (qubits), which exist in a superposition of ground states. By exploiting the unique properties of quantum information represented by qubits, quantum computers significantly reduce the time complexity of certain computational problems, such as NP-hard problems.
[0004] Machine learning techniques and constructs, such as neural networks, were designed for classical computers and are not easily adaptable to quantum computers. Due to the unique representation of quantum information and the peculiarities of quantum operations, traditional approaches used to optimize neural networks on classical computers, such as backpropagation to perform gradient descent, cannot be easily implemented on quantum computers. For example, some traditional machine learning models incorporate differentiable objective functions to perform regression or classification tasks. The objective function is optimized for a specific context using techniques such as gradient descent. The differentiable nature of the objective function allows optimization techniques such as gradient descent to be applied to traditional machine learning models. While this traditional approach to machine learning works on classical computers, applying the same approach to quantum computers is technically infeasible due to the non-differentiable and probabilistic nature of quantum information. Summary of the Invention
[0005] Some embodiments relate to a method of determining a target quantum neural network (QNN) configuration for binary classification, the method comprising the steps of:
[0006] receiving a binary classification data set, the data set including a plurality of feature data and target classification data;
[0007] generating a group of candidate QNN configurations based on the plurality of features, each candidate QNN configuration defining a QNN comprising a random mapping of each of the plurality of features to at least one qubit of the QNN and an entanglement relationship between the qubits;
[0008] A genetic search is performed in the QNN configuration population to obtain a target QNN configuration by the following process:
[0009] - simulating candidate QNNs initialized using the respective QNN configurations in the group of QNN configurations;
[0010] - calculating a fitness index for each of the candidate QNNs based on the output of the simulation execution of the candidate QNNs and the target classification data; and
[0011] - iteratively evolving the QNN configuration population based on the fitness index to identify a target QNN configuration with a highest fitness index.
[0012] In some embodiments, the iterative evolution of the QNN configuration group includes:
[0013] Select a subset of QNN configurations based on the calculated fitness metrics;
[0014] A subsequent group of QNN configurations is generated by performing a random mutation operation on the subset of the QNN configurations.
[0015] In some embodiments, each QNN configuration includes at least one configuration value that defines the operations performed on qubits in each layer of the QNN.
[0016] In some embodiments, the entanglement relationship between the qubits of the QNN defined by the QNN configuration includes a multi-layer hierarchical entanglement relationship.
[0017] In some embodiments, the multi-layer hierarchical entanglement relationship includes two qubit groups at each layer, wherein the number of qubits in the two qubit groups at each layer is determined based on a tree splitting ratio.
[0018] In some embodiments, the method further comprises:
[0019] generating at least one guiding feature based on one or more of the plurality of features; and
[0020] Each candidate QNN configuration includes a mapping of each guiding feature to at least one qubit defined in the QNN configuration.
[0021] In some implementations, the method further comprises: randomly sampling records in the domain dataset; and
[0022] Perform simulated execution of the candidate QNN using randomly sampled records.
[0023] In some embodiments, the method further comprises defining a QNN based on the identified target QNN configuration; and
[0024] The QNN is deployed based on the identified target QNN configuration to process real-time data and generate binary classification inferences.
[0025] In some embodiments, the number of qubits in each candidate QNN configuration is less than the total number of features in the data set; and at least a subset of the qubits in each QNN configuration encodes more than one feature data.
[0026] In some embodiments, mutating comprises introducing random rotations to a subset of qubits of the QNN defined by the subset of the QNN configurations.
[0027] Some embodiments relate to a method for determining a target quantum neural network (QNN) configuration for a problem domain, the method comprising the steps of:
[0028] receiving a problem domain dataset, wherein the dataset includes a plurality of feature data and target variable data;
[0029] generating a group of candidate QNN configurations based on the plurality of features, each candidate QNN configuration defining a QNN comprising a random mapping of each of the plurality of features to at least one qubit of the QNN and an entanglement relationship between the qubits;
[0030] A genetic search is performed in the QNN configuration population to obtain a target QNN configuration by the following process:
[0031] - simulating candidate QNNs initialized using the respective QNN configurations in the group of QNN configurations;
[0032] - calculating a fitness index for each of the candidate QNNs based on the output of the simulation execution of the candidate QNNs and the target variable data; and
[0033] - iteratively evolving the QNN configuration population based on the fitness index to identify a target QNN configuration with a highest fitness index.
[0034] In some embodiments, the method further comprises defining a QNN based on the identified target QNN configuration; and
[0035] The QNN is deployed based on the identified target QNN configuration to process real-time data and generate inferences.
[0036] In some embodiments, the quantum computing system comprises:
[0037] A quantum circuit is generated according to a target QNN configuration, wherein the target QNN configuration is determined by performing the disclosed method for determining a target quantum neural network (QNN). BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The embodiments described herein are illustrated by way of example and not limitation in the accompanying drawings in which like reference numerals indicate similar elements and in which:
[0039] Figure 1 A block diagram illustrating a system for determining a QNN configuration and executing the determined QNN configuration is illustrated;
[0040] Figure 2 This example shows that Figure 1 A method for determining a QNN configuration performed by at least a portion of a system;
[0041] Figure 3 As an example Figure 2 A part of the method performs an evolutionary method of the QNN configuration;
[0042] Figure 4 illustrates a quantum circuit generated by implementing a QNN configuration;
[0043] Figure 5A and Figure 5B Another quantum circuit generated by implementing a QNN configuration is illustrated;
[0044] Figure 6 illustrates a schematic diagram for defining entanglement in a quantum circuit; and
[0045] Figure 7 Another schematic diagram for defining entanglement in quantum circuits is illustrated. DETAILED DESCRIPTION
[0046] The present disclosure relates to methods and systems for determining quantum neural network (QNN) configurations that can provide improved results for machine learning tasks, such as classification or regression. The present disclosure incorporates a genetic algorithm to determine the QNN configuration that is best suited for a particular problem domain. Advantageously, the present disclosure provides a method for determining QNN configurations that provides more accurate results. Furthermore, the present disclosure provides a method for identifying a more suitable QNN configuration for a problem domain in a more autonomous manner.
[0047] Traditional machine learning (ML) models, such as neural networks, rely on differentiable objective functions. During the training of traditional ML models, gradient descent is used to iteratively update the model parameters. However, in the field of quantum computing, formulating differentiable objectives is challenging for two reasons. First, the output of a quantum computer consists of discrete probability masses that are not easily differentiated. Second, current quantum computing hardware is in the "noisy intermediate-scale quantum" (NISQ) era, which means that the hardware itself is still under development. The objective functions computed for quantum computers include noise-induced barren plateaus (NIBPs). Due to NIBPs, gradient descent is not suitable for the optimization of quantum circuits.
[0048] One approach to leveraging NISQ computers is to use variational quantum algorithms (VQA) and limit the size of the problems that can be solved by quantum computers. Because NISQ computers are designed to solve larger problems (those with a large number of parameters, features, etc.), traditional gradient optimization techniques can suffer from exponentially vanishing gradients, leading to suboptimal or unacceptable results. This plateau in the gradient function means that optimizing the objective function to produce high-precision results may require a large number of training iterations, but this does not necessarily increase the likelihood of finding the global minimum.
[0049] The disclosed genetic / evolutionary algorithm-based approach provides a computationally feasible and efficient mechanism for determining the configuration of quantum neural networks while avoiding the technical problems associated with NIBP in conventional gradient optimization methods.
[0050] Figure 1 A block diagram of a system for determining a QNN configuration and executing the determined QNN configuration is illustrated. The QNN configuration is determined by a classical system 110, which operates on a problem domain dataset 122 accessible via a database 120. The problem domain dataset 122 includes conventional training data organized into features / parameters and one or more target variable data. In some embodiments, the problem domain dataset 122 includes a binary classification dataset, wherein the target variable (target classification data) is a binary variable. Each row in the problem dataset includes a feature dataset and target variable data. The target variable data is the attribute of interest and is intended to be predicted by the QNN for real-time data. The feature data can be observable data or observations obtained from real-world measurements, which serve as input for predicting the target variable. In embodiments where the problem domain is related to a binary classification problem, the target variable is a binary variable. In embodiments where the problem domain is related to a multi-class classification problem, the target variable is an identified class quantity from a predefined list of classes related to the problem domain. In embodiments where the problem domain is related to a regression problem, the target variable is a numerical value.
[0051] In this disclosure, classical systems (e.g. Figure 1Reference to the system 110 in the example includes a computer that performs computations using binary encoding of information (classical information). The quantum computing system 130 performs computations on quantum information. The quantum computing system receives input in the form of classical information and generates output in the form of classical information. However, the computations performed by the quantum computer system are performed by converting classical information into quantum information represented using qubits provided in the quantum computer system. The qubits form part of a quantum circuit 140 used to implement a quantum neural network (QNN) 142. Quantum circuits may also be referred to as variational circuits or ansatz. Similar to traditional neural networks implemented by classical computers, QNNs include a series of layers to process information, each of which includes a set of computations in the quantum realm. The data encoding layer 144 converts classical information obtained from the classical system into quantum information. In practice, this step involves converting classical information (e.g., a scalar value or a numerical value) into a quantum state vector encoded in a qubit according to a coding scheme. The implementation may implement a suitable coding scheme depending on the nature of the problem domain dataset. Suitable coding schemes include angular coding, in which classical information is represented as an angular configuration of one or more qubits. In some embodiments, each feature of the problem domain dataset is mapped to a qubit. In some embodiments, each qubit can be used to store information related to more than one characteristic. This can be achieved using an encoding scheme in which a qubit's rotation about two axes is used to encode two characteristic values. For example, a qubit's rotation Q1 about the x-axis can be used to encode characteristic F1, while a qubit's rotation Q2 about the y-axis can be used to encode characteristic F2.
[0052] The data processing layer 146 includes operations performed on the quantum data encoded in the quantum circuit. The operations are defined or parameterized by configuration values defined in the associated QNN configuration. Operations include unitary operations, such as Pauli operations, Hadamard operations, phase operations, rotation operations, etc. Each operation can be parameterized by one or more parameters that can be changed to control the operations performed on the quantum information. Each QNN includes one or more data processing layers to perform a series of operations on the encoded quantum state. The number of these layers varies with the complexity of the problem domain. Simple problems can be solved with fewer layers, while complex problems may require more layers. In addition to operations, the data processing layer may also include one or more entanglement relationships between quantum bits to model the complexity of the problem domain. Entanglement can be defined according to a predefined scheme, an example of which has been described with reference to Figure 6Finally, the output layer 148 includes one or more measurement elements to read out the results of the operations performed by the QNN into the classical domain. The output layer and readout step can be accompanied by a post-processing scheme for converting the output probability distribution of a series of measurements into a predicted target variable. Examples of such post-processing schemes include parity post-processing for binary classification problems or measurements of a single qubit. For regression problems, the post-processing scheme can include measuring the expected values of the outputs of multiple qubits of the QNN and converting the multiple expected values into regression values.
[0053] The various parameters and structures of the QNN 142 can be summarized as a QNN configuration 134. Essentially, with the QNN configuration, quantum circuits can be arranged or configured to generate the QNN of interest. The quantum computing system 130 also includes a quantum circuit controller 132 to manipulate the quantum circuit 140 based on the QNN configuration. The quantum computing system receives the QNN configuration values from the classical system and arranges the quantum circuits to implement the QNN defined in the received QNN configuration. The QNN configuration may include parameters defining various characteristics of the QNN, including the number of layers, the number of qubits, the mapping of features to qubits, parameters defining the operations performed in each layer of the QNN, the number of quantum circuit runs, and the like. Parameters defining the operations performed in each layer may include the specific quantum operations / gates applied to the quantum information in a particular layer, values defining rotation operations performed on the quantum information, and the like.
[0054] The classical system 110 includes one or more processors 112 to perform operations on classical information and execute a genetic algorithm to determine a target QNN configuration for a problem domain dataset. The classical system also includes a memory 114 that includes executable code for executing the steps of the method of the embodiment. The modules implemented by the classical system include a genetic search module 116 and a quantum computing simulation module 118. The genetic search module includes executable code and configurable parameters to perform the genetic search. The QC simulation module allows for simulation of quantum circuits and their associated quantum operations to allow supervision of the genetic search performed by the genetic search module. Both the classical system and the QC system include communication interfaces 119 and 136. The communication interface includes hardware and software elements to allow the various systems to communicate information. Appropriate network connections are provided between the database 120, the classical system 110, and the QC system 130 to allow the three components to interact with each other and share data / information.
[0055] Figure 2 Illustrated to determine the Figure 1Method 200 for determining a target QNN configuration is performed by at least a portion of a system. Method 200 is performed to generate a target QNN configuration that defines a quantum circuit best suited for generating predictions related to a problem domain. The approach of method 200 is independent of the nature of the machine learning problem at hand. Method 200 is applicable to both classification and regression problems. Quantum circuits for regression and classification implement different structures in their respective output layers to generate scalar values or classification labels. However, the overall approach of method 200 is applicable to both types of problems.
[0056] Genetic algorithms mimic the natural evolutionary process to find optimal solutions to problems. In nature, organisms evolve through the process of natural selection to adapt to environmental pressures. Genetic algorithms implement natural selection by numerically evaluating the fitness of each solution in a population of candidate solutions. At step 210, the classical system 110 receives or accesses a problem domain dataset. The problem domain dataset can be received from the database 120 or any other data store accessible to the classical system 110. The received dataset includes a plurality of feature data and target variable data.
[0057] At step 220, the classical system generates a group of QNN configurations (candidate QNN configurations). The various parameters of the QNN configurations are randomly generated. However, the generation of random parameter values is restricted to a certain range to produce practical and meaningful QNN configurations. For example, the parameter values for the rotation operation are randomly generated in the range of 0 to 360 degrees. In addition, the QNN configuration also includes a random mapping of features to qubits. For example, for a problem domain dataset with features F1, F2, and F3, the random mapping of features to a 3-qubit QNN (Q1, Q2, Q3) may include: [F1->Q1, F2->Q2, F3->Q3], [F1->Q3, F2->Q2, F3->Q1], etc. The random mapping of features to qubits allows a large number of QNN structures to be explored in the candidate QNN configuration group. In some embodiments, the feature values can be encoded, for example, using the rotation of the qubit relative to the x-axis and y-axis to map two features to a single qubit. Depending on the value range of each feature in the problem domain dataset, a suitable encoding mechanism is used to map the scalar value to the quantum state.
[0058] At step 230 , a genetic search for a target configuration is performed. Figure 3 The flowchart of FIG provides detailed steps of the genetic search. At step 310, a QNN is created using the QNN configuration group initialized at step 220, and the created QNN is executed. In some embodiments, the QNN can be simulated in a classical computer using the QC simulation module 118. The execution of the QNN involves processing the problem domain dataset received at step 210 to generate predictions.
[0059] At step 320, the output of the execution of the QNN obtained at step 310 is used to evaluate a fitness metric for each QNN configuration. The fitness metric represents the accuracy of the results generated by the QNN corresponding to the QNN configuration. Different fitness or accuracy evaluation metrics can be utilized depending on the problem domain. Examples include false positive rate, false negative rate, true negative rate, negative predictive value, false discovery rate, true positive rate, positive predictive value, etc., or a combination of multiple metrics.
[0060] For example, for problems related to binary classification (classification between class A and class B), the QNN can be configured to generate the probability (y pred The corresponding target variable for each record can be the known probability that the record belongs to class A (y actual For each sampling point in the problem domain dataset, the following calculation is performed:
[0061] diff=abs(y pred -y actual )
[0062] Returns the output cost based on:
[0063] diff<0.2:0
[0064] 0.2≤diff<0.45:1
[0065] 0.45≤diff<0.55:2
[0066] 0.55≤diff<0.8:3
[0067] 0.8≤diff:4
[0068] cost total is calculated as the sum of the costs of all sampling points, and the fitness index can be calculated as cost total The cost or fitness metric can be used interchangeably to drive the genetic search, with the fundamental goal of identifying the target QNN configuration that provides the most accurate results. In some embodiments, some optimization steps can be performed as part of the fitness metric calculation. For example, for a binary classification problem, if the class predicted by the QNN is consistently incorrect to a high degree, the QNN configuration can be modified to invert the labels as the genetic search continues. Using the cost calculation example above,
[0069] If 4*sample size-cost total <cost total / 2
[0070] Then update the QNN configuration to reverse the labels and update the cost function to
[0071] New cost total =4*sample size–cost total
[0072] At step 330, an evolution operation is performed based on the calculated fitness metric. The evolution operation includes selecting a subset of QNN configurations based on the calculated fitness metric. For example, QNN configurations above a predefined fitness metric threshold can be selected for the next round of evolution. Alternatively, the QNN configurations can be ranked and the top 10% or 20% of the QNN configurations can be selected for the next round of evolution. The selection mechanism can be guided by computational resource constraints, the complexity of the problem domain, and the size of the initial group. More complex problem domains may require a larger initial group size of QNN configurations and a stepwise selection mechanism to allow for a longer search for the target QNN configuration. Less complex problem domains can be solved with a smaller initial group of QNN configurations.
[0073] The evolution operation at step 330 may also include random mutation of a subset of QNN configurations to expand the search range in the solution space. Mutation can be controlled by hyperparameters α and β, where α is the mutation rate and β is the decay rate. With each iteration of step 330, the mutation rate decreases by the decay rate. In some embodiments, mutation can be performed by changing one or more rotation parameters of the quantum operations defined in the QNN configuration. For example, a random number (between 0 and 1) can be generated for each rotation operation in the QNN configuration. If the random number is less than α, the parameters of the rotation operation are replaced with new randomly generated parameters to mutate the QNN configuration. By mutating the QNN configuration, the genetic search process explores the solution space and evolves the swarm towards a target QNN configuration that provides more accurate results. Through the mutation and selection operations performed in step 330, a subsequent swarm of QNN configurations is generated for the next round of evolution. If the evolution termination condition is not met, step 310 is performed after step 330. The subsequent swarm of QNN configurations is used to simulate the QNN, and the fitness metric is then calculated in step 320 and further evolved in step 330.
[0074] Step 330 also includes an evaluation of an evolution termination condition. The evolution termination condition is used to evaluate whether the QNN group continues to evolve towards a better target QNN configuration. The evolution termination condition may include evaluating whether the fitness of the top queue of QNN configurations (e.g., top 10 or top 5, etc.) has improved during the iterative process of evolution. The evolution termination condition may also include evaluating whether any new QNN configurations have been added to the top queue of QNN configurations. When the evolution meets the evolution termination condition, the process proceeds to step 340, where the QNN configuration with the highest fitness is identified as the target QNN configuration.
[0075] After identifying a target QNN configuration, the QNN generated based on the target QNN configuration can be deployed to process real-time data that the QNN has not previously seen and generate predictions. The real-time data can be generated in a real-world production environment, and the inferences or predictions generated by the QNN can enable real-world decisions or actions to be made based on the inferences. Steps 310, 320, and 330, when repeated, constitute an iterative evolution of the candidate QNN population initialized in step 220.
[0076] The method of some embodiments further comprises the step of deploying a QNN on a quantum computing system based on the identified target QNN configuration. The deployed QNN is configured to process real-time data and generate inferences that can drive real-world actions or decisions.
[0077] To improve the performance and accuracy of the genetic algorithm and QNN, some embodiments incorporate certain optimization techniques. One such technique is to randomly sample records to simulate Figure 3 Instead of simulating the execution of the QNN for the entire problem domain dataset, the QNN can be simulated to process a random sampling of representative data to speed up the genetic search of step 230.
[0078] Another optimization technique involves the use of guiding features. In some embodiments, guiding features are randomly selected features that are encoded into qubits to improve the accuracy of the results provided by the QNN. In addition, the use of guiding features improves the time required for convergence by providing additional information input to the QNN. The guiding feature can be encoded using additional qubits or encoded into the qubits in combination with another feature. When encoded in combination with another feature, the guiding feature can be encoded using an angular encoding relative to an axis different from the other feature. The QNN configuration for an embodiment that includes this optimization technique includes configuring which features are used as guiding features and which qubit is used to encode the randomly selected guiding feature. The use of randomly selected guiding features and the variability in encoding such features using the QNN further expands the search space of the genetic search, making it possible to identify a better target QNN configuration. In some embodiments, the guiding feature can be a feature defined based on conventional machine learning feature engineering operations and can be based on a combination of one or more features in the problem domain dataset.
[0079] Figure 4A quantum circuit implementing a QNN 400 is illustrated, and QNN 400 is generated by implementing an example of a target QNN configuration identified by the disclosed method. QNN 400 is designed to perform binary predictions based on input features. A qubit-feature diagram 410 illustrates the mapping of various features to the qubits of the QNN. In QNN 400, the following mappings are applied to features [[q0, f0], [q1, f6], [q2, f2], [q3, f5], [q4, f1], [q5, f4], [q6, f3]]. This is an example of mapping 6 features to 6 qubits for a particular problem domain. In the population of QNN configurations generated during the execution of the disclosed method, other mappings of features to qubits may have been initialized to allow searching in the solution space.
[0080] Following the qubit-feature mapping is an encoding layer that encodes sample information in the problem domain into corresponding qubits. For each iteration of the execution / simulation of the QNN 400, the parameters of the encoding layer 420 are changed based on the corresponding eigenvalues to obtain measurements / predictions / inferences in the measurement layer 460. Data processing layers 430, 440, and 450 are provided between the measurement layer and the encoding layer. Various quantum operations are performed on the quantum information in the data processing layer. Examples of operations include rotation operations represented by blocks 436, 438, and 442. The quantum operations are parameterized by configuration parameters that form part of the QNN configuration corresponding to the quantum circuit. As the QNN configuration is changed in Figure 3 At step 330 of evolving, a mutation operation may be performed on the QNN configuration. The mutation operation may include introducing random changes to the quantum operations performed in the data processing layer of the QNN as parameterized by the corresponding QNN configuration.
[0081] In each processing layer, an entanglement relationship exists between the qubits and the quantum operations on the quantum state of the qubits. For example, in QNN 400, entanglement relationships 432 (q0-q2 in layer 1, level 1) and 434 (q2-q6 in layer 1, level 0) are identified. QNN 400 contains other entanglement relationships in each of its layers, as illustrated by the vertical lines connecting the horizontal lines corresponding to the qubits. The entanglement relationships are defined according to a structured entanglement relationship definition scheme. Figure 6 One such entanglement relationship definition scheme employed in some embodiments is illustrated. The entanglement relationships in various QNNs provide complex quantum operations between qubits, thereby allowing complexity to be built into the QNN. By building complexity into the QNN, the entanglement relationships allow complex real-world problem domains to be modeled in the QNN, thereby allowing for the search for a better target QNN. In some embodiments, in Figure 2The structure of the entanglement relations across the entire QNN group initialized in step 220 is consistent across the entire group. In such an embodiment, the genetic search focuses on mapping features to qubits and parameters of quantum operations in various layers of the QNN.
[0082] Also provided in the QNN 400 are classical bits 470 for generating readouts or measurements of quantum computations. When the quantum circuit performs a probability calculation, this is repeated multiple times (e.g., 100 or 1000 times) for each execution iteration of the quantum circuit for a data sample to obtain a distribution of classical outputs. Based on the distribution of the classical outputs, inferences related to the data can be obtained. For example, for a binary classification result, the distribution of the classical readout bit on (0,1) can be mapped to the two classes under consideration. Similarly, for multi-class classification problems, multiple readout classical bits can be provided in the QNN to allow for the generation of probability distributions over multiple classes. Similar readout / measurement mechanisms can be provided for regression or scalar value estimation problems.
[0083] Figure 5A and Figure 5B Another quantum circuit generated by implementing QNN 500 is illustrated. The structure of QNN 500 is shown in Figure 5A and Figure 5B Extend upward. Figure 5A and Figure 5B Intended for viewing in conjunction. QNN 500 also addresses a binary classification problem. Like QNN 400, QNN 500 also includes entangled relationships, operations, and layers. However, unlike QNN 400, in qubit-feature diagram 510 of QNN 500, multiple features have been mapped to a single qubit. For example, q1 has been mapped to f2 and f15. Q2 has been mapped to f8 and f16. Mapping multiple features to a single qubit allows the QNN to be simplified without affecting its ability to consume information from complex problem domains with a large number of features. Due to the simpler QNN structure, the genetic algorithm is also faster because there are fewer parameters to optimize. Figure 5A The encoding layer 520 is also illustrated in FIG, which encodes the feature data into the qubit through the rotation operation. Note that the qubits to which two features are mapped require two rotation operations to encode the data of the two features. The classical bit 570 (e.g., Figure 5B exemplified).
[0084] Figure 6 A schematic diagram illustrating a scheme for defining multi-layer hierarchical entanglement relationships in quantum circuits in some embodiments. Figure 6The scheme of is one example of defining entanglement relations. Implementations may incorporate other schemes for constructing entanglement within a QNN. Each group of QNN configurations may include QNNs utilizing one or more entanglement schemes. For example, for a problem domain with high complexity, a larger variety of entanglement relations may be used to initialize the initial QNN configuration group to allow for a wider genetic search. For a problem domain with lower complexity, a single entanglement scheme may be used to generate the entire QNN configuration group to simplify the search.
[0085] Figure 6 The scheme for entanglement relations illustrated in the example is to divide the total number of qubits in half (or approximately half for an odd number of qubits) to establish a multi-level tree hierarchy. Each level of the multi-level tree hierarchy contains multiple qubit groups. Each qubit group is iteratively split into smaller qubit groups as it goes down the hierarchy. The splitting operation that defines the entanglement ratio is controlled by a parameter called the tree splitting ratio. Figure 6 The tree split ratio is approximately 0.5. These three stages terminate at each leaf node of the tree corresponding to the desired number of qubits. Each level of the tree structure is associated with the level or depth of entanglement established in the corresponding QNN. Figure 6 The reference numbers in the tree structure are the index numbers of the qubits in the QNN.
[0086] Schematic diagram 610 illustrates an entanglement scheme at depth level 0. Schematic diagram 610 includes the entanglement relationship between q2 and q6. Since the total number of qubits is 7, the qubits are divided into two groups (0, 1, 2) and (3, 4, 5, 6). At level 0, an entanglement relationship is established between the final members of the two groups, q2 and q6.
[0087] Schematic diagram 620 illustrates an entanglement scheme with an additional level of depth of 1 on top of the scheme in schematic diagram 610. At level 1, the two groups of qubits are further split into groups [(0), (1, 2)], [(3, 4) and (5, 6)]. In addition to the previously established entanglement relationship [2, 6], an entanglement relationship is also established between the final members of the split groups [0, 2] and [4, 6].
[0088] Schematic diagram 630 illustrates an entanglement scheme with an additional depth of 2 on top of the scheme in schematic diagram 620. At level 2, the qubit group is further split into leaf nodes, each with a single qubit. The additional entanglement relations added are [1, 2], [3, 4], and [5, 6]. Layer 1 of QNN 400 implements the entanglement scheme illustrated in schematic diagram 630. Layer 2 of QNN 400 implements the entanglement scheme illustrated in schematic diagram 620. Layer 3 of QNN 400 implements the entanglement scheme illustrated in schematic diagram 610. Figure 6The various depths of entangled relationships illustrated in FIG can be layered in a QNN, with more complex / dense relationships (schematic illustration 630) preceding spatial relationships (schematic illustration 610). The entangled structure of QNN 500 follows a similar pattern, but with a larger number of qubits.
[0089] Figure 7 Another example of a scheme for defining multi-layer hierarchical entanglement relationships in quantum circuits is illustrated. Figure 7 The tree splitting ratio of the entanglement scheme is about 0.43. According to this tree splitting ratio, Figure 7 At level 1, the qubits are divided into two groups of 6 (qubits 0 to 5) and 8 (qubits 6 to 13) (6 / 14≈0.43). At level 2, the qubit groups are divided into further qubit groups to provide a ratio closest to the tree splitting ratio of 0.43. Figure 7 In the entanglement scheme, the following entanglement relations are defined:
[0090] Level 0: Split the tree into qubit groups (qubits 0 to 5 and qubits 6 to 13), entangle qubits 5 and 13
[0091] Level 1: Split the tree into qubit groups (qubits 0 to 2, qubits 3 to 5, qubits 6 to 9, and qubits 10 to 13), entangle qubits (2,3) and (9,13)
[0092] Level 2: Split the tree into qubit groups (qubit 0, qubits 1 to 2, qubit 3, qubits 4 to 5, qubits 6 to 7, qubits 8 to 9, qubits 10 to 11, and qubits 12 to 13), entangle qubits (0, 2), (3, 5), (7, 9), and (11, 13)
[0093] Level 3: Split the tree into final leaf nodes corresponding to qubits 1 to 13, and entangle qubits (1,2), (4,5), (6,7), (8,9), (10,11), and (12-13)
[0094] because Figure 7 For quantum circuits with a smaller number of qubits, the split ratios of subsequent levels (levels 2 and 3) return to a ratio of 0.5. However, in quantum circuits with a larger number of qubits, or for quantum circuits where the tree split ratio differs significantly from 0.5 (e.g., a ratio of 0.2), the entanglement scheme may introduce larger asymmetries in the QNN structure. Figure 2The QNN configuration group generated at 220 may include QNN configurations initialized using a range of tree split ratios. By varying the tree split ratios in the candidate QNN configuration group, some embodiments advantageously allow for a broader exploration of the solution space, thereby discovering optimal QNN configurations relevant to the problem domain. For example, the tree split ratio may be varied within a range of 0.2 to 0.8.
[0095] Some embodiments of the present disclosure relate to quantum computing systems whose quantum circuits implement the target QNN configuration identified by the method for determining the target QNN configuration of the present disclosure. The quantum computing systems of such embodiments operate in conjunction with classical systems and databases to receive data and transmit inferences or results generated by their computations.
Claims
1. A method for determining a target quantum neural network (QNN) configuration for binary classification, the method comprising the following steps: receiving a binary classification data set, the data set including a plurality of feature data and target classification data; generating a group of candidate QNN configurations based on the plurality of features, each candidate QNN configuration defining a QNN comprising a random mapping of each of the plurality of features to at least one qubit of the QNN and an entanglement relationship between the qubits; A genetic search is performed in the QNN configuration population to obtain a target QNN configuration by the following process: - simulating candidate QNNs initialized using the respective QNN configurations in the group of QNN configurations; - calculating a fitness index for each of the candidate QNNs based on an output of the simulation execution of the candidate QNNs and the target classification data; as well as - iteratively evolving the QNN configuration population based on the fitness index to identify a target QNN configuration with a highest fitness index.
2. The method according to claim 1, wherein The iterative evolution of the QNN configuration group includes: Select a subset of QNN configurations based on the calculated fitness metrics; A subsequent group of QNN configurations is generated by performing a random mutation operation on the subset of the QNN configurations.
3. The method according to claim 1, wherein Each QNN configuration includes at least one configuration value that defines the operations performed on the qubits in each layer of the QNN.
4. The method according to claim 1, wherein The entanglement relationship between the quantum bits of the QNN defined by the QNN configuration includes a multi-layer hierarchical entanglement relationship.
5. The method according to claim 4, wherein The multi-layer hierarchical entanglement relationship includes two qubit groups at each layer, wherein the number of qubits in the two qubit groups at each layer is determined based on a tree splitting ratio.
6. The method according to claim 1, wherein The method further comprises: generating at least one guiding feature based on one or more of the plurality of features; and Each candidate QNN configuration includes a mapping of each guiding feature to at least one qubit defined in the QNN configuration.
7. The method according to claim 1, wherein The method further comprises: randomly sampling records in the domain dataset; and Perform simulated execution of the candidate QNN using randomly sampled records.
8. The method according to claim 1, wherein The method further includes defining a QNN based on the identified target QNN configuration; and The QNN is deployed based on the identified target QNN configuration to process real-time data and generate binary classification inferences.
9. The method according to claim 1, wherein The number of qubits in each candidate QNN configuration is less than a total number of features in the data set; and at least a subset of the qubits in each QNN configuration encodes more than one feature data.
10. The method according to claim 2, wherein: Mutation comprises introducing random rotations to a subset of qubits of the QNN defined by the subset of the QNN configurations.
11. A method for determining a target quantum neural network (QNN) configuration for a problem domain, the method comprising the following steps: receiving a problem domain dataset, wherein the dataset includes a plurality of feature data and target variable data; generating a group of candidate QNN configurations based on the plurality of features, each candidate QNN configuration defining a QNN comprising a random mapping of each of the plurality of features to at least one qubit of the QNN and an entanglement relationship between the qubits; A genetic search is performed in the QNN configuration population to obtain a target QNN configuration by the following process: - simulating candidate QNNs initialized using the respective QNN configurations in the group of QNN configurations; - calculating a fitness index for each of the candidate QNNs based on the output of the simulation execution of the candidate QNNs and the target variable data; as well as - iteratively evolving the QNN configuration population based on the fitness index to identify a target QNN configuration with a highest fitness index.
12. The method according to claim 11, wherein The iterative evolution of the QNN configuration group includes: Select a subset of QNN configurations based on the calculated fitness metrics; A subsequent group of QNN configurations is generated by performing a random mutation operation on the subset of the QNN configurations.
13. The method according to claim 11, wherein Each QNN configuration includes at least one configuration value that defines the operations performed on the qubits in each layer of the QNN.
14. The method according to claim 11, wherein The entanglement relationship between the quantum bits of the QNN defined by the QNN configuration includes a multi-layer hierarchical entanglement relationship.
15. The method according to claim 14, wherein The multi-layer hierarchical entanglement relationship includes two qubit groups at each layer, wherein the number of qubits in the two qubit groups at each layer is determined based on a tree splitting ratio.
16. The method according to claim 12, wherein The method further comprises: generating at least one guiding feature based on one or more of the plurality of features; and Each candidate QNN configuration includes a mapping of each guiding feature to at least one qubit defined in the QNN configuration.
17. The method according to claim 11, wherein The method further comprises: randomly sampling records in the domain dataset; and Perform simulated execution of the candidate QNN using randomly sampled records.
18. The method according to claim 11, wherein The method further includes defining a QNN based on the identified target QNN configuration; and The QNN is deployed based on the identified target QNN configuration to process real-time data and generate inferences.
19. The method according to claim 11, wherein The number of qubits in each candidate QNN configuration is less than a total number of features in the data set; and at least a subset of the qubits in each QNN configuration encodes more than one feature data.
20. The method according to claim 12, wherein Mutation comprises introducing random rotations to a subset of qubits of the QNN defined by the subset of the QNN configurations.
21. A quantum computing system, comprising: A quantum circuit generated according to a target QNN configuration, wherein the target QNN configuration is determined by executing the method according to any one of claims 1 to 20.