Method for solving task-platform optimization configuration problem based on QGA quantum enhancement
By constructing a task-platform optimization configuration model in quantum genetic algorithm and using quantum logic gate operations, the timeliness and time complexity problems of QGA in military C2 organizations are solved, achieving high accuracy and Efficient solution effect.
Patent Information
- Application Number
- CN202311399997.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-01-07
AI Technical Summary
When solving the problem of task-platform optimization configuration in military C2 organizations, the existing quantum genetic algorithm (QGA) is low in time and has a high time complexity, making it difficult to effectively reflect the advantages of quantum computing.
By constructing a mathematical model of task-platform optimization configuration problem, the relationship between task and platform is mapped into the quantum ground state of qubits, and the selection, mutation and cross-operation are achieved using quantum logic gates, and quantum circuits are designed to improve the number of iterations of the algorithm and Time complexity.
It achieves high accuracy and timeliness, significantly reduces the number of iterations and time complexity of the algorithm, and is suitable for task-platform optimization configuration problems in military C2 organizations.
Smart Images

Figure CN119272884A_ABST
Abstract
Description
[Technical field]
[0001] The present invention belongs to the intersection of network information and quantum computing, and specifically relates to a method for solving task-platform optimization configuration problems based on QGA quantum enhancement. [Background technology]
[0002] like Figure 1 As shown in the figure, task-platform optimization configuration is to build an optimization configuration model between tasks and platforms according to the resources provided by the platform and the resources required by the task within the platform cluster and task cluster. It is a complex combinatorial optimization problem and also an NP problem. In the military C2 organization, the optimization configuration between tasks and platforms is based on task cutting and grouping and platform clustering. Compared with the task cutting and grouping problem and the platform clustering problem, the task-platform optimization configuration problem has a smaller data scale, requires fewer computing resources, and is less affected by the task scale and platform scale.
[0003] At present, the more common solutions for this type of combinatorial optimization problem mainly include meta-heuristic algorithms such as taboo search algorithm, simulated annealing algorithm, ant colony algorithm, particle swarm optimization algorithm, GA, artificial neural network, etc. Among them, GA, as an optimization algorithm inspired by natural biological selection, constructs a more general solution framework for solving complex combinatorial optimization problems, and the solution process is relatively simple. Compared with other algorithms, this algorithm has the advantages of stronger global search ability, faster calculation rate and better robustness, so it has received widespread attention in the study of practical problems. However, with the continuous increase in the scale of problem data, it is difficult for the current classic improvement methods and strategies to significantly improve the solution rate and solution quality of GA.
[0004] With the rapid development of quantum information technology, many scholars have combined quantum technology with GA, using quantum entanglement, quantum superposition and other theories in quantum mechanics and the parallel computing properties of quantum to improve GA and solve many practical problems. Giovanni Acampora et al. designed a QGA based on quantum genetic sampling to solve the problem of setting the selection operator in GA. This method not only improves the population diversity in the genetic evolution process, but also reduces the possibility of convergence to low-quality solutions during the optimization process. RSAmal et al. proposed a QGA for the optimization problem of the unit sphere surface. This method maps each quantum bit to a point on the surface of the Bloch sphere and uses the principle of quantum superposition to achieve gene crossover and mutation. Compared with the classical GA, the effectiveness and rate of the algorithm are improved. Tao Yang et al. proposed an adaptive QGA based on immune operation for the deployment of air defense and air defense weapons on islands and reefs. This method improves the computational efficiency and stability of the algorithm by adapting the chromosome length, the rotation angle of the revolving door and adding immunity. Wu Ruijie et al. proposed an adaptive QGA by combining QGA with adaptive strategies to solve the problem of command and control structure design during combat. Experimental results show that this method has the advantages of fast evolution speed and high search quality.
[0005] The above research results on QGA have greatly optimized and improved the classical GA and have certain innovations. However, since there are certain differences between the design ideas of these algorithms and the design ideas of pure quantum algorithms, the degree of quantization is not high, and it is difficult to effectively reflect the advantages brought by quantum computing, which makes the timeliness of this algorithm low and the time complexity high.
[0006] In view of this, the present invention provides a method for solving the task-platform optimization configuration problem in a military C2 organization based on the QGA algorithm, which can improve timeliness and reduce the time complexity of the algorithm. [Summary of the invention]
[0007] In view of the above problems, the present invention provides a method for solving the task-platform optimization configuration problem based on QGA quantum enhancement. The method has high accuracy and timeliness, and the number of algorithm iterations and time complexity are greatly reduced. It can be effectively used to solve the task-platform optimization configuration problem in military C2 organizations.
[0008] The present invention is implemented by the following technical scheme, and the method for solving the task-platform optimization configuration problem based on QGA quantum enhancement includes the following steps:
[0009] S1 builds the mathematical model corresponding to the task-platform optimization configuration problem;
[0010] S2, based on the constructed mathematical model, maps the correspondence between tasks and platforms into the quantum ground state corresponding to the qubit, arranges and combines the qubits in sequence to form the corresponding chromosome, and initializes the population according to the optimization strategy;
[0011] S3 establishes a fitness function, calculates the fitness value of each chromosome in the population according to the fitness function, and determines the optimal chromosome in the population;
[0012] S4 determines the rotation angle and direction of the quantum logic gate according to the difference between the fitness value of each chromosome in the population and the fitness value of the optimal chromosome, and uses the quantum logic gate to implement the selection operator in GA;
[0013] S5 designs corresponding quantum logic gates to implement mutation and crossover operators in GA according to the number and state of qubits in the chromosome;
[0014] S6 designs the corresponding quantum circuit according to the QGA process to solve the problem.
[0015] In particular, the S1 is implemented in accordance with the following scheme:
[0016] S11 Constructing a mathematical model of the problem based on the relationship between tasks and platforms in military C2 organizations
[0017] Assume that the number of tasks in the task cluster is N, each task is denoted as ti, where i∈N; the number of platforms in the platform cluster is M, each platform is denoted as pj, where j∈M; the relationship between task ti and platform pj is denoted as C ij , where C ij ∈{0,1}, the relationship between tasks and platforms is the demand and supply relationship of resources. If platform pj provides resources to task ti, then C ij =1, if platform pj does not provide resources for task ti, then C ij =0, and the following expression is established based on the relationship between the task and the platform:
[0018]
[0019] Based on formula (1), let each resource required by each task be provided by one or a few platforms. The corresponding mathematical model is expressed as:
[0020]
[0021] S12 constructs the constraints of the problem based on the resource demand and resource supply relationship between the task and the platform
[0022] Assume that the total resource types required by the task cluster are denoted as N′, and the resource types required by task ti are denoted as Resources required for task ti The number is expressed as Where k∈N′; the total resource types provided by the platform cluster are represented as M′, and the resource types provided by platform pj are represented as Platform pj provides resources The number is expressed as Platform pj provides resources for task ti The number is expressed as Where k∈M′. In actual combat, the total resource types N′ required by the task cluster are less than or equal to the total resource types M′ provided by the platform cluster. The redundant resource types provided by the platform are irrelevant to the construction of constraints. Therefore, only the resource types required to complete the task are considered. The total resource types provided by the platform cluster are expressed as N′. The constraint expression established by the resource supply and demand relationship between the task and the platform is as follows:
[0023]
[0024]
[0025] In formulas (3) and (4), i∈N, j∈M, k∈N′. Formula (3) indicates that for any resource, the demand of each task for the resource is less than or equal to the sum of the supply of the resource by the platforms associated with it; Formula (4) indicates that for any resource, the supply of the resource by each platform is greater than or equal to the sum of the demand of the resource by the tasks associated with it;
[0026] In order to solve the task-platform optimization configuration problem in military C2 organizations, the optimization objectives of the entire problem model are constructed as follows:
[0027]
[0028]
[0029]
[0030] C ij ∈{0,1} (8)
[0031] In the entire problem model, the constraints are as follows: the demand of each task for any type of resource is less than or equal to the sum of the resources that can be provided by the platforms associated with it; the supply of any type of resource by each platform is greater than or equal to the sum of the resources requested by the tasks associated with it; the relationship between tasks and platforms is represented by a Boolean variable, whose value is 0 or 1.
[0032] In particular, the S2 is implemented according to the following scheme:
[0033] S21 quantum state encoding
[0034] In a two-level quantum system, any quantum state |φ> can be expressed as follows:
[0035] |φ>=α|0>+β|1> (9)
[0036] In formula (9), α and β are both complex numbers, representing the probability amplitude of the corresponding state, and |α| 2 +|β| 2 =1, at any time, the quantum state |φ> is in the superposition of the ground state |0> and the ground state |1>, and after the standard basis measurement, it will collapse to the ground state |0> or the ground state |1>, and the probability of collapsing to the ground state |0> is |α| 2 , the probability of collapse to the ground state |1> is |β| 2 , α and β range from 0≤α, β≤1, and the following encoding form is defined according to the quantum state probability amplitude corresponding to each qubit:
[0037]
[0038] If one qubit corresponds to one coding bit in a chromosome, the chromosome that requires m coding bits can be expressed as follows:
[0039]
[0040] In formula (11), each qubit consists of a superposition of two ground states, so each coding bit in the chromosome is in a superposition of two states. A chromosome with m coding bits is in a superposition of 2 states at the same time. m The superposition of states;
[0041] S22 Initialize population quantum circuit
[0042] Aiming at the task-platform optimization configuration problem in military C2 organizations, the relationship between tasks and platforms is converted into chromosomes and expressed by formula (11). The initial population is assumed to be Where n represents the population size, t represents the current population evolution generation, represents the chromosome quantum state encoding, i represents the i-th individual in the population, i = 1, 2, ..., n, and the total length of the chromosome is m. Each chromosome consists of several genes, and each gene includes the association relationship between a task and all platforms;
[0043] S221 initializes m qubits according to the number of chromosome coding bits m and the population size n, and the initial ground state of each qubit is set to |0>;
[0044] S222 applies a quantum logic gate H to each qubit, so that each qubit is in a superposition state of |0> and |1>;
[0045] S223 measures the quantum state using a standard computing basis and randomly obtains an m-bit string corresponding to a chromosome;
[0046] S224 judges the chromosome according to the constraints of formulas (6) and (7), and when the chromosome meets the constraints, the chromosome is added to the population; when the chromosome does not meet the constraints, the chromosome is discarded;
[0047] S225 repeats S221-S223 to measure the quantum state and judge the chromosome until the population size n is reached. The specific calculation derivation is as follows:
[0048]
[0049] In particular, S3 uses formula (5) as the fitness function, calculates the fitness value of each chromosome in each population, arranges the fitness values in ascending order, and selects the individual corresponding to the minimum fitness value as the target of the next optimization. The individual corresponding to the minimum fitness value is the optimal chromosome.
[0050] In particular, the S4 is implemented according to the following scheme:
[0051] S41 determines the rotation angle and rotation direction in the quantum logic rotating gate according to the difference between the fitness value of each chromosome in the population and the fitness value of the optimal chromosome. The matrix expression of the quantum logic rotating gate RY is as follows:
[0052]
[0053] In formula (12), 0≤θ≤π / 2;
[0054] For any quantum state |φ>=α|0>+β|1>, a new quantum state |φ′> is obtained by performing a unitary operation using the quantum logic rotation gate RY. The specific calculation derivation is as follows:
[0055]
[0056] In formula (13), α and β are the probability amplitudes corresponding to the quantum state before the quantum logic rotating gate acts, and α′ and β′ are the probability amplitudes corresponding to the quantum state after the quantum logic rotating gate acts;
[0057] There are two positional relationships between the quantum state |φ> before the quantum logic revolving door and the quantum state |φ′> after the quantum logic revolving door. One of the positional relationships is expressed as follows:
[0058] α′=cosθ″=cos(θ+θ′)=cosθcosθ′-sinθsinθ′=αcosθ-βsinθ (14)
[0059] β′=sinθ″=sin(θ+θ′)=sinθcosθ′+cosθsinθ′=αsinθ+βcosθ (15)
[0060] Another position relationship is expressed as follows:
[0061] α′=cosθ″=cos(θ′-θ)=cosθ′cosθ+sinθ′sinθ=αcosθ+βsinθ (16)
[0062] β′=sinθ″=sin(θ′-θ)=sinθ′cosθ-cosθ′sinθ=βcosθ-αsinθ (17)
[0063] From the analysis of formulas (14)-(16), it can be concluded that when 0≤θ′<θ″≤π / 2, when rotating counterclockwise, the rotation angle direction is positive; when 0≤θ″<θ′≤π / 2, when rotating clockwise, the rotation angle direction is negative. Combined with the encoding form of the population described in S2, when rotating in the direction of the vector state |1>, the rotation angle direction is positive; when rotating in the direction of the vector state |0>, the rotation angle direction is negative.
[0064] The adaptive adjustment rotation strategy of the rotation angle θ in S42 is expressed by the following formula:
[0065]
[0066] In formula (18), fv, fv_min, fv_max represent the fitness of any individual in the current population, the minimum fitness of individuals in the current population, and the maximum fitness of individuals in the current population, respectively, and λ is a setting parameter;
[0067] S43 Using quantum logic gates to implement selection operators in GA
[0068] The selection operation quantum circuit diagram mainly consists of two parts: classical and quantum. The classical part calculates the rotation angle and direction according to the difference between the current individual fitness and the optimal individual fitness, and transmits the value to the corresponding quantum logic revolving gate;
[0069] The quantum part uses quantum logic rotating gates to operate the quantum states corresponding to the individual quantum states of the population according to the rotation angle and direction.
[0070] It should be noted that the selection operation method proposed in the present invention optimizes and improves the quantum state operation on each coding bit in the population individual quantum state encoding. The optimized rotation angle value only acts on the coding bit where the population individual quantum state encoding is different from the corresponding bit quantum state of the optimal individual quantum state encoding, and the rotation angle values on other coding bits are set to 0. This improvement aggregates the direction of searching for a better solution on the basis of ensuring the space for searching for a better solution, and reduces the probability of generating a worse population individual.
[0071] In particular, in S4, when the difference between the fitness value of the population individual and the fitness value of the optimal individual is large, it means that there is a large gap between the current individual and the optimal individual. In order to make the current population individuals converge to the direction of the optimal individual as soon as possible, the rotation angle value is set to be larger; when the difference between the fitness of the population individual and the fitness of the optimal individual is small, it means that the gap between the current individual and the optimal individual is small. In order to make the current population individuals converge accurately to the direction of the optimal individual, the rotation angle value is set to be smaller.
[0072] In particular, the S5 is implemented in accordance with the following scheme:
[0073] S51 Design and construction of mutation operation quantum circuit
[0074] For any quantum state |φ>=α|0>+β|1>, after the action of the quantum Pauli-X gate, a new quantum state |φ′> is obtained. The specific calculation derivation is as follows:
[0075]
[0076] Through the above formula, it can be concluded that the probability amplitude of the new quantum state |φ′> is exactly opposite to the probability amplitude of the quantum state |φ>, and the probability of 0 after measurement becomes |β| 2 , the probability of measuring 1 becomes |α| 2 , which realizes the mutation operation;
[0077] The quantum route of the mutation operation is mainly divided into the quantum part and the classical part. The quantum part randomly selects a bit in the population individual quantum state encoding, applies the quantum Pauli-X gate to the bit, and controls the quantum Pauli-X gate through a quantum auxiliary bit. The function of the quantum logic gate RY on the quantum auxiliary bit is to adjust the probability amplitude of the ground state |0> and the ground state |1> on the auxiliary quantum bit. When the auxiliary bit is measured as 1, the Pauli-X gate randomly acts on the i-th bit of the population individual quantum state encoding. When the auxiliary quantum measurement is 0, the Pauli-X gate does not work. The classical part mainly calculates the rotation angle θ.
[0078] S52 Design and build cross-operation quantum circuits
[0079] After using quantum states |10> and |01> to act on quantum logic gate SWAP, the new quantum state matrix is obtained in the form of:
[0080]
[0081]
[0082] According to formulas (20), (21) and the quantum state matrix form, it is deduced that after the quantum state |10> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |01>, and after the quantum state |01> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |10>, realizing the crossover operation.
[0083] The quantum circuit diagram of the crossover operation is also divided into a quantum part and a classical part. The quantum part randomly selects the gene code at the same position on the two population individuals, performs the exchange operation by acting on the quantum logic gate SWAP, and uses a quantum auxiliary bit to control the quantum logic gate SWAP. The quantum logic gate RY acting on the quantum auxiliary bit mainly adjusts the probability amplitude of the quantum state on the auxiliary quantum bit and controls the corresponding probability of the crossover operation. When the auxiliary bit is measured as 1, the quantum logic gate SWAP acts on the chromosome code randomly selected from the same position on the two population individuals. When the auxiliary quantum measurement is 0, the quantum logic gate SWAP does not work. The classical part mainly calculates and adjusts the rotation angle θ.
[0084] Compared with the prior art, the present invention provides a method for solving the task-platform optimization configuration problem based on QGA quantum enhancement. The method firstly utilizes the true randomness and entanglement of quantum, uses quantum state to realize the encoding of the corresponding relationship between tasks and platforms, and uses the fitness function to determine the optimal individual in the population; secondly, uses quantum logic gates to realize the selection operation in the algorithm, and determines the rotation angle and direction of the quantum logic gate through the fitness difference between each chromosome and the optimal chromosome; then, uses quantum logic gate X and quantum logic gate SWAP to respectively realize the mutation operation and crossover operation in the algorithm.
[0085] In summary, the method for solving the task-platform optimization configuration problem based on QGA quantum enhancement provided by the present invention has higher accuracy and timeliness compared with the classical GA algorithm, and the number of algorithm iterations and time complexity are greatly reduced. It can be effectively used to solve the task-platform optimization configuration problem in military C2 organizations.
Brief Description of the Drawings
[0086] Figure 1 Optimize configuration for mission-platform;
[0087] Figure 2 This is a flow chart of the quantum enhanced solution method based on QGA;
[0088] Figure 3 is a diagram of chromosome structure;
[0089] Figure 4 To initialize the population quantum circuit diagram;
[0090] Figure 5 Schematic diagram of the rotation of the quantum logic revolving door;
[0091] Figure 6 A quantum circuit diagram for selecting operations;
[0092] Figure 7 A quantum circuit diagram for mutation operations;
[0093] Figure 8 It is the quantum circuit diagram of crossover operation;
[0094] Fig. 9 Quantum circuit diagram for quantum measurement;
[0095] Fig.10 It is a quantum circuit diagram based on QGA;
[0096] Fig.11 This is a quantum circuit diagram based on QGA containing 10 qubits;
[0097] Fig.12 Select an operation measurement result graph for the quantum circuit;
[0098] Fig.13 This is the measurement result diagram of quantum circuit mutation operation;
[0099] Fig.14 This is the measurement result diagram of quantum circuit crossover operation;
[0100] Fig.15 Compare the objective functions of the two algorithms.
[0101] Fig.16 Comparison diagram of objective function calculation of two algorithms in the second group of tasks and platform data;
[0102] Fig.17 Comparison chart of objective function calculation of the two algorithms in the third group of tasks and platform data. [Specific implementation method]
[0103] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is described in detail below with reference to the accompanying drawings.
[0104] The present invention provides a method for solving task-platform optimization configuration problems based on QGA quantum enhancement, which is implemented by the following steps:
[0105] 1. Task-Platform Optimization Configuration Problem Model Construction
[0106] The configuration relationship between tasks and platforms in military C2 organizations belongs to the third part of the three-stage organizational design of military C2 structure, and has high requirements for the real-time, reliability and effectiveness of the solution method. As the basic link of military C2 structure design, the configuration relationship between tasks and platforms can not only affect the overall combat efficiency of the military C2 system, but also affect the reliability and stability of the military C2 system. Since the fewer platforms that require military C2 system communication and coordination in the actual execution of a certain task, the faster the task execution rate is, the more stable the system operation is. Therefore, the present invention aims at the task-platform optimization configuration problem in military C2 organizations, and constructs a mathematical model that minimizes the corresponding relationship between tasks and platforms on the basis of fully meeting the resource requirements of each task. The optimization goal of the model is to minimize the corresponding relationship between tasks and platforms and the collaborative relationship between platforms while ensuring the completion of all tasks in advance, thereby improving the operating efficiency and reliability of the entire C2 system.
[0107] First, a mathematical model of the problem is constructed based on the relationship between tasks and platforms in military C2 organizations. Assume that the number of tasks in the task cluster is N, and each task is represented by ti, where i∈N; the number of platforms in the platform cluster is M, and each platform is represented by pj, where j∈M; the relationship between task ti and platform pj is represented by C ij , where C ij ∈{0,1}, where the relationship between tasks and platforms refers to the demand and supply relationship of resources. If platform pj provides resources to task ti, then C ij =1, if platform pj does not provide resources for task ti, then C ij = 0. According to the relationship between tasks and platforms, the following expression can be established:
[0108]
[0109] Based on formula (1.1), we try to make all kinds of resources required for each task provided by one or a few platforms, which can not only reduce the correspondence between tasks and platforms, but also reduce the collaboration between platforms. The corresponding mathematical model is expressed as:
[0110]
[0111] Secondly, based on the resource demand and resource supply relationship between tasks and platforms, the constraints of the problem are constructed. Let the total resource types required by the task cluster be represented as N′, and the resource types required by task ti be represented as Resources required for task ti The number is expressed as Where k∈N′; the total resource types provided by the platform cluster are represented as M′, and the resource types provided by platform pj are represented as Platform pj provides resources The number is expressed as Platform pj provides resources for task ti The number is expressed as Where k∈M′. In actual combat, the total resource types N′ required by the task cluster are often less than or equal to the total resource types M′ provided by the platform cluster, and the redundant resource types provided by the platform are irrelevant to the construction of constraint conditions, so the present invention only considers the resource types required to complete the task, and the total resource types provided by the platform cluster can also be expressed as N′. The constraint condition expression established by the resource supply and demand relationship between the task and the platform is as follows:
[0112]
[0113]
[0114] In formulas (1.3) and (1.4), i∈N, j∈M, k∈N′. Formula (1.3) indicates that for any resource, the demand of each task for the resource should be less than or equal to the sum of the supply of the resource by the platforms associated with it; formula (1.4) indicates that for any resource, the supply of the resource by each platform should be greater than or equal to the sum of the demand of the resource by the tasks associated with it.
[0115] In summary, in order to solve the task-platform optimization configuration problem in the military C2 organization, the optimization goal of the entire problem model constructed by the present invention is:
[0116]
[0117]
[0118]
[0119]
[0120] In formulas (1.5)-(1.8), the constraints include: during the optimization process, the demand for any type of resource by each task must be less than or equal to the sum of the quantities that can be provided by the platforms associated with it; the supply of any type of resource by each platform must also be greater than or equal to the sum of the demands for the resource by the tasks associated with it; the relationship between tasks and platforms is represented by a Boolean variable, whose value can only be 0 or 1.
[0121] 2. Based on QGA quantum circuit construction
[0122] The existing QGA mainly quantizes and improves the chromosome encoding and chromosome population selection and update process of the classical GA through quantum bits and quantum logic revolving gates, thereby improving the algorithm's operational efficiency and maintaining the diversity of the chromosome population. In the classical GA, the basic operations of the algorithm mainly include selection, crossover and mutation. The role of selection is mainly to achieve the survival of the fittest and retain as many good population individuals as possible; the role of crossover is mainly to ensure the stability and diversity of the population, so that the population can jump out of the local optimum and evolve towards the global optimal solution; the role of mutation is mainly to prevent the population from converging to the local optimum and improve the diversity of the population. The method designed by the present invention not only realizes quantum enhancement of the crossover operation and mutation operation of the classical GA, but also optimizes and adjusts other quantized parts in the existing QGA. Please refer to Figure 2 , Figure 2 This is the flow chart of the algorithm. The main parts of the algorithm are analyzed and studied below.
[0123] 2.1 Quantum State Coding
[0124] In order to make the classical GA adapt to various types of problems, the chromosomes are uniformly encoded. The encoding methods mainly include binary encoding, real number encoding and symbol encoding. However, no matter which encoding method is used to represent the chromosome, only one state can be represented at the same time. In a two-level quantum system, any quantum state |φ> can be expressed as follows:
[0125] |φ>=α|0>+β|1> (2.9)
[0126] In formula (2.9), α and β are both complex numbers, representing the probability amplitude of the corresponding state, and |α| 2 +|β| 2 = 1. At any time, the quantum state |φ> is in the superposition of the ground state |0> and the ground state |1>. After the standard basis measurement, it will collapse to the ground state |0> or the ground state |1>. The probability of collapsing to the ground state |0> is |α| 2 , the probability of collapse to the ground state |1> is |β| 2 In combination with the practical problems of the present invention, the value ranges of α and β are set to 0≤α, β≤1, and the following encoding form is defined according to the quantum state probability amplitude corresponding to each qubit:
[0127]
[0128] If one qubit corresponds to one coding bit in the chromosome, a chromosome that requires m coding bits can be expressed as:
[0129]
[0130] In formula (2.11), since each qubit is composed of a superposition of two ground states, each coding bit in the chromosome is in a superposition of two states. A chromosome with m coding bits can be in 2 states at the same time. m The superposition of states greatly enriches the diversity of chromosomes and improves the global optimization and search capabilities of the algorithm.
[0131] 2.2 Initializing the population quantum circuit
[0132] In view of the task-platform optimization configuration problem in military C2 organizations, the relationship between tasks and platforms is converted into chromosomes and expressed by formula (2.11). Suppose the initial population is Where n is the population size, t is the current population evolution generation, is the chromosome quantum state encoding, i represents the i-th individual in the population, i = 1, 2, ..., n. Figure 3 , Figure 3 This is a specific structure diagram of a chromosome. The total length of the chromosome is m. Each chromosome consists of several genes, and each gene includes the association relationship between a task and all platforms.
[0133] First, according to the number of chromosome coding bits m and the population size n, m qubits are initialized, and the initial ground state of each qubit is set to |0>; secondly, a quantum logic gate H is applied to each qubit, so that each qubit is in a superposition state of |0> and |1>; then, the quantum state is measured through the standard computing basis, and an m-bit string is randomly obtained, corresponding to a chromosome; then, according to the constraints of formulas (1.6) and (1.7), the chromosome is judged. When the chromosome meets the constraints, the chromosome is added to the population, and when the chromosome does not meet the constraints, the chromosome is discarded; finally, the quantum state is repeatedly measured and the chromosome is judged according to the above method until the population size n is reached. The constructed initial population quantum circuit is as follows: Figure 4 As shown, the specific calculation is derived as follows:
[0134]
[0135] 2.3 Selecting the Operational Quantum Circuit
[0136] Before performing the selection operation, it is necessary to design a fitness function to calculate the population individuals. The role of the fitness function is to make the population individuals with high fitness survive with a high probability, and to make the population individuals with low fitness be eliminated with a higher probability. According to the actual needs of the problem, the present invention selects the optimization objective function (Formula (1.5)) as the fitness function of the algorithm. Using the fitness function, the fitness value of each population individual is calculated, the fitness values are arranged in order from small to large, and the individual corresponding to the minimum fitness value is selected as the target of the next step of optimization.
[0137] The selection operation is based on the fitness function, and it implements the "survival of the fittest" mechanism by performing specific operations on individuals with different fitness. The commonly used selection operation methods in classical GA mainly include roulette selection method, random traversal selection method, tournament selection method, etc. The selection operation in QGA currently mainly uses the difference between the fitness of the best individual and the fitness of other individuals to determine the rotation angle and rotation direction in the quantum logic revolving gate, and then implements the selection operation through the quantum logic revolving gate. Based on the use of quantum logic revolving gates for selection operations, the present invention optimizes and improves the method for determining the rotation angle and rotation direction in the quantum logic revolving gate, and then constructs a selection operation quantum circuit.
[0138] There are three main types of quantum logic revolving gates, namely, quantum logic revolving gate RX with Pauli-X as generator, quantum logic revolving gate RY with Pauli-Y as generator, and quantum logic revolving gate RZ with Pauli-Z as generator. The present invention uses quantum logic revolving gate RY to realize the selection operation of population individuals. In order to facilitate analysis, research and computational reasoning, the present invention rewrites the matrix expression of quantum logic revolving gate RY into the following form:
[0139]
[0140] In formula (2.12), 0≤θ≤π / 2.
[0141] For any quantum state |φ>=α|0>+β|1>, a new quantum state |φ′> can be obtained by performing a unitary operation using the quantum logic rotation gate RY. The specific calculation derivation is as follows:
[0142]
[0143] In formula (2.13), α and β are the probability amplitudes corresponding to the quantum state before the quantum logic rotating gate acts, and α′ and β′ are the probability amplitudes corresponding to the quantum state after the quantum logic rotating gate acts. It can be seen that the main function of the quantum logic rotating gate is to change the probability amplitude corresponding to the quantum state by adjusting the size and direction of θ.
[0144] In the existing QGA, the direction of the rotation angle is determined by a fixed table lookup method. However, this method seriously affects the calculation efficiency of the algorithm because it needs to provide multiple judgment conditions and constraints during the calculation process. To solve this problem, the present invention designs a simple method for determining the direction of the rotation angle based on the characteristics of chromosome encoding. Figure 5 , Figure 5 This is a schematic diagram of the rotation of the quantum logic revolving door. Figure 5 It can be seen that there are two positional relationships between the quantum state |φ> before the quantum logic revolving door and the quantum state |φ′> after the quantum logic revolving door. Figure 5 (a), we can calculate and deduce the probability amplitude relationship between the quantum state |φ> and the quantum state |φ′> as:
[0145] α′=cosθ″=cos(θ+θ′)=cosθcosθ′-sinθsinθ′=αcosθ-βsinθ (2.14)
[0146] β′=sinθ″=sin(θ+θ′)=sinθcosθ′+cosθsinθ′=αsinθ+βcosθ (2.15)
[0147] according to Figure 5 (b), we can calculate and deduce the probability amplitude relationship between the quantum state |φ> and the quantum state |φ′> as follows:
[0148] α′=cosθ″=cos(θ′-θ)=cosθ′cosθ+sinθ′sinθ=αcosθ+βsinθ (2.16)
[0149] β′=sinθ″=sin(θ′-θ)=sinθ′cosθ-cosθ′sinθ=βcosθ-αsinθ (2.17)
[0150] According to the above four formulas, it can be analyzed that when 0≤θ′<θ″≤π / 2, when rotating counterclockwise, the rotation angle direction is positive; when 0≤θ″<θ′≤π / 2, when rotating clockwise, the rotation angle direction is negative. Combined with the encoding form of the population of the present invention, when rotating in the direction of the quantum state |1>, the rotation angle direction is positive; when rotating in the direction of the quantum state |0>, the rotation angle direction is negative.
[0151] The rotation angle value in the existing QGA is usually determined by a fixed rotation angle strategy. The disadvantage of this method is that if the rotation angle is set too large, the optimal solution will be missed, and if the rotation angle is set too small, the convergence speed will be affected. Therefore, the present invention adopts an adaptive and adjustable rotation strategy for the rotation angle size, which can automatically adjust the rotation angle size in the quantum logic revolving gate according to the difference between the fitness of the population individual and the fitness of the optimal individual. The adaptive adjustment rotation strategy of the rotation angle θ is as follows:
[0152]
[0153] In formula (2.18), fv, fv_min, fv_max represent the fitness of any individual in the current population, the minimum fitness of individuals in the current population (i.e., the fitness of the optimal individual), and the maximum fitness of individuals in the current population, respectively. λ is a parameter set based on relevant experience.
[0154] According to the rotation adaptive adjustment rotation strategy proposed in the present invention, when the difference between the fitness of the population individual and the fitness of the optimal individual is relatively large, it means that there is a large gap between the current individual and the optimal individual. In order to make the current population individuals converge to the direction of the optimal individual as soon as possible, the rotation angle value is correspondingly set to be larger; when the difference between the fitness of the population individual and the fitness of the optimal individual is relatively small, it means that the gap between the current individual and the optimal individual is small. In order to make the current population individuals accurately converge to the direction of the optimal individual, the rotation angle value is correspondingly set to be smaller.
[0155] See also Figure 6 , Figure 6 To select and operate a quantum circuit diagram, the quantum circuit diagram is mainly composed of two parts, classical and quantum. The classical part mainly calculates the rotation angle and rotation direction according to the difference between the fitness of the current individual and the fitness of the optimal individual, and transmits the value to the corresponding quantum logic revolving gate; the quantum part mainly uses the quantum logic revolving gate to operate the quantum state corresponding to the population individual quantum state encoding according to the rotation angle and rotation direction. It should be noted that the selection operation method proposed in the present invention optimizes and improves the quantum state operation on each coding bit in the population individual quantum state encoding. After optimization, the rotation angle value only acts on the coding bit where the population individual quantum state encoding is different from the corresponding bit quantum state of the optimal individual quantum state encoding, and the rotation angle values on other coding bits are set to 0. The improved method provided by the present invention aggregates the direction of searching for a better solution on the basis of ensuring the space for searching for a better solution, thereby reducing the probability of generating a poor population individual.
[0156] 2.4 Mutation and crossover quantum circuits
[0157] 1) Design and construct mutation operation quantum circuits.
[0158] The idea of mutation operation in classical GA is to mutate a coding position of chromosome, so that the gene of the position becomes its allele, that is, "0" in binary code becomes "1", and "1" becomes "0". Through understanding and transformation of this idea, the present invention implements mutation operation for quantum state coding of chromosome using quantum Pauli-X gate. For any quantum state |φ>=α|0>+β|1>, after the action of quantum Pauli-X gate, a new quantum state |φ′> is obtained. The specific calculation derivation is as follows:
[0159]
[0160] According to the above formula, it can be concluded that the probability amplitude of the new quantum state |φ′> is exactly opposite to the probability amplitude of the quantum state |φ>, and the probability of 0 after measurement becomes |β| 2 , the probability of measuring 1 becomes |α| 2 , realizing the mutation operation.
[0161] See also Figure 7 , Figure 7 It is a mutation operation quantum circuit built on the basis of quantum Pauli-X gate. The circuit is mainly divided into quantum part and classical part. The quantum part mainly randomly selects a bit in the individual quantum state encoding of the population, applies the quantum Pauli-X gate to the bit, and controls the quantum Pauli-X gate through a quantum auxiliary bit. The function of the quantum logic gate RY on the quantum auxiliary bit is to adjust the probability amplitude of the ground state |0> and the ground state |1> on the auxiliary quantum bit, thereby controlling the probability of mutation. When the auxiliary bit is measured as 1, the Pauli-X gate randomly acts on the i-th bit of the individual quantum state encoding of the population. When the auxiliary quantum measurement is 0, the Pauli-X gate does not work. The classical part mainly calculates the value of the rotation angle θ.
[0162] 2) Design and construct cross-operation quantum circuits.
[0163] The idea of crossover operation in classical GA is to randomly select several codes at the same position between two population individuals to exchange and form new individuals. For the quantum state coding of population individuals, the present invention uses quantum logic gate SWAP to implement crossover operation. Taking quantum states |10> and |01> as an example, after applying quantum logic gate SWAP, the new quantum state matrix is obtained in the form of:
[0164]
[0165]
[0166] According to formulas (2.20), (2.21) and the quantum state matrix form, it can be deduced that after the quantum state |10> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |01>, and after the quantum state |01> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |10>, realizing the crossover operation.
[0167] See also Figure 8 , Figure 8 It is a quantum circuit diagram of crossover operation designed and constructed. The diagram is also divided into quantum part and classical part. The quantum part randomly selects the gene code at the same position on the two population individuals, performs the exchange operation by acting on the quantum logic gate SWAP, and uses a quantum auxiliary bit to control the quantum logic gate SWAP. The quantum logic gate RY acting on the quantum auxiliary bit is mainly to adjust the probability amplitude of the quantum state on the auxiliary quantum bit and control the corresponding probability of the crossover operation. When the auxiliary bit is measured as 1, the quantum logic gate SWAP acts on the chromosome code randomly selected at the same position on the two population individuals. When the auxiliary quantum measurement is 0, the quantum logic gate SWAP does not work. The classical part mainly calculates and adjusts the rotation angle θ.
[0168] 2.5 Quantum state measurement
[0169] After the above series of quantum logic gates, it is necessary to perform quantum measurement on the individual quantum state encodings of the population. Quantum measurement is generally implemented using the standard computing ground state |0> or |1>. After quantum measurement, the quantum state will collapse to a certain state and obtain a certain value. The present invention measures the individual quantum state encodings of the population to obtain a string of 0s and 1s, which is also the solution to the problem.
[0170] The quantum circuit corresponding to quantum measurement is relatively simple, such as Fig. 9 As shown, just add quantum measurement equipment to the corresponding quantum circuit. After quantum measurement, the data needs to be post-processed in the classical part. The post-processing mainly includes judging the string data according to the problem constraints, retaining the string data that meets the conditions, and marking the population algebra on the string data.
[0171] After quantizing the steps of population individual encoding, selection operation, mutation operation, crossover operation and quantum measurement, the quantum circuits of these steps can be optimized and combined to construct a quantum circuit based on QGA, such as Fig.10 shown.
[0172] In order to verify the feasibility and computational complexity of the method provided by the present invention, the following experimental research and analysis are carried out. First, the quantum circuit of the quantum enhanced solution method based on QGA is tested on the quantum simulation platform to verify the effectiveness and rationality of the corresponding quantum circuit of this method. Secondly, the experimental results of another application document of the applicant of this case on the task cutting and grouping problem in the joint combat campaign and the experimental results of another application document on the platform clustering and grouping problem in the joint combat campaign are used to compare the quantum enhanced solution method based on QGA and the classical GA, and the experimental results are analyzed; finally, the time complexity of the quantum enhanced solution method based on QGA and the time complexity of the classical GA are compared and analyzed.
[0173] This experiment was mainly completed in the quantum software development environment and quantum computing cloud service platform based on the Python3 framework. The task and platform data used in the experiment mainly come from the task segmentation and grouping results in Chapter 2 and the platform clustering and grouping results in Chapter 4. The specific data is shown in 1.1 in Appendix A. Each group of data contains 15 task data and 23 platform data. There are 12 specific resource attributes involved in tasks and platforms.
[0174] 1) Quantum circuit testing
[0175] The present invention tests the constructed quantum circuit on the quantum computing simulation cloud service platform. Fig.11 As shown, in Fig.10 Based on this, a quantum circuit consisting of 10 qubits is constructed. In the quantum circuit, the first 2 qubits are control bits, which control the mutation operation and the crossover operation respectively, and the last 8 bits represent two chromosomes, each of which contains 4 qubits. The present invention focuses on testing and verifying the correctness and accuracy of the quantum circuit when performing selection operations, mutation operations, and crossover operations.
[0176] First, the selection operation in the quantum circuit is tested and verified. Fig.11 In the example, we select quantum logic gates RY acting on qubits 5 and 9, set their corresponding rotation angles θ to 30°, 45°, and 60° respectively, set the rotation angles θ corresponding to other quantum logic gates to 0°, and measure the quantum circuit. The measurement results are shown in Figure 1. Fig.12 As shown by Fig.12It can be seen that when the rotation angle θ corresponding to the quantum logic gate RY on the two qubits is 30°, the probability that the measurement results of the two qubits are both 0 is 56.25%, the probability that one of the two qubits is 0 and the other is 1 is 18.75% respectively, and the probability that the measurement results of the two qubits are both 1 is 6.25%; when the rotation angle θ corresponding to the quantum logic gate RY on the qubit is 45°, the probability that the measurement results of the two qubits are both 0 is 25%, the probability that one of the two qubits is 0 and the other is 1 is 25% respectively, and the probability that the measurement results of the two qubits are both 1 is also 25%; when the rotation angle θ corresponding to the quantum logic gate RY of the qubit is 60°, the probability that the measurement results of the two qubits are both 0 is 6.25%, the probability that one of the two qubits is 0 and the other is 1 is 18.75% respectively, and the probability that the measurement results of the two qubits are both 1 is 56.25%. By analyzing the measurement results, it can be seen that the experimental measurement results are consistent with the theoretical analysis results of the present invention.
[0177] Next, the mutation operation in the quantum circuit is tested and verified. Fig.11 In the example, we select the quantum logic gate RY acting on the 0th quantum bit, set its corresponding rotation angle θ to 30°, 45°, and 60° respectively, set the rotation angle θ corresponding to other quantum logic gates to 0°, and measure the quantum circuit. The measurement results are shown in Figure 1. Fig.13 As shown, when the rotation angle θ corresponding to the quantum logic gate RY on the 0th qubit is 30°, the probability that the measurement results of the 0th, 3rd and 7th qubits are all 0 is 75%, and the probability that the measurement results of the 0th, 3rd and 7th qubits are all 1 is 25%; when the rotation angle θ corresponding to the quantum logic gate RY on the 0th qubit is 45°, the probability that the measurement results of the 0th, 3rd and 7th qubits are all 0 is 50%, and the probability that the measurement results of the 0th, 3rd and 7th qubits are all 1 is also 50%; when the rotation angle θ corresponding to the quantum logic gate RY on the 0th qubit is 60°, the probability that the measurement results of the 0th, 3rd and 7th qubits are all 0 is 25%, and the probability that the measurement results of the 0th, 3rd and 7th qubits are all 1 is 75%. By analyzing the measurement results, it can be seen that the experimental measurement results are also consistent with the theoretical analysis results of the present invention.
[0178] Then, the crossover operation in the quantum circuit is also tested and verified. Fig.11In the example, the quantum logic gate RY acting on the qubit 1 is selected, and its corresponding rotation angles θ are set to 30°, 45°, and 60° respectively. In order to facilitate the observation of the measurement results, the rotation angles θ corresponding to the quantum logic gates RY acting on the qubits 4 and 5 are set to 90°, and the rotation angles θ corresponding to the remaining quantum logic gates are set to 0°, and the quantum circuit is measured. The measurement results are shown in Figure 1. Fig.14 As shown, when the rotation angle θ corresponding to the quantum logic gate RY on qubit No. 1 is 30°, the measurement results of qubits No. 1, 8, and 9 are all 0, and the probability that the measurement results of qubits No. 4 and 5 are both 1 is 75%, and the measurement results of qubits No. 1, 8, and 9 are all 1, and the probability that the measurement results of qubits No. 4 and 5 are both 0 is 25%; when the rotation angle θ corresponding to the quantum logic gate RY on qubit No. 1 is 45°, the measurement results of qubits No. 1, 8, and 9 are all 0, and the probability that the measurement results of qubits No. 4 and 5 are both 0 is 25%. The probability that the measurement results of qubits 1 and 5 are all 1 is 50%, and the probability that the measurement results of qubits 1, 8 and 9 are all 1, and the measurement results of qubits 4 and 5 are all 0 is also 50%; when the rotation angle θ corresponding to the quantum logic gate RY on qubit 1 is 60°, the measurement results of qubits 1, 8 and 9 are all 0, and the probability that the measurement results of qubits 4 and 5 are all 1 is 25%, and the measurement results of qubits 1, 8 and 9 are all 1, and the probability that the measurement results of qubits 4 and 5 are all 0 is 75%. By analyzing the measurement results, it can be seen that the experimental measurement results are also consistent with the theoretical analysis results of the present invention.
[0179] 2) Result analysis
[0180] Taking the first group of tasks and platform data in a certain military C2 organization as an example, a simulation experiment comparative analysis was carried out on the quantum enhanced solution method based on QGA proposed in the present invention and the classical GA algorithm. The specific experimental parameters were uniformly set to a population size of 50, a number of iterations of 100, a mutation probability of 0.02, and a crossover probability of 0.4.
[0181] Table 1 Comparison of experimental results of two algorithms
[0182]
[0183] Please refer to Table 1, which shows the experimental results of the two algorithms. It can be clearly seen from the statistical data in Table 1 that the number of times the method proposed in the present invention obtains the corresponding solution to the problem is significantly higher than that of the classical GA algorithm, and the average number of iterations used by this method to obtain the corresponding solution to the problem and the average running time of the algorithm are less than those of the classical GA algorithm. The main reason is that the method proposed in the present invention utilizes the characteristics of true randomness and superposition of quantum to optimize and improve the selection operation, mutation operation and crossover operation in GA, thereby overcoming the defects of premature maturity and local convergence of the classical GA algorithm. From the experimental results, the method proposed in the present invention has certain improvements and enhancements in accuracy and timeliness.
[0184] See also Fig.15 , Fig.15 Comparative results are calculated for the objective functions of the two algorithms. Fig.15 (a), 15(b), 15(c) and 15(d) are the comparison diagrams of the objective function calculation of the two algorithms for optimizing the configuration of the first group of tasks and platform data for the first, second, third and fourth clusters, respectively. Fig.15 It can be seen that the optimization process of the quantum enhanced solution method based on QGA provided by the present invention is better than the optimization process of the classical GA algorithm. Fig.15 In (a), the objective function of the quantum enhanced solution method based on QGA reaches the optimal value (8) when the average number of iterations is 48.3, while the objective function of the classical GA algorithm reaches the optimal value (8) when the average number of iterations is 72.6. Fig.15 In (b), the objective function of the quantum enhanced solution method based on QGA reaches the optimal value (12) when the average number of iterations is 52.6, while the objective function of the classical GA algorithm reaches the optimal value (12) when the average number of iterations is 78.3. Fig.15 In (c), the objective function of the quantum enhanced solution method based on QGA reaches the optimal value (9) when the average number of iterations is 50.2, while the objective function of the classical GA algorithm reaches the optimal value (9) when the average number of iterations is 75.1. Fig.15 In (d), the objective function of the quantum enhanced solution method based on QGA reaches the optimal value (12) when the average number of iterations is 56.5, while the objective function of the classical GA algorithm reaches the optimal value (12) when the average number of iterations is 80.4. Since the quantum enhanced solution method based on QGA improves the optimization process of the algorithm, the number of iterations has been greatly reduced, thereby improving the operating efficiency of the algorithm.
[0185] Similarly, the same simulation comparison test is performed on the second and third groups of task and platform data in a certain military C2 organization. Tables 2 and 3 are the comparison tables of the experimental results of the two algorithms in the second and third groups of task and platform data, respectively. Fig.16 and Fig.17 The following are comparison diagrams of the objective function calculations of the two algorithms in the second and third groups of tasks and platform data. From the experimental results of the two groups of data, it can be seen that the quantum enhanced solution method based on QGA proposed in the present invention is superior to the classical GA algorithm in terms of accuracy and timeliness.
[0186] Table 2 Comparison of experimental results of the two algorithms in the second group of tasks and platform data
[0187]
[0188] Table 3 Comparison of experimental results of the two algorithms in the third group of tasks and platform data
[0189]
[0190] 3) Time complexity analysis
[0191] The quantum enhanced solution method based on QGA proposed in the present invention is mainly composed of a quantum part and a classical part. The quantum part mainly realizes population encoding, selection operation, mutation operation and crossover operation; the classical part mainly realizes quantum logic rotating gate parameter adjustment, objective function calculation and other tasks. According to the research content of the prior art literature and the idea of the method of the present invention, it is analyzed that the operating efficiency of the method is mainly affected by factors such as population size, chromosome length (number of quantum bits) and number of iterations, and its time complexity is O (nmt), where n is the population size, m is the chromosome length, and t is the number of iterations. According to the research content of the prior art literature, the operating efficiency of the classical GA algorithm is also mainly affected by factors such as population size, chromosome length and number of iterations, and its time complexity can also be expressed as O (nmt ′), where n is the population size, m is the chromosome length, and t ′ is the number of iterations. According to the experimental test results of the present invention, the number of iterations of the quantum enhanced solution method based on QGA is significantly lower than the number of iterations of the classical GA algorithm. Therefore, for the task-platform optimization configuration problem in military C2 organizations, the operating efficiency of the quantum enhanced solution method based on QGA is significantly better than that of the classical GA algorithm, and its time complexity is proportional to the number of iterations compared with the time complexity of the classical GA algorithm.
[0192] In summary, the present invention provides a quantum enhanced solution method based on QGA for the task-platform optimization configuration problem in military C2 organizations. The method firstly utilizes the true randomness and entanglement of quantum to realize the encoding of the corresponding relationship between tasks and platforms with quantum states, and determines the optimal individual in the population using the fitness function; secondly, the selection operation in the algorithm is realized by using quantum logic gates, and the rotation angle and direction of the quantum logic gate are determined by the fitness difference between each chromosome and the optimal chromosome; then, the mutation operation and crossover operation in the algorithm are realized by using quantum logic gate X and quantum logic gate SWAP respectively. Experimental results show that compared with the classical GA algorithm, the method proposed by the present invention has higher accuracy and timeliness, and the number of algorithm iterations and time complexity are greatly reduced, which can be effectively used to solve the task-platform optimization configuration problem in military C2 organizations.
Claims
1. A method for solving task-platform optimization configuration problems based on QGA quantum enhancement, characterized in that: The following steps are involved: S1 builds the mathematical model corresponding to the task-platform optimization configuration problem; S2, based on the constructed mathematical model, maps the correspondence between tasks and platforms into the quantum ground state corresponding to the qubit, arranges and combines the qubits in sequence to form the corresponding chromosome, and initializes the population according to the optimization strategy; S3 establishes a fitness function, calculates the fitness value of each chromosome in the population according to the fitness function, and determines the optimal chromosome in the population; S4 determines the rotation angle and direction of the quantum logic gate according to the difference between the fitness value of each chromosome in the population and the fitness value of the optimal chromosome, and uses the quantum logic gate to implement the selection operator in GA; S5 designs corresponding quantum logic gates to implement mutation and crossover operators in GA according to the number and state of qubits in the chromosome; S6 designs the corresponding quantum circuit according to the QGA process to solve the problem.
2. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 1 is characterized in that: The S1 is specifically implemented according to the following scheme: S11 Constructing a mathematical model of the problem based on the relationship between tasks and platforms in military C2 organizations Assume that the number of tasks contained in the task cluster is N, and each task is denoted as ti, where i∈N; the number of platforms contained in the platform cluster is M, and each platform is denoted as pj, where j∈M; The relationship between task ti and platform pj is expressed as C ij , where C ij ∈{0,1}, the relationship between tasks and platforms is the demand and supply relationship of resources. If platform pj provides resources to task ti, then C ij =1, if platform pj does not provide resources for task ti, then C ij =0, and the following expression is established based on the relationship between the task and the platform: Based on formula (1), let each resource required by each task be provided by one or a few platforms. The corresponding mathematical model is expressed as: S12 constructs the constraints of the problem based on the resource demand and resource supply relationship between the task and the platform Assume that the total resource types required by the task cluster are denoted as N′, and the resource types required by task ti are denoted as Resources required for task ti The number is expressed as Where k∈N′; the total resource types provided by the platform cluster are represented as M′, and the resource types provided by platform pj are represented as Platform pj provides resources The number is expressed as Platform pj provides resources for task ti The number is expressed as Where k∈M′. In actual combat, the total resource types N′ required by the task cluster are less than or equal to the total resource types M′ provided by the platform cluster. The redundant resource types provided by the platform are irrelevant to the construction of constraints. Therefore, only the resource types required to complete the task are considered. The total resource types provided by the platform cluster are expressed as N′. The constraint expression established by the resource supply and demand relationship between the task and the platform is as follows: In formulas (3) and (4), i∈N, j∈M, k∈N′. Formula (3) indicates that for any resource, the demand of each task for the resource is less than or equal to the sum of the supply of the resource by the platforms associated with it; Formula (4) indicates that for any resource, the supply of the resource by each platform is greater than or equal to the sum of the demand of the resource by the tasks associated with it; In order to solve the task-platform optimization configuration problem in military C2 organizations, the optimization objectives of the entire problem model are constructed as follows: C ij ∈{0,1} (8) In the entire problem model, the constraints are as follows: the demand of each task for any type of resource is less than or equal to the sum of the resources that can be provided by the platforms associated with it; the supply of any type of resource by each platform is greater than or equal to the sum of the resources requested by the tasks associated with it; the relationship between tasks and platforms is represented by a Boolean variable, whose value is 0 or 1.
3. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 2 is characterized in that: The S2 is specifically implemented according to the following scheme: S21 quantum state encoding In a two-level quantum system, any quantum state |φ> can be expressed as follows: |φ>=α|0>+β|1> (9) In formula (9), α and β are both complex numbers, representing the probability amplitude of the corresponding state, and |α| 2 +|β| 2 =1, at any time, the quantum state |φ> is in the superposition of the ground state |0> and the ground state |1>, and after the standard basis measurement, it will collapse to the ground state |0> or the ground state |1>, and the probability of collapsing to the ground state |0> is |α| 2 , the probability of collapse to the ground state |1> is |β| 2 , α and β range from 0≤α, β≤1, and the following encoding form is defined according to the quantum state probability amplitude corresponding to each qubit: If one qubit corresponds to one coding bit in a chromosome, the chromosome that requires m coding bits can be expressed as follows: In formula (11), each qubit consists of a superposition of two ground states, so each coding bit in the chromosome is in a superposition of two states. A chromosome with m coding bits is in a superposition of 2 states at the same time. m The superposition of states; S22 Initialize population quantum circuit Aiming at the task-platform optimization configuration problem in military C2 organizations, the relationship between tasks and platforms is converted into chromosomes and expressed by formula (11). The initial population is assumed to be Where n represents the population size, t represents the current population evolution generation, represents the chromosome quantum state encoding, i represents the i-th individual in the population, i = 1, 2, ..., n, and the total length of the chromosome is m. Each chromosome consists of several genes, and each gene includes the association relationship between a task and all platforms; S221 initializes m qubits according to the number of chromosome coding bits m and the population size n, and the initial ground state of each qubit is set to |0>; S222 applies a quantum logic gate H to each qubit, so that each qubit is in a superposition state of |0> and |1>; S223 measures the quantum state using a standard computing basis and randomly obtains an m-bit string corresponding to a chromosome; S224 judges the chromosome according to the constraints of formulas (6) and (7), and when the chromosome meets the constraints, the chromosome is added to the population; when the chromosome does not meet the constraints, the chromosome is discarded; S225 repeats S221-S223 to measure the quantum state and judge the chromosome until the population size n is reached. The specific calculation derivation is as follows:
4. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 3 is characterized in that: The S3 uses formula (5) as the fitness function, calculates the fitness value of each chromosome in each population, arranges the fitness values in ascending order, and selects the individual corresponding to the minimum fitness value as the target of the next optimization. The individual corresponding to the minimum fitness value is the optimal chromosome.
5. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 4 is characterized in that: The S4 is specifically implemented according to the following scheme: S41 determines the rotation angle and rotation direction in the quantum logic rotating gate according to the difference between the fitness value of each chromosome in the population and the fitness value of the optimal chromosome. The matrix expression of the quantum logic rotating gate RY is as follows: In formula (12), 0≤θ≤π / 2; For any quantum state |φ>=α|0>+β|1>, a new quantum state |φ′> is obtained by performing a unitary operation using the quantum logic rotation gate RY. The specific calculation derivation is as follows: In formula (13), α and β are the probability amplitudes corresponding to the quantum state before the quantum logic rotating gate acts, and α′ and β′ are the probability amplitudes corresponding to the quantum state after the quantum logic rotating gate acts; There are two positional relationships between the quantum state |φ> before the quantum logic revolving door and the quantum state |φ′> after the quantum logic revolving door. One of the positional relationships is expressed as follows: α′=cosθ″=cos(θ+θ′)=cosθcosθ′-sinθsinθ′=αcosθ-βsinθ (14) β′=sinθ″=sin(θ+θ′)=sinθcosθ′+cosθsinθ′=αsinθ+βcosθ (15) Another position relationship is expressed as follows: α′=cosθ″=cos(θ′-θ)=cosθ′cosθ+sinθ′sinθ=αcosθ+βsinθ (16) β′=sinθ″=sin(θ′-θ)=sinθ′cosθ-cosθ′sinθ=βcosθ-αsinθ (17) From the analysis of formulas (14)-(16), it can be concluded that when 0≤θ′<θ″≤π / 2, when rotating counterclockwise, the rotation angle direction is positive; when 0≤θ″<θ′≤π / 2, when rotating clockwise, the rotation angle direction is negative. Combined with the encoding form of the population described in S2, when rotating in the direction of the vector state |1>, the rotation angle direction is positive; when rotating in the direction of the vector state |0>, the rotation angle direction is negative. The adaptive adjustment rotation strategy of the rotation angle θ in S42 is expressed by the following formula: In formula (18), fv, fv_min, fv_max represent the fitness of any individual in the current population, the minimum fitness of individuals in the current population, and the maximum fitness of individuals in the current population, respectively, and λ is a setting parameter; S43 Using quantum logic gates to implement selection operators in GA The selection operation quantum circuit diagram mainly consists of two parts: classical and quantum. The classical part calculates the rotation angle and direction according to the difference between the current individual fitness and the optimal individual fitness, and transmits the value to the corresponding quantum logic revolving gate; The quantum part uses quantum logic rotating gates to operate the quantum states corresponding to the individual quantum states of the population according to the rotation angle and direction.
6. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 5 is characterized in that: In S4, when the difference between the fitness value of the population individual and the fitness value of the optimal individual is large, it means that there is a large gap between the current individual and the optimal individual, and the rotation angle value is set to be larger accordingly; when the difference between the fitness of the population individual and the fitness of the optimal individual is small, it means that the gap between the current individual and the optimal individual is small, and the rotation angle value is set to be smaller accordingly.
7. The method for solving the task-platform optimization configuration problem based on QGA quantum enhancement according to claim 6 is characterized in that: The S5 is specifically implemented according to the following scheme: S51 Design and construction of mutation operation quantum circuit For any quantum state |φ>=α|0>+β|1>, after the action of the quantum Pauli-X gate, a new quantum state |φ′> is obtained. The specific calculation derivation is as follows: Through the above formula, it can be concluded that the probability amplitude of the new quantum state |φ′> is exactly opposite to the probability amplitude of the quantum state |φ>, and the probability of 0 after measurement becomes |β| 2 , the probability of measuring 1 becomes |α| 2 , which realizes the mutation operation; S52 Design and build cross-operation quantum circuits After using quantum states |10> and |01> to act on quantum logic gate SWAP, the new quantum state matrix is obtained in the form of: According to formulas (20), (21) and the quantum state matrix form, it is deduced that after the quantum state |10> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |01>, and after the quantum state |01> is acted on by the quantum logic gate SWAP, the new quantum state obtained is |10>, realizing the crossover operation.
Citation Information
Cited By
Multi-SoC cooperative task allocation method based on quantum ant colony optimization
CN121070574A
5G base station deployment optimization method based on improved quantum evolutionary algorithm
CN122294129A