A method for solving SAT problems by combining CDCL solver and quantum annealer
By decomposing the SAT problem into binary clauses and combining the embedding strategy of CDCL solver and quantum annealer, the problem of low efficiency in solving SAT problems on quantum computers is solved, and the ability to efficiently solve SAT problems on limited-size devices is achieved. .
Patent Information
- Application Number
- CN202210273289.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-03-18
AI Technical Summary
Existing technologies are difficult to efficiently solve the SAT problem on quantum computers of limited size, especially due to the size limitations of the quantum annealer and the low efficiency of variable embedding.
Each ternary clause of the SAT problem was disassembled into a dual clause by introducing auxiliary variables, and the target function of the QUBO problem based on the dual clause was built in combination Greed strategy and VSIDS activity value adjustment to improve solution efficiency.
The limited-size quantum annealer significantly speeds up the solving efficiency of SAT problems, can efficiently solve SAT problems with a large number of variables, and optimizes the solving process in conflict situations, improving the ability to solve complex problems.
Smart Images

Figure CN114638162B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of quantum computers, and in particular relates to a method for solving a SAT problem by combining a CDCL solver and a quantum annealer. Background Art
[0002] According to the literature (Nested quantum search and structured problems. Physical Review A, 61(3): 032303, 2000), Grover's algorithm can accelerate kSAT problems, where k>3. Quantum approximate optimization algorithms and quantum random walks also show significant acceleration in low-backbone SAT problems. These algorithms require gate-based quantum computers with a large number of qubits, which are not yet available.
[0003] According to the literature (Fast clique minor generation in chimera qubit connectivity graphs. Quantum Information Processing, 15(1): 495–508, 201), the main challenge of quantum annealing is related to the embedding process. First, each sub-function is embedded into a hardware graph. The same variables in different sub-functions are connected by lines. Secondly, the mapping or connection of variables is adjusted globally. All embedding methods involve two computational processes performed in polynomial time complexity.
[0004] First, the routing calculates the shortest path between physical qubits, and the overlap between routes needs to be considered. Second, the frequently unsuccessful embedding results are iteratively adjusted. Klymko et al. proposed the embedding of the maximum complete problem graph for a given hardware graph in the literature (Adiabatic quantum programming: minor embedding with hard faults. Quantum information processing, 13(3): 709–729, 201). The quantum unconstrained binary optimization (QUBO) problem with a qubit number smaller than this complete problem graph can be embedded. However, due to the sparse problem graph caused by auxiliary variables, this method embeds fewer variables.
[0005] In order to overcome the engineering limitations of quantum computers, many quantum-classical hybrid algorithms have been developed, including the eigenvalue decomposition method proposed in the literature (A variational eigenvalue solver on a photonic quantum processor. Nature communications, 5 (1): 1–7, 201), the prime factor decomposition method proposed in the literature (g. In Proceedings 35thannual symposium on foundations of computer science, pages 124–134. IEEE, 1994), and the material simulation method proposed in the literature (Hybrid quantum and molecular mechanical simulations: an alternative avenue to solvent effects in organic chemistry. Accounts of chemical research, 29 (6): 298–305, 199). They decompose the problem into multiple sub-problems, some of which may be accelerated by quantum computers. The paper (Improving solutions by embedding larger subproblems in a d-wave quantum annealer. Scientific reports, 9(1):1–10, 2019) samples subproblems through QA to accelerate the classical local search in large-scale QUBO problems. He adopted an embedding strategy similar to the method proposed by Klymko in the previous paper.
[0006] Combining the two classic solving methods can achieve better solving results. The literature (Deep cooperation of cdcl and local search for sat. In International Conference on Theory and Applications of Satisfiability Testing, pages 64–81. Springer, 2021) proposed a hybrid conflict-driven sentence learning algorithm (CDCL) solver based on local search, and the literature (Can q-learning with graph networks learn a generalizable branching heuristic for a sat solver? arXiv preprint arXiv:1909.11830, 2019.) proposed a hybrid CDCL solver based on reinforcement learning to improve decision heuristics or stage selection. However, since relatively small sub-instances are unlikely to reflect the global structure of the entire instance, acceleration stability cannot be guaranteed on a larger scale.
[0007] The Boolean Satisfiability Problem (SAT) is a non-deterministic polynomial-time (NP) complete problem that exists in multiple research areas. The complexity and size of SAT instances affect the capabilities and performance of solvers. Quantum annealers (QAs) can outperform conventional solvers in solving complex SAT problems by exploiting the quantum physics properties inherent to their structure. However, the relatively small size of current quantum computers has so far limited quantum annealers to small-scale problems. Summary of the invention
[0008] The present invention provides a method for solving the SAT problem by combining a CDCL solver and a quantum annealer. The method can efficiently solve the SAT problem on a quantum annealer of finite size.
[0009] A method for solving a SAT problem by combining a CDCL solver and a quantum annealer, comprising:
[0010] (1) Each ternary clause of the SAT problem is decomposed into binary clauses by introducing auxiliary variables, and the objective function of the QUBO problem is constructed based on the binary clauses;
[0011] (2) We define the lines that connect quantum bits horizontally in the quantum annealer as horizontal links, the lines that connect quantum bits vertically as vertical links, and the lines that connect quantum bits obliquely as diagonal links. The original variable assignment of each ternary clause and the auxiliary variable assignment of the ternary clause to decompose the ternary clause into binary clauses are embedded into the physical qubits in the quantum annealer through a greedy strategy. The physical qubits include column qubits and row qubits. Each original variable assignment is embedded into the column qubit, and the auxiliary variable assignment is embedded into the row qubit. The row qubits are diagonally linked to the column qubits. The row qubits corresponding to the associated auxiliary variables are connected through horizontal links to obtain a quantum annealer with embedded variables.
[0012] (3) The objective function is recursively solved by a quantum annealer with embedded variables and / or a CDCL solver to determine whether the SAT problem has a solution or not.
[0013] The row qubits are connected diagonally to the column qubits, including:
[0014] The original variable associated with the auxiliary variable is taken as the relevant original variable, the column qubit corresponding to the relevant original variable assignment is taken as the relevant column qubit, and the relevant column qubit is linked to the row qubit through a slash.
[0015] Solving the objective function through a quantum annealer and a CDCL solver embedded in the variables, including: if the assignment of the original variables and the assignment of the auxiliary variables are both embedded in physical quantum bits, solving the objective function through a quantum annealer to determine whether the SAT problem has a solution or not.
[0016] The objective function is solved by the quantum annealer and CDCL solver with embedded variables. If only some of the original variables and the auxiliary variables can be embedded into the physical qubits and the solution of the objective function is obtained, the steps for solving the SAT problem are:
[0017] The solution of the binary or ternary clause containing the assignment of the first variable is obtained by the CDCL solver, and the solution of the objective function with the second to N+2 variables is obtained by using the quantum annealer embedded with the assignment of the second to N+2 variables. If no conflict occurs, the CDCL solver and the quantum annealer are used to recursively solve the solution of the objective function of the remaining variables until the ternary clauses of all the original variables contained in the SAT problem are solved, so as to complete the solution of the SAT problem, where N is the number of variables.
[0018] The objective function is solved by the quantum annealer and CDCL solver with embedded variables. If only some of the original variable assignments and the auxiliary variable assignments can be embedded into the physical qubits and conflicts occur, the steps for solving the SAT problem are:
[0019] (a) When a CDCL solver is used to solve a binary or ternary clause containing a value of the first variable, and a quantum annealer embedded with the value of the second to N+2 variables is used to solve a target function having the second to N+2 variables, a conflict occurs. Then, the first variable is reassigned, and the CDCL solver and the quantum annealer embedded with the value of the variable are used again to solve the target function having the first to N+2 variables;
[0020] (b) After obtaining the solutions of the objective functions of the variables 1 to N+2 within the threshold of the number of variable assignments, the CDCL solver and the quantum annealer are continued to recursively obtain the solutions of the objective functions of the remaining variables until the binary or ternary clauses of all the original variables contained in the SAT problem are solved, and the solution of the SAT problem is completed.
[0021] When a conflict occurs when a quantum annealer embedded with variable assignments from 2 to N+2 is used to obtain a solution to an objective function with variables from 2 to N+2, the CDCL solver is used to trace back to the ternary clause that caused the conflict, and the VSIDS activity value of the ternary clause that caused the conflict is multiplied by a constant value, and the VSIDS activity value of the ternary clause that did not cause a conflict during the solution process is multiplied by a decay value, and the VSIDS activity value of the solved ternary clause is reassigned. Based on the reassigned VSIDS activity value, the corresponding ternary clauses are reordered so that the ternary clauses that cause the conflict can be solved first by the CDCL solver. The VSIDS activity value is proposed in the literature (.A practical heuristic for finding graph minors.arXivpreprint arXiv:1406.2741,2014), and the activity value is a floating point number. The larger the value, the more likely the sentence is to cause a conflict.
[0022] By introducing auxiliary variables, each ternary clause of the SAT problem is decomposed into binary clauses:
[0023] c i = l 1 ∨l 2 ∨l 3
[0024]
[0025] c i ,2=l 3 ∨a
[0026] Among them, c i is the i-th ternary clause, l 1 , l 2 , l 3 They are ternary clauses c i The three original variables, ci ,1,c i ,2 respectively decompose the i-th ternary clause into the first binary clause and the second binary clause, and a is an auxiliary variable.
[0027] And the objective function H(c) of the QUBO problem is constructed based on the binary clause as:
[0028]
[0029]
[0030] H(a∨l 3 )=1-aH(l 3 )+aH(l 3 )
[0031] Where H(·) is the objective function of the QUBO problem. When the global minimum value of the objective function H(c) corresponding to c is 0, there is a satisfiable solution. j is the index of the binary clause, and n is the number of ternary clauses.
[0032] The SAT problem plays a vital role in computer science, graph theory, complexity theory, cryptographic systems, artificial intelligence and other fields. The present invention provides a method combining a CDCL solver and a quantum annealer to efficiently solve the SAT problems in the above fields.
[0033] A classic graph theory problem - the graph coloring problem, stipulates that adjacent nodes cannot have the same color. Can the entire graph be colored with 4 colors? This can be transformed into a SAT problem. The four colors can be encoded as binary 00, 01, 10, 11. If node 1 and node 2 are adjacent, node 1 is defined as (c 1,0 c 1,1 ), node 2 defines the color as (c 2,0 ,c 2,1 ), then the sentence constraining different colors is (c 1,0 ∨c 2,0 )∧(c 1,0 ∨c 1,1 )=0, the whole coloring problem is transformed into a SAT problem, which can be solved by applying our algorithm.
[0034] Another typical production application is the automated testing of vehicles. The final stage of vehicle production requires many types of tests, each of which includes multiple features of the vehicle. Manufacturers hope to reduce the number of tests as much as possible and speed up the testing process to reduce costs while ensuring that all performance of the vehicle meets the standards. We convert the features into variables in the SAT problem. The value of the variable is 1, indicating that this test needs to test this feature of the vehicle, and the value of the variable is 0, indicating that this test does not need to test this feature of the vehicle. A test is converted into a sentence in the SAT problem. In this way, it can be solved using the algorithm we defined.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] (1) The present invention firstly embeds a quantum annealer with multiple variable assignments to assist in solving multiple variables at the same time, thereby accelerating the efficiency of solving the SAT problem. Furthermore, the CDCL solver and the quantum annealer with embedded variables are used for recursive solution, so that the SAT problem with a large number of variables can be efficiently solved in the case of a quantum annealer of limited size.
[0037] (2) The present invention first uses a CDCL solver to obtain a solution to the assignment of a variable in the SAT problem. If there is a solution, a quantum annealer with embedded variables is used to simultaneously solve the assignments of multiple variables, so that the SAT problem can be solved efficiently.
[0038] (3) In the process of solving the problem using the quantum annealer with embedded variables, if a conflict is found, the CDCL solver returns the conflicting ternary clauses, and reassigns the VSIDS activity values involved in solving the ternary clauses, so that the CDCL solver can first solve the ternary clauses with higher conflicts, thereby improving the solving efficiency.
[0039] (4) The present invention provides a method combining a CDCL solver and a quantum annealer to efficiently solve SAT problems in the fields of computer science, graph theory, complexity theory, cryptographic systems, artificial intelligence, and the like. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A structural diagram of assigning values to quantum annealer embedded variables provided for a specific implementation;
[0041] Figure 2 Chimera hardware structure diagram in quantum annealer provided for specific implementation;
[0042] Figure 3 A relationship diagram between conflict ratio and acceleration is provided for a specific implementation method. DETAILED DESCRIPTION
[0043] The present invention provides a method for solving the SAT problem by combining a CDCL solver and a quantum annealer, comprising:
[0044] (1) By introducing auxiliary variables, each ternary clause of the SAT problem is decomposed into binary clauses, the SAT problem is encoded into a QUBO problem, and the objective function of the QUBO problem is constructed based on the binary clauses;
[0045] In this case, each ternary clause of the SAT problem is decomposed into two-element clauses by introducing auxiliary variables, and a given clause c containing a ternary variable is i = l 1 ∨l 2 ∨l 3 , the clause can be decomposed into two clauses by introducing auxiliary variables:
[0046] c i = l 1 ∨l 2 ∨l 3
[0047]
[0048] c i,2 = l 3 ∨a
[0049] Among them, c i is the i-th ternary clause, l 1 , l 2 , l 3 They are ternary clauses c i The three original variables, c i ,1,c i ,2 respectively decompose the i-th ternary clause into the first binary clause and the second binary clause, a is an auxiliary variable and is positive, so as to set the original variable equivalent to a to have a solution.
[0050] Transform the first binary clause and the second binary clause into the objective function:
[0051]
[0052] H(a∨l 3 )=1-aH(l 3 )+aH(l 3 )
[0053] Among them, l i =x i In the case of H(l i )=q i , In the case of i )=1-q i. Where x i For the variable l i Assignment. i Represents a logical bit and is related to x i If q i The value of variable x is 1. i is evaluated to true. If q i The value of variable x is 0. i is assigned the value false.
[0054] And the objective function H(c) of n ternary clauses in the SAT problem is constructed by continuous addition:
[0055]
[0056] Where H(·) is the objective function of the QUBO problem. When the global minimum value of the objective function H(c) corresponding to c is 0, there is a satisfiable solution. j is the index of the binary clause, and n is the number of ternary clauses. If the global minimum value H(c) is 0, then the clause is satisfiable.
[0057] (2) The assignment of the original variable of each ternary clause and the assignment of the auxiliary variable of decomposing the ternary clause into binary clauses are embedded into the physical qubits in the quantum annealer through a greedy strategy. The physical qubits include column qubits and row qubits. Each original variable assignment is embedded into the column qubit, and the auxiliary variable assignment is embedded into the row qubit, including: the original variable associated with the auxiliary variable is used as the relevant original variable, the column qubit corresponding to the relevant original variable assignment is used as the relevant column qubit, and the relevant column qubit is linked to the row qubit by a slash.
[0058] The row physical qubits are linked diagonally to the column physical qubits corresponding to the variables, and the row qubits corresponding to the associated auxiliary variables are linked horizontally to obtain a quantum annealer embedded in the variables; e.g. Figure 1 As shown, Figure 1 It means that each vertical physical quantum bit is assigned to a variable, that is, the variable is assigned x 1 Assign the value x to the variable 12 They are embedded into the corresponding black vertices directly below them, and we assign auxiliary variables.
[0059] For example Figure 1 In A, the variable x 1 and variable x 4 appears in the same sentence, we construct auxiliary variables for it and embed it into the vertex position pointed by the red arrow, so that the auxiliary variables are connected to x through orange and brown links respectively. 1 and x 4 Established a relationship.
[0060] Secondly, if Figure 1 At the moment (t=1) shown in B, a greedy strategy is used to allocate horizontal links between the original variables and the auxiliary variables, so that a connection can be established between the original variables and the auxiliary variables, such as x 6 、x 7 、x 9 appears in a sentence, we will 6 、x 7 Auxiliary variables and x 9 The orange horizontal links are created between the auxiliary variables of x 6 、x 7 、x 9 Through Figure 1 The orange and brown links in B establish a relationship.
[0061] Figure 1 C represents the linking mode generated by traversing to the next clause at the next moment (t=2). During the entire embedding process, the horizontal link of each variable only considers the link of the variable on its right, avoiding redundant links between two variables. Because each clause introduces auxiliary variables, the auxiliary variable links are constrained to be embedded in the physical qubits of the horizontal link, thus achieving the purpose of releasing the qubits of the vertical link in order to allocate additional variables.
[0062] The above embedding method is applied to quantum annealers based on Chimera hardware graph structure, such as 2000Q. Figure 2 As shown, it is composed of M×M grid units, where M=16, each unit includes 8 qubits, and the 8 qubits are divided into vertical sets and horizontal sets, each set has 4 qubits. Figure 2 The blue line represents the quantum bit q 1 It is linked to the other 6 quantum bits, and the 4 bits in the dotted box are horizontally aggregated. Figure 2 The orange line represents the quantum bit q 2 It is linked to the other 6 quantum bits, and the 4 bits in the solid box are vertically assembled.
[0063] (3) The objective function is recursively solved by an embedded variable quantum annealer and / or CDCL solver to determine whether the SAT problem has a solution or not. Once the mapping of the physical qubits is determined, it will never change.
[0064] There are three situations in the solution process:
[0065] (1) If the assignments of the original variables and the assignments of the auxiliary variables are both embedded in physical qubits, the objective function is solved by a quantum annealer to determine whether the SAT problem has a solution or not.
[0066] (2) If only some of the original variable assignments and the auxiliary variable assignments can be embedded into the physical qubits and the objective function solution is obtained, then the steps for solving the SAT problem are:
[0067] The solution of the binary or ternary clause containing the assignment of the first variable is obtained by the CDCL solver, and the solution of the objective function with the second to N+2 variables is obtained by using the quantum annealer embedded with the assignment of the second to N+2 variables. If no conflict occurs, the CDCL solver and the quantum annealer are used to recursively solve the solution of the objective function of the remaining variables until the ternary clauses of all the original variables contained in the SAT problem are solved, so as to complete the solution of the SAT problem, where N is the number of variables.
[0068] If only some of the original variable assignments and the auxiliary variable assignments can be embedded into the physical qubits and conflicts occur, the steps for solving the SAT problem are:
[0069] (a) When a CDCL solver is used to solve a binary or ternary clause containing a value of the first variable, and a quantum annealer embedded with the value of the second to N+2 variables is used to solve a target function having the second to N+2 variables, a conflict occurs. Then, the first variable is reassigned, and the CDCL solver and the quantum annealer embedded with the value of the variable are used again to solve the target function having the first to N+2 variables;
[0070] (b) After obtaining the solutions of the objective functions of the variables 1 to N+2 within the threshold of the number of variable assignments, the CDCL solver and the quantum annealer are continued to recursively obtain the solutions of the objective functions of the remaining variables until the binary or ternary clauses of all the original variables contained in the SAT problem are solved, and the solution of the SAT problem is completed.
[0071] If the sub-instance does not satisfy the conflict, all selected variables are transformed into disjunctive normal form, added to the learned clauses, and backtracked to the ternary clause where the conflict occurred through the CDCL solver. The VSIDS activity value of the ternary clause that caused the conflict is multiplied by a constant value, and the VSIDS activity value of the ternary clause that did not cause a conflict during the solving process is multiplied by a decay value (0-1). The VSIDS activity value of the solved ternary clause is reassigned, and based on the reassigned VSIDS activity value, the corresponding ternary clauses are reordered so that the ternary clause that causes the conflict can be solved first by the CDCL solver.
[0072] VSIDS indicates that variables that conflict more frequently in the search history tend to cause future conflicts. Therefore, when a conflict occurs, the activity of the clause identified as conflicting and the clauses involved in the conflict is increased by a constant value. The activities of other clauses are multiplied by a decay value (0-1).
[0073] The time complexity of embedding variables into the quantum annealer is O(m) (50μs on average), where m is the number of clauses traversed. We conducted experiments on the Random SAT dataset of SALIB and showed that the average number of clauses embedded in 2000Q is 252. When solving the 3-SAT subproblem, the computational time required for the quantum annealing solution is linear, as it is determined by the sum of the embedding time (linear time) and the quantum annealing time (constant time).
[0074] The QA-CDCL solver is obtained by combining the CDCL solver and the quantum annealer to solve the SAT problem. The experiments on the QA-CDCL solver are as follows:
[0075] QA solving is performed through D-wave's QA simulator, running on a local computer without being affected by QA delay (D-wave 2000Q). Five satisfied and seven unsatisfied (conflicting) SARLIB benchmarks are measured, including 100 to 250 variables, and each benchmark uses 100 instances. Considering the randomness of the solver, we repeat each solving process three times and calculate its average running time. It is evaluated on a computer equipped with an Intel E5 1.7GHz CPU and 32Gb memory, as shown in Table 1 and Table 2.
[0076] Table 1 shows the running time of the original MiniSAT solver, QA-CDCL solver, and the estimated QA-CDCL solver and pure QA solver.
[0077]
[0078] Table 1 shows the running time of the original MiniSAT solver, QA-CDCL solver, and the estimated QA-CDCL solver and pure QA solver in columns 2-5. Due to the noise in the quantum annealer, the time of the QA-CDCL solver in column 3 of Table 1 is solved using a quantum simulator, which is longer than the calculation time of the real quantum annealer. We estimated the time calculated on the real quantum annealer through experiments, and calculated the Estimated QA-CDCL time in column 4 of Table 1, which theoretically restores the real time of our proposed solution method. At the same time, we calculated the ratio of the running time of the MiniSAT solver to the running time of the QA-CDCL solver to measure the average speedup, maximum speedup, and minimum speedup of our algorithm.
[0079] Table 1 shows that the QA-CDCL solver outperforms all solvers on all 12 benchmarks with an average speedup of 10.70 (minimum and maximum speedups are 0.81 and 195, respectively). The results show that the speedup decreases with the number of variables, especially for satisfied datasets. We speculate that satisfied instances rely more on the first result of the QA solver, where all clauses are embedded and satisfied. This may be because the speedup is only possible in the final stage of the search process. In unsatisfied cases, the CDCL solver needs to prune more of the search space before reaching a conclusion. A third result of the quantum lookahead mechanism is that the speedup is more stable and efficient at large scales when QA detects a conflict after unit propagation.
[0080] Table 2 Average speedup of the six benchmark datasets solved by the QA-CDCL solver compared with MiniSAT in grid cells of different sizes
[0081]
[0082] It can be seen from Table 2 that as the scale of quantum annealers increases, the average speedup of the QA-CDCL algorithm we proposed is also increasing, which means that with the development of quantum chips, our method will have better applications and development.
[0083] from Figure 3 It can be seen that when the conflict ratio reaches 0.5, the acceleration rate increases sharply. When the conflict ratio is ≥ 0.5, the acceleration rate seems to reach about 195, which means that the larger the conflict ratio, the greater the acceleration of our method. Earlier detection of conflicts can effectively accelerate the process.
Claims
1. A method for solving SAT problems by combining CDCL solver and quantum annealer, It is characterized in that include: (1) Each ternary clause of the SAT problem is decomposed into binary clauses by introducing auxiliary variables, and the objective function of the QUBO problem is constructed based on the binary clauses; (2) The original variable assignment of each ternary clause and the auxiliary variable assignment of the binary clause decomposed into the ternary clause are embedded into the physical qubits in the quantum annealer through a greedy strategy. The physical qubits include column qubits and row qubits. Each original variable assignment is embedded into the column qubit, and the auxiliary variable assignment is embedded into the row qubit. The row qubits are connected to the column qubits by a diagonal line. The row qubits corresponding to the associated auxiliary variables are connected by horizontal links to obtain a quantum annealer with embedded variables. (3) recursively solving the objective function by using a quantum annealer with embedded variables and / or a CDCL solver to determine whether the SAT problem has a solution or not; Solving the objective function through a quantum annealer and a CDCL solver embedded in variables, including: if the assignment of the original variable and the assignment of the auxiliary variable are both embedded in physical quantum bits, solving the objective function through a quantum annealer to determine whether the SAT problem has a solution or not; The objective function is solved by the quantum annealer and CDCL solver with embedded variables. If only some of the original variables and the auxiliary variables can be embedded into the physical qubits and the solution of the objective function is obtained, the steps for solving the SAT problem are: The solution of the binary or ternary clause containing the assignment of the first variable is obtained by using the CDCL solver, and the solution of the objective function with the second to N+2 variables is obtained by using the quantum annealer embedded with the assignment of the second to N+2 variables. If no conflict occurs, the solution of the objective function of the remaining variables is continued to be recursively solved by the CDCL solver and the quantum annealer until the ternary clauses of all the original variables contained in the SAT problem are solved, so as to complete the solution of the SAT problem, wherein N is the number of variables; The objective function is solved by the quantum annealer and CDCL solver with embedded variables. If only some of the original variable assignments and the auxiliary variable assignments can be embedded into the physical qubits and conflicts occur, the steps for solving the SAT problem are: When a solution to a binary or ternary clause containing an assignment to the first variable is obtained by a CDCL solver, and a conflict occurs when a solution to an objective function having variables from 2 to N+2 is obtained by using a quantum annealer embedded with assignments to variables from 2 to N+2. In this case, the first variable is reassigned, and the objective function of variables from 1 to N+2 is solved again by the CDCL solver and the quantum annealer with embedded variables. After the solution to the objective function of variables from 1 to N+2 is obtained, the CDCL solver and the quantum annealer are continued to be recursively used to obtain solutions to the objective function of the remaining variables until the binary or ternary clauses of all the original variables contained in the SAT problem are solved. In this case, the solution to the SAT problem is completed.
2. The method for solving the SAT problem by combining a CDCL solver and a quantum annealer according to claim 1, It is characterized in that The rows connect physical qubits and the columns connect qubits diagonally, including: The original variable associated with the auxiliary variable is taken as the relevant original variable, the column qubit corresponding to the relevant original variable assignment is taken as the relevant column qubit, and the relevant column qubit is linked to the row qubit through a slash.
3. The method for solving the SAT problem by combining a CDCL solver and a quantum annealer according to claim 1, It is characterized in that When a conflict occurs when a quantum annealer embedded with assignments of variables 2 to N+2 is used to obtain a solution to an objective function with variables 2 to N+2, the CDCL solver is used to backtrack to the ternary clause that caused the conflict, and the VSIDS activity value of the ternary clause that caused the conflict is multiplied by a constant value. The VSIDS activity value of the ternary clause that did not cause a conflict during the solving process is multiplied by an attenuation value to complete the reassignment of the VSIDS activity value of the solved ternary clause. Based on the reassigned VSIDS activity value, the corresponding ternary clauses are reordered so that the ternary clause that caused the conflict can be solved first by the CDCL solver.
4. The method for solving the SAT problem by combining a CDCL solver and a quantum annealer according to claim 1, It is characterized in that By introducing auxiliary variables, each ternary clause of the SAT problem is decomposed into binary clauses: c i =l 1 ∨l 2 ∨l 3 c i,2 l 3 ∨a Among them, c i is the i-th ternary clause, l 1 , l 2 , l 3 They are ternary clauses c i The three original variables, c i,1 , c i,2 Decompose the i-th ternary clause into the first binary clause and the second binary clause respectively, and a is an auxiliary variable.
5. The method for solving SAT problems by combining a CDCL solver and a quantum annealer according to claim 2, It is characterized in that And the objective function H(c) of the QUBO problem is constructed based on the binary clause as: H(a∨l 3 )=1-aH(l 3 )+aH(l 3 ) Where H(·) is the objective function of the QUBO problem. When the global minimum value of the objective function H(c) corresponding to c is 0, there is a satisfiable solution. j is the index of the binary clause, and n is the number of ternary clauses.
