Quantum solving method and device for one-out-of-three form SAT problem, electronic equipment and storage medium

By converting the three-take one-form SAT problem into the target 2-SAT problem and using the target Hamiltonian to determine the solution, the problem that the SAT solver in the prior art cannot solve all SAT problems in polynomial time, achieving more efficient SAT problem solving.

CN119476516AActive Publication Date: 2025-02-18TSINGHUA UNIVERSITY +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411513313.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The prior art lacks SAT solvers that can solve all SAT problems in polynomial time, resulting in inefficient solutions to SAT problems in various scenarios.

Method used

By updating the solution space of the three-take one-form SAT problem to the target solution space, we obtain the target 2-SAT problem, obtain the target Hamiltonian corresponding to the target 2-SAT problem, and determine the three-take one-form SAT problem based on the target Hamiltonian based on the target Hamiltonian. Solution.

Benefits of technology

It effectively reduces the dimension of the search space and reduces the complexity of the SAT problem, thereby accelerating convergence to the ground state, and improving the solution success rate of the three-take one-form SAT problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476516A_ABST
    Figure CN119476516A_ABST
Patent Text Reader

Abstract

The invention provides a quantum solving method and device for a one-out-of-three form SAT problem, electronic equipment and a storage medium, and relates to the technical field of quantum computers. The method comprises the steps that a solution space of a one-out-of-three form SAT problem is updated to a target solution space, a target 2-SAT problem is obtained, the target solution space corresponds to a solution space of a relaxed problem, and the relaxed problem comprises clauses of relaxed constraint conditions; obtaining a target Hamiltonian corresponding to the target 2-SAT problem; and determining a solution of the one-out-of-three form SAT problem according to the target Hamiltonian. According to the method, the dimension of the search space is effectively reduced, the complexity of the SAT problem is reduced, convergence to the ground state is accelerated, and the solving success rate of the one-out-of-three form SAT problem is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computer technology, and in particular to a quantum solution method, device, electronic device and storage medium for a SAT problem of the three-out-of-one form. Background Art

[0002] The Boolean Satisfiability Problem, or SAT, has received extensive attention in the fields of computer science, combinatorics, and logic. The N-SAT problem consists of N variables and logical expressions. The 3-SAT problem, as the first problem proved to be nondeterministic polynomial (NP) complete by the Cook-Leven theorem, means that all other NP problems can be converted to the 3-SAT problem in polynomial time. The 3-SAT problem is usually expressed in conjunctive normal form (CNF), with each clause consisting of the conjunction of three literals. Another form of expression is "one-in-three", which requires that exactly one literal in each clause is true. These two forms have been shown to be convertible to each other. The potential of quantum computing has led to the development of a variety of quantum algorithms that convert the 3-SAT problem into a ground state problem and solve it using various quantum ground state solvers.

[0003] Currently, researchers have developed a variety of SAT solvers suitable for solving 3-SAT problems in some scenarios, but there is a lack of SAT solvers that can solve all SAT problems in polynomial time. Therefore, providing a method that can solve SAT problems in various scenarios is an urgent problem to be solved. Summary of the invention

[0004] The present invention provides a quantum solution method, device, electronic device and storage medium for a SAT problem of the three-out-of-one form, which are used to solve the defect in the prior art that there is a lack of a SAT solver that can solve all SAT problems in polynomial time. By effectively reducing the dimension of the search space and reducing the complexity of the SAT problem, the convergence to the ground state is accelerated, thereby improving the success rate of solving the SAT problem of the three-out-of-one form.

[0005] The present invention provides a quantum solution method for a three-out-of-one SAT problem, comprising the following steps: Updating the solution space of the one-out-of-three SAT problem to the target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of the relaxed problem, wherein the relaxed problem includes clauses that relax the constraint conditions; Obtaining a target Hamiltonian corresponding to the target 2-SAT problem; A solution to the one-out-of-three SAT problem is determined according to the target Hamiltonian.

[0006] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, the solution space of the three-out-of-one SAT problem is updated to a target solution space to obtain a target 2-SAT problem, including: Updating the constraint condition of the clause of the one-out-of-three SAT problem from the initial condition to the target condition to obtain a relaxed clause, wherein the initial condition is that if only one variable among three variables in a clause is 1, the clause is considered to satisfy the condition, and the target condition is that if the number of 1s among three variables in a clause is an odd number, the clause is considered to satisfy the condition; The target 2-SAT problem is obtained by adding a restriction condition of the relaxed clause, wherein the restriction condition includes that two questions in the same clause cannot be true at the same time.

[0007] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, the relaxed clause It is expressed as: ,in It indicates three clauses; The solution to the relaxed problem is expressed as: ,in, represents the 0-1 initial clause matrix A determined by the three-choice SAT problem, represents a 0-1 vector of any nk dimension, is the initial clause matrix The rank of is equal to the number of independent clauses modulo 2, Indicates an additional offset or correction term.

[0008] According to a quantum solution method for a one-out-of-three SAT problem provided by the present invention, determining a solution to the one-out-of-three SAT problem according to the target Hamiltonian includes: Solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain a target ground state, wherein the target ground state is used to characterize the ground state or approximate the ground state; Determine whether the target basis state corresponds to a set of target solutions of the one-out-of-three form SAT problem. If so, output the target solution. If not, return to the previous step to solve the target basis state again. If the target solution is not obtained after repeating the preset number of times, determine that the one-out-of-three form SAT problem has no solution.

[0009] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state includes: Acquire a quantum circuit, wherein all quantum states represented by the quantum circuit are located in the solution space of the relaxed problem; When both literals in the clause of the relaxed problem are true, determining the target Hamiltonian includes a penalty term, the penalty term being used to ensure that a situation where the clause is not satisfied is energetically penalized; By minimizing the energy of the target Hamiltonian, a target ground state corresponding to the target Hamiltonian is obtained.

[0010] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state includes: Determining the target Hamiltonian, wherein the target Hamiltonian is the negative value of the Hamiltonian in the variational quantum eigensolver; The target ground state is determined by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero, and the target ground state tends to the maximum eigenvalue of the target Hamiltonian.

[0011] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero includes: Acquire a first quantum circuit, wherein the first quantum circuit is composed of an alternating first quantum gate sequence and a second quantum gate sequence; The target ground state is determined according to the first quantum gate sequence and the second quantum gate sequence.

[0012] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero includes: Acquire a second quantum circuit, wherein the number of layers of a target solver corresponding to the second quantum circuit is lower than a preset layer number threshold; By optimizing the target number parameters of the target solver, an objective function is obtained, wherein the objective function is the maximized target Hamiltonian, and the target number is twice the number of layers; The target solver is used to measure the states of all quantum bits in the output state of the second quantum circuit to obtain the target ground state.

[0013] According to a quantum solution method for a one-out-of-three SAT problem provided by the present invention, before updating the solution space of the one-out-of-three SAT problem to a target solution space to obtain a target 2-SAT problem, the method further includes: Determine whether the text of all clauses in the three-out-of-one SAT problem is positive, and obtain a target ratio corresponding to the three-out-of-one SAT problem, where the target ratio is a ratio of a first quantity to a second quantity, where the first quantity is used to characterize the number of clauses in the three-out-of-one SAT problem, and the second quantity is used to characterize the number of variables in the three-out-of-one SAT problem; The method of updating the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem includes: When the literals of all clauses in the three-out-of-one SAT problem are positive and the target ratio is greater than 0.5 and less than 0.8, the solution space of the three-out-of-one SAT problem is updated to the target solution space to obtain the target 2-SAT problem.

[0014] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, the difference between the target ratio and 0.626 is not less than a preset threshold, and the not less than the preset threshold is used to characterize that the target ratio significantly deviates from 0.626.

[0015] According to a quantum solution method for a three-out-of-one SAT problem provided by the present invention, the dimension of the target solution space is 2 to the power of a third number, and the third number is equal to the difference between the second number and the first number.

[0016] The present invention also provides a quantum solution device for a three-out-of-one SAT problem, comprising the following modules: A problem dimension reduction module, used for updating the solution space of the three-out-of-one SAT problem to a target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of the relaxed problem, and the relaxed problem includes a clause of a relaxed constraint condition; An energy acquisition module, used to obtain a target Hamiltonian corresponding to the target 2-SAT problem; A solution determination module is used to determine a solution to the one-out-of-three SAT problem according to the target Hamiltonian.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements a quantum solution method for the SAT problem of one-out-of-three form as described above.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a quantum solution method for a SAT problem of one-out-of-three form as described above.

[0019] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the quantum solution method for the SAT problem of one-out-of-three form as described above.

[0020] The quantum solution method, device, electronic device and storage medium of the three-out-of-one SAT problem provided by the present invention effectively reduce the dimension of the search space, reduce the complexity of the SAT problem, thereby accelerating convergence to the ground state and improving the success rate of solving the three-out-of-one SAT problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a flow chart of the quantum solution method of the three-out-of-one SAT problem provided by the present invention.

[0023] Figure 2 It is a flowchart of the method for obtaining the target 2-SAT problem provided by the present invention.

[0024] Figure 3 It is a flow chart of the method for determining the solution of a SAT problem of one-out-of-three form provided by the present invention.

[0025] Figure 4 This is one of the flow charts of the method for obtaining the approximate ground state provided by the present invention.

[0026] Figure 5 This is the second flow chart of the method for obtaining the approximate ground state provided by the present invention.

[0027] Figure 6 This is the third flow chart of the method for obtaining the approximate ground state provided by the present invention.

[0028] Figure 7 It is a schematic diagram of the structure of a quantum solution device for a SAT problem of one-out-of-three form provided by the present invention.

[0029] Figure 8 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] The Boolean Satisfiability Problem, or SAT for short, has received widespread attention in the fields of computer science, combinatorial mathematics, and logic. SAT solvers can be used to verify the correctness of a program by converting the program's specifications into logical expressions. The SAT solver can be used to determine whether there are assignments that satisfy the specifications, thereby verifying whether the program meets the specifications. SAT solvers can also be used in Electronic Design Automation (EDA) design. It can help designers perform tasks such as logic synthesis, circuit layout and routing, and timing analysis. The N-SAT problem consists of N variables and logical expressions. The 3-SAT problem, as the first problem proved to be nondeterministic polynomial (NP) complete by the Cook-Levin theorem, means that all other NP problems can be converted to 3-SAT problems in polynomial time. The 3-SAT problem is usually expressed in conjunctive normal form (CNF), with each clause consisting of the conjunction of three literals. Another form of expression is "one-in-three", which requires that exactly one literal in each clause is true. These two forms have been shown to be convertible into each other. Researchers are committed to developing efficient SAT solvers for all 3-SAT problems. The DPLL solver, as the most famous classical SAT solver, finds solutions by repeatedly guessing, simplifying clauses, and backtracking. On this basis, the CDCL solver identifies the same conflicts caused by multiple guesses in the DPLL solver, derives new clauses through reasoning graphs, and speeds up the solution process. Since the advent of the CDCL solver, many modern SAT solvers have emerged to handle large-scale problems. However, no classical SAT solver can solve all SAT problems in polynomial time. The potential of quantum computing has prompted the development of a variety of quantum algorithms to transform 3-SAT problems into ground state solving problems and solve them using various quantum ground state solvers.

[0032] Currently, researchers have developed a variety of SAT solvers suitable for solving 3-SAT problems in some scenarios, but there is a lack of SAT solvers that can solve all SAT problems in polynomial time. Therefore, providing a method that can solve SAT problems in various scenarios is an urgent problem to be solved.

[0033] In view of this, an embodiment of the present invention provides a quantum solution method for a three-out-of-one SAT problem, by updating the solution space of the three-out-of-one SAT problem to the target solution space, obtaining a target 2-SAT problem, wherein the target solution space corresponds to the solution space of a relaxed problem, and the relaxed problem includes clauses that relax constraints; obtaining a target Hamiltonian corresponding to the target 2-SAT problem; and determining a solution to the three-out-of-one SAT problem based on the target Hamiltonian. This method can effectively reduce the dimension of the search space and the complexity of the SAT problem, thereby accelerating convergence to the ground state and improving the success rate of solving the three-out-of-one SAT problem.

[0034] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0035] Figure 1 : is a flow chart of the quantum solution method for the three-out-of-one SAT problem provided by the present invention. The quantum solution method for the three-out-of-one SAT problem can be applied to electronic devices, which can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop computer, a PDA or a server, etc.; the electronic device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 1 As shown, the method may include the following steps 101 to 103: Step 101: updating the solution space of the one-out-of-three SAT problem to a target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of a relaxed problem, and the relaxed problem includes clauses that relax constraints.

[0036] It should be noted that the solution space of the three-choice SAT problem is updated to the target solution space, and the target 2-SAT problem can be obtained by relaxing the constraints of the clause to obtain the relaxed clause, and obtaining the relaxed problem from the relaxed clause, and determining the solution space corresponding to the relaxed problem as the target solution space.

[0037] It can be understood that setting the solution space to the solution space of the "relaxed problem" is equivalent to performing a classic dimensionality reduction on the one-in-three SAT problem to obtain a 2-SAT problem.

[0038] Step 102: Obtain a target Hamiltonian corresponding to the target 2-SAT problem.

[0039] It should be noted that after obtaining the target 2-SAT problem, the Hamiltonian corresponding to the target 2-SAT problem generated after dimensionality reduction can be constructed.

[0040] For example, the formula of the Hamiltonian corresponding to the target 2-SAT problem can be as follows:

[0041] .

[0042] in, is the label of the i-th variable of the p-th rule, and It is determined by whether the i-th character of the p-th rule is a positive variable or a negative variable. is the Pauli Z observable.

[0043] It can be seen that after reducing the dimension of the three-out-of-one SAT problem to obtain the target 2-SAT problem and adjusting the Hamiltonian in the quantum SAT solver accordingly, the required quantum resources can be significantly reduced and the solution process can be accelerated.

[0044] Step 103: Determine a solution to the one-out-of-three SAT problem according to the target Hamiltonian.

[0045] It should be noted that, taking advantage of the huge potential of quantum computing, many quantum algorithms have been developed to solve the 2-SAT problem. These algorithms transform the original SAT problem into a ground state problem so that it can be solved using a quantum ground state solver, such as quantum annealing, quantum approximate optimization algorithm, etc. Existing quantum SAT solvers mainly solve the 2-SAT problem by minimizing the above Hamiltonian.

[0046] Understandably, since it is observed that the characteristics of clauses as independent constraints are not fully exploited in current quantum solvers, in order to optimize quantum SAT solvers and reduce the problem complexity, we plan to use these clauses to transform the original one-in-three SAT problem into a 2-SAT problem in the solution space of the "relaxed problem".

[0047] The present invention proposes a method for improving a quantum Boolean problem solver, especially for solving the one-in-three SAT problem. The classical dimensionality reduction technique can be applied to optimize the existing quantum one-in-three SAT solver, that is, firstly reducing the dimensionality of the three-out-of-one SAT problem. This method can effectively reduce the dimension of the search space and reduce the complexity of the SAT problem, thereby accelerating the convergence to the ground state and improving the success rate of solving the three-out-of-one SAT problem.

[0048] In some embodiments, before updating the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem, the method may also include: determining whether the literals of all clauses in the three-out-of-one SAT problem are positive, and obtaining a target ratio corresponding to the three-out-of-one SAT problem, wherein the target ratio is a ratio of a first quantity to a second quantity, wherein the first quantity is used to characterize the number of clauses in the three-out-of-one SAT problem, and the second quantity is used to characterize the number of variables in the three-out-of-one SAT problem.

[0049] The updating of the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem may include: when the literals of all clauses in the three-out-of-one SAT problem are positive and the target ratio is greater than 0.5 and less than 0.8, updating the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem.

[0050] Furthermore, the difference between the target ratio and 0.626 is not less than a preset threshold, and the difference of not less than the preset threshold is used to indicate that the target ratio significantly deviates from 0.626.

[0051] Furthermore, the dimension of the target solution space is 2 to the power of a third number, and the third number is equal to the difference between the second number and the first number.

[0052] It should be noted that we first agree on the notation for one-in-three SAT problems. to indicate the number of clauses and variables in a one-in-three SAT problem. The first The literals and variables are represented as and The corresponding label is Indicates that .make Defined as follows, depending on whether the text is in positive or negative form or , thus ensuring .according to In the form of .

[0053] Among them, in the positive one-in-three SAT problem, when the literals in all clauses are positive, there is a key point, located at =0.626. When the value deviates significantly from 0.626, the probability of at least one solution will be close to 0 or 1, which makes these problems relatively easy to solve. Therefore, our main focus can be The ratio is between 0.5 and 0.8 for positive one-in-three SAT problems. Even better is when The case of significant deviation from 0.626, for example, when If the difference between the ratio and 0.626 is not less than 0.1, it means Significant deviation from 0.626.

[0054] It is understandable that by applying the classical optimization algorithm to reduce dimensionality, the dimension of the search space can be effectively reduced, thereby accelerating the convergence to the ground state and improving the success rate of the solution. Numerical simulation results reveal that when When the ratio is between 0.5 and 0.8, the dimension of the solution space of the "relaxed problem" is approximately This method can effectively reduce the dimension of the search space and the complexity of the SAT problem, thereby accelerating the convergence to the ground state and improving the success rate of solving the three-out-of-one SAT problem.

[0055] Figure 2 2-SAT problem is a flow chart of the method for obtaining the target 2-SAT problem provided by the present invention. Figure 2 As shown, the updating of the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem may include: Step 201: Update the constraint conditions of the clause of the three-out-of-one SAT problem from initial conditions to target conditions to obtain a relaxed clause, wherein the initial condition is that in a clause, if only one variable among three variables is 1, then the clause is considered to satisfy the condition, and the target condition is that in a clause, if the number of 1s among three variables is an odd number, then the clause is considered to satisfy the condition.

[0056] It should be noted that we first relax the constraints of the clauses from "one-in-three" to "odd in three" to satisfy the condition. This means that if all three variables in a clause are 1, then this "relaxed clause" is also considered to satisfy the condition. We call the problems containing these relaxed clauses "relaxed problems".

[0057] Furthermore, the relaxation clause It can be expressed as: ,in It indicates three clauses; The solution to the relaxed problem can be expressed as: ,in, represents the 0-1 initial clause matrix A determined by the three-choice SAT problem, represents a 0-1 vector of any nk dimension, is the initial clause matrix The rank of is equal to the number of independent clauses modulo 2, Indicates an additional offset or correction term.

[0058] Step 202: Add constraints to the relaxed clause to obtain the target 2-SAT problem, where the constraints include that two questions in the same clause cannot be true at the same time.

[0059] It should be noted that the following restriction can be imposed: two literals in the same clause cannot be true at the same time. If and only if this constraint is satisfied, the solution to the "relaxed problem" is also a solution to the original One-in-Three SAT problem. In this way, the problem can be reduced to solving a 2-SAT problem in the solution space of the "relaxed problem", and the dimension of this solution space is .

[0060] It can be understood that by updating the constraint conditions of the clauses of the three-out-of-one SAT problem from the initial conditions to the target conditions to obtain a relaxed clause, and increasing the restriction conditions of the relaxed clause to obtain the target 2-SAT problem, the dimension of the search space can be effectively reduced, thereby accelerating the convergence to the ground state and improving the success rate of the solution.

[0061] Figure 3 1 is a flow chart of a method for determining a solution to a three-out-of-one SAT problem provided by the present invention. Figure 3 As shown, determining the solution of the one-out-of-three SAT problem according to the target Hamiltonian may include: Step 301: Solve the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain an approximate ground state.

[0062] It should be noted that there are many methods for solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain an approximate ground state. For example, a variational quantum eigensolver (VQE) or a quantum ground state solver of a quantum annealing algorithm (QAA) and a quantum approximate optimization algorithm (QAOA) can be used to solve the problem. The present invention does not limit the method for solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain an approximate ground state.

[0063] Step 302: Determine whether the target basis state corresponds to a set of target solutions of the one-out-of-three form SAT problem. If so, output the target solution. If not, return to the previous step to solve the target basis state again. If the target solution is not obtained after repeating the preset number of times, it is determined that the one-out-of-three form SAT problem has no solution.

[0064] It should be noted that it is determined whether the approximate ground state corresponds to a set of solutions to the original problem. If so, the solution is output. If not, step 301 is repeated until a certain number of repetitions, and then it is determined that the original problem has no solution.

[0065] It can be understood that, by adopting the above method to obtain the target ground state corresponding to the target Hamiltonian, and determining the solution of the one-out-of-three SAT problem according to the approximate ground state, the accuracy of the obtained solution of the one-out-of-three SAT problem can be improved.

[0066] In some embodiments, after obtaining the target Hamiltonian, the solution of the one-out-of-three SAT problem can be determined according to the target Hamiltonian by using an optimized quantum one-in-three SAT solver to obtain an approximate ground state. Specifically, the quantum ground state solver based on the variational quantum eigensolver (VQE), quantum annealing algorithm (QAA) and quantum approximate optimization algorithm (QAOA) can be optimized to determine the ground state corresponding to the target Hamiltonian, thereby finding the solution to the one-in-three SAT problem, which is described in detail below.

[0067] First, a new solver based on variational quantum circuits is described.

[0068] Figure 4 FIG. 1 is one of the flow diagrams of the method for obtaining the approximate ground state provided by the present invention. Figure 4 As shown, solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state may include: Step 401: Acquire a quantum circuit, wherein all quantum states represented by the quantum circuit are located in the solution space of the relaxed problem.

[0069] Step 402: When both literals in the clause of the relaxed problem are true, determining that the target Hamiltonian includes a penalty term, wherein the penalty term is used to ensure that the situation where the clause is not satisfied is penalized in terms of energy.

[0070] Step 403: Obtain a target ground state corresponding to the target Hamiltonian by minimizing the energy of the target Hamiltonian.

[0071] It should be noted that in the optimization of the SAT problem solver based on the variational quantum algorithm, quantum bits correspond to variables in the following way:

[0072] Among them, . It can be noted that: in, In this equation, ⊕ represents modulo 2 addition. Therefore, exist Indicates the reverse In other words, it In the representation A "X" gate is applied to the qubits. Let the parameterized quantum gate : First, a quantum circuit is constructed to ensure that all quantum states represented by this quantum circuit are in the solution space of the "relaxed problem". In addition, if we ignore the constant phase, this quantum circuit can represent all states represented by S. Therefore, the solution to any problem can be exactly represented by a set of parameters.

[0073] Second, when both literals in the clause are true, the Hamiltonian should contain a penalty term, which is expressed as: ,

[0074] in and Can be freely replaced by The state with zero energy corresponds exactly to the solution of the original SAT problem. Therefore, by minimizing the energy using classical optimization techniques, we can determine whether there is a solution to the original SAT problem.

[0075] It can be understood that through a new solver based on variational quantum circuits, that is, constructing quantum circuits to keep the quantum state in the solution space of the relaxed problem, and then using classical optimization to minimize the energy, the target ground state corresponding to the target Hamiltonian can be obtained to determine whether there is a solution to the three-out-of-one SAT problem. The accuracy of determining the solution to the three-out-of-one SAT problem can be improved. Furthermore, it is also proved that the solver based on variational quantum computing can avoid the plateau barrenness phenomenon when dealing with the one-in-three SAT problem. These characteristics highlight the broad prospects for the application of the algorithm provided by the present invention in the era of noisy intermediate-scale quantum (NISQ) devices.

[0076] Second, a new solver based on the quantum annealing algorithm is described.

[0077] Figure 5 FIG. 2 is a flow chart of the method for obtaining an approximate ground state provided by the present invention. Figure 5 As shown, solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state may include: Step 501: Determine the target Hamiltonian, which is the negative value of the Hamiltonian in the variational quantum eigensolver.

[0078] Step 502: Determine the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero, wherein the target ground state tends to the maximum eigenvalue of the target Hamiltonian.

[0079] It should be noted that in the prior art, the initial Hamiltonian can be selected as: , which is consistent with the common quantum adiabatic theorem in the structure Corresponding.

[0080] Therefore, the initial state can be chosen accordingly as: Among them, solution space is the solution space of the relaxed problem. This initial state is the Hamiltonian The state corresponding to the maximum eigenvalue of . This state corresponds to the mixed state in the quantum annealing algorithm framework.

[0081] The target Hamiltonian in the present invention is the negative value of the Hamiltonian in the variational quantum characteristic VQE quantum solver, and the goal is to determine its maximum value. The formula is: .

[0082] According to the quantum adiabatic theorem, the quantum state will tend to the Hamiltonian Therefore, by evaluating whether the largest eigenvalue is equal to zero, we can judge the solvability of the SAT problem.

[0083] Further, determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero may include: acquiring a first quantum circuit, where the first quantum circuit is composed of an alternating first quantum gate sequence and a second quantum gate sequence; and determining the target ground state according to the first quantum gate sequence and the second quantum gate sequence.

[0084] It should be noted that we can calculate the corresponding first quantum gate sequence according to the above formula: and the second quantum gate sequence In the framework of quantum adiabatic computing, the design of the entire circuit is as follows: in,

[0085] In this formula, ,in is a constant whose value is significantly smaller than The target ground state may be determined according to the calculated first quantum gate sequence and the second quantum gate sequence.

[0086] It is understandable that the SAT problem solver based on adiabatic quantum computing provided by the present invention uses the paradigm of adiabatic quantum computing to construct the same quantum circuit, and then uses a larger number of layers (adiabatic quantum computing) to obtain an approximate ground state, which can improve the accuracy of determining the solution of the three-out-of-one SAT problem.

[0087] Third, a new solver based on quantum approximate optimization algorithm is described.

[0088] Figure 6 FIG. 3 is a flow chart of the method for obtaining an approximate ground state provided by the present invention. Figure 6 As shown, determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero may include: Step 601: Acquire a second quantum circuit, wherein the number of layers of a target solver corresponding to the second quantum circuit is lower than a preset layer number threshold; Step 602: Obtain an objective function by optimizing a target number of parameters of the target solver, wherein the objective function is the maximized target Hamiltonian, and the target number is twice the number of layers; Step 603: measuring the states of all quantum bits of the second quantum circuit output state by the target solver to obtain the target ground state.

[0089] It should be noted that in the SAT problem solver based on quantum approximate optimization algorithm, the Hamiltonian, circuit and initial state of the solver are the same as those of the quantum solver based on adiabatic quantum computation. However, the number of layers used in this solver is significantly smaller, denoted as , and needs to be optimized parameters. The variational circuit is designed as: in,

[0090] Classical optimization techniques can be applied to find The value of the parameter to maximize Subsequently, by measuring the states of all qubits, the solution to the SAT problem can be obtained with high probability, especially in When the parameter is large enough, an approximate ground state can be obtained.

[0091] It can be understood that the new solver based on the approximate optimization algorithm provided by the present invention obtains the approximate ground state based on the classical optimization method, namely the quantum approximate optimization algorithm, and can improve the accuracy of determining the solution of the three-out-of-one SAT problem.

[0092] It should be added that the ground state solution is not limited to a specific solver. For example, the quantum annealing solver can be used to solve the ground state Hamiltonian, and the coherent alien machine is also an option. In addition, for the Hamiltonian solved by the other three solvers, the quantum Monte Carlo method may be a feasible solution.

[0093] Based on the quantum solution method for the one-out-of-three SAT problem provided by the present invention, the quantum resources required by the new quantum SAT solver are calculated and compared with the solver without classical reduction. Our results show that the resource requirements of qubits can be reduced in solvers based on quantum annealing (QA) and variational quantum eigensolver (VQE). The required gate resources are quadratically related to the problem size, and only increase by a factor n at most compared to its classical counterpart. We show that quantum solvers based on variational quantum eigensolver (VQE) can avoid plateau barrenness, and we also verify the feasibility of the new quantum solver by numerical simulation of randomly generated forward one-in-three SAT problems. By integrating our analytical results and simulation data, we aim to show the potential application prospects of the algorithm in the era of noisy intermediate-scale quantum computing (NISQ).

[0094] Based on the foregoing embodiments, an embodiment of the present invention provides a quantum solution device for a SAT problem of the three-out-of-one form. Each module included in the device and each unit included in each module can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0095] The quantum solution device for the SAT problem of the one-out-of-three form provided by the present invention is described below. The quantum solution device for the SAT problem of the one-out-of-three form described below and the quantum solution method for the SAT problem of the one-out-of-three form described above can be referred to each other.

[0096] Figure 7 Schematic diagram of the structure of the quantum solution device for the three-out-of-one SAT problem provided by the present invention. Figure 7 As shown, the device 700 includes a problem dimension reduction module 701, an energy acquisition module 702 and a solution determination module 703, wherein: A problem dimension reduction module 701 is used to update the solution space of the three-out-of-one SAT problem to a target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of the relaxed problem, and the relaxed problem includes a clause of a relaxed constraint condition; An energy acquisition module 702, used to acquire a target Hamiltonian corresponding to the target 2-SAT problem; The solution determination module 703 is used to determine the solution of the one-out-of-three SAT problem according to the target Hamiltonian.

[0097] In some embodiments, the problem dimension reduction module 701 includes a condition updating unit and a restriction adding unit, wherein:

[0098] The condition updating unit is used to update the constraint condition of the clause of the one-out-of-three SAT problem from an initial condition to a target condition to obtain a relaxed clause, wherein the initial condition is that if only one variable among three variables in a clause is 1, the clause is considered to satisfy the condition, and the target condition is that if the number of 1s among three variables in a clause is an odd number, the clause is considered to satisfy the condition; The restriction adding unit is used to add the restriction conditions of the relaxed clause to obtain the target 2-SAT problem, and the restriction conditions include that two problems in the same clause cannot be true at the same time.

[0099] In some embodiments, in the conditional update unit, the relaxation clause It is expressed as: ,in It indicates three clauses; The solution to the relaxed problem is expressed as: ,in, represents the 0-1 initial clause matrix A determined by the three-choice SAT problem, represents a 0-1 vector of any nk dimension, is the initial clause matrix The rank of is equal to the number of independent clauses modulo 2, Indicates an additional offset or correction term.

[0100] In some embodiments, the solution determination module 703 includes a base state acquisition unit and a solution determination unit, wherein:

[0101] The ground state acquisition unit is used to solve the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain a target ground state, where the target ground state is used to characterize the ground state or approximate the ground state; The solution determination unit is used to determine whether the target basis state corresponds to a set of target solutions of the three-out-of-one SAT problem. If so, the target solution is output; if not, the target basis state is solved again by returning to the previous step. If the target solution is not obtained after repeating a preset number of times, it is determined that the three-out-of-one SAT problem has no solution.

[0102] In some embodiments, the base state acquisition unit includes a line acquisition component, a penalty item determination component and a base state acquisition component, wherein:

[0103] The circuit acquisition component is used to acquire a quantum circuit, and all quantum states represented by the quantum circuit are located in the solution space of the relaxed problem; The penalty term determination component is used to determine that the target Hamiltonian includes a penalty term when both literals in the clause of the relaxed problem are true, and the penalty term is used to ensure that the situation of not satisfying the clause is penalized in energy; The ground state acquisition component is used to obtain a target ground state corresponding to the target Hamiltonian by minimizing the energy of the target Hamiltonian.

[0104] In some embodiments, the base state acquisition unit includes a first determination component and a second determination component, wherein:

[0105] The first determination component is used to determine the target Hamiltonian, where the target Hamiltonian is the negative value of the Hamiltonian in the variational quantum eigensolver; The second determination component is used to determine the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero, and the target ground state tends to the maximum eigenvalue of the target Hamiltonian.

[0106] In some embodiments, the second determination component is specifically used to: obtain a first quantum circuit, the first quantum circuit consisting of an alternating first quantum gate sequence and a second quantum gate sequence; and determine the target ground state according to the first quantum gate sequence and the second quantum gate sequence.

[0107] In some embodiments, the base state acquisition unit includes a circuit acquisition component, an optimization parameter component and a measurement state component, wherein:

[0108] The circuit acquisition component is used to acquire a second quantum circuit, wherein the number of layers of the target solver corresponding to the second quantum circuit is lower than a preset layer number threshold; The optimization parameter component is used to obtain an objective function by optimizing a target number of parameters of the target solver, wherein the objective function is the maximized target Hamiltonian, and the target number is twice the number of layers; The measurement state component is used to measure the states of all quantum bits of the second quantum circuit output state through the target solver to obtain the target ground state.

[0109] In some embodiments, the apparatus further comprises: a clause determination module, the clause determination module being used to determine whether the text of all clauses in the three-out-of-one SAT problem is positive, and to obtain a target ratio corresponding to the three-out-of-one SAT problem, the target ratio being a ratio of a first quantity to a second quantity, the first quantity being used to characterize the number of clauses in the three-out-of-one SAT problem, and the second quantity being used to characterize the number of variables in the three-out-of-one SAT problem; The problem dimension reduction module 701 is also used to: when the text of all clauses in the three-out-of-one SAT problem is positive and the target ratio is greater than 0.5 and less than 0.8, update the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem.

[0110] In some embodiments, the difference between the target ratio and 0.626 is not less than a preset threshold, and the difference of not less than the preset threshold is used to indicate that the target ratio significantly deviates from 0.626.

[0111] In some embodiments, the dimension of the target solution space is 2 to the power of a third number, where the third number is equal to the difference between the second number and the first number.

[0112] In the embodiment of the present invention, by effectively reducing the dimension of the search space and reducing the complexity of the SAT problem, the convergence to the ground state is accelerated, and the success rate of solving the three-out-of-one SAT problem can be improved.

[0113] Figure 8 Schematic diagram of the physical structure of the electronic device provided by the present invention. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a quantum solution method for a three-out-of-one SAT problem, the method comprising: updating the solution space of the three-out-of-one SAT problem to a target solution space to obtain a target 2-SAT problem, the target solution space corresponding to the solution space of a relaxed problem, the relaxed problem including clauses of relaxed constraints; obtaining a target Hamiltonian corresponding to the target 2-SAT problem; and determining a solution to the three-out-of-one SAT problem according to the target Hamiltonian.

[0114] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0115] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the quantum solution method for the three-out-of-one SAT problem provided by the above methods, and the method includes: updating the solution space of the three-out-of-one SAT problem to a target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of a relaxed problem, and the relaxed problem includes a clause that relaxes the constraints; obtaining a target Hamiltonian corresponding to the target 2-SAT problem; and determining a solution to the three-out-of-one SAT problem based on the target Hamiltonian.

[0116] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0117] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a quantum solution method for the SAT problem of one-out-of-three form provided by the above methods, the method comprising: updating the solution space of the SAT problem of one-out-of-three form to a target solution space to obtain a target 2-SAT problem, the target solution space corresponding to the solution space of a relaxed problem, the relaxed problem including clauses that relax constraints; obtaining a target Hamiltonian corresponding to the target 2-SAT problem; and determining a solution to the SAT problem of one-out-of-three form based on the target Hamiltonian.

[0118] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0119] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0120] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0121] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0122] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A quantum solution method for a three-out-of-one SAT problem, characterized in that: include: Updating the solution space of the one-out-of-three SAT problem to the target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of the relaxed problem, wherein the relaxed problem includes clauses that relax the constraint conditions; Obtaining a target Hamiltonian corresponding to the target 2-SAT problem; A solution to the one-out-of-three SAT problem is determined according to the target Hamiltonian.

2. The quantum solution method for the three-out-of-one SAT problem according to claim 1 is characterized in that: The method of updating the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem includes: Updating the constraint condition of the clause of the one-out-of-three SAT problem from the initial condition to the target condition to obtain a relaxed clause, wherein the initial condition is that if only one variable among three variables in a clause is 1, the clause is considered to satisfy the condition, and the target condition is that if the number of 1s among three variables in a clause is an odd number, the clause is considered to satisfy the condition; The target 2-SAT problem is obtained by adding a restriction condition of the relaxed clause, wherein the restriction condition includes that two questions in the same clause cannot be true at the same time.

3. The quantum solution method for the three-out-of-one SAT problem according to claim 2 is characterized in that: The relaxation clause It is expressed as: ,in It indicates three clauses; The solution to the relaxed problem is expressed as: ,in, represents the 0-1 initial clause matrix A determined by the three-choice SAT problem, represents a 0-1 vector of any nk dimension, is the initial clause matrix The rank of is equal to the number of independent clauses modulo 2, Indicates an additional offset or correction term.

4. The quantum solution method for the three-out-of-one SAT problem according to claim 1 is characterized in that: Determining a solution to the one-out-of-three SAT problem according to the target Hamiltonian includes: Solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain a target ground state, wherein the target ground state is used to characterize the ground state or approximate the ground state; Determine whether the target basis state corresponds to a set of target solutions of the one-out-of-three form SAT problem. If so, output the target solution. If not, return to the previous step to solve the target basis state again. If the target solution is not obtained after repeating the preset number of times, determine that the one-out-of-three form SAT problem has no solution.

5. The quantum solution method for the three-out-of-one SAT problem according to claim 4 is characterized in that: Solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state includes: Acquire a quantum circuit, wherein all quantum states represented by the quantum circuit are located in the solution space of the relaxed problem; When both literals in the clause of the relaxed problem are true, determining the target Hamiltonian includes a penalty term, the penalty term being used to ensure that a situation where the clause is not satisfied is energetically penalized; By minimizing the energy of the target Hamiltonian, a target ground state corresponding to the target Hamiltonian is obtained.

6. The quantum solution method of the three-out-of-one SAT problem according to claim 4 is characterized in that: Solving the ground state of the target 2-SAT problem according to the target Hamiltonian to obtain the target ground state includes: Determining the target Hamiltonian, wherein the target Hamiltonian is the negative value of the Hamiltonian in the variational quantum eigensolver; The target ground state is determined by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero, and the target ground state tends to the maximum eigenvalue of the target Hamiltonian.

7. The quantum solution method of the three-out-of-one SAT problem according to claim 6 is characterized in that: Determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero includes: Acquire a first quantum circuit, wherein the first quantum circuit is composed of an alternating first quantum gate sequence and a second quantum gate sequence; The target ground state is determined according to the first quantum gate sequence and the second quantum gate sequence.

8. The quantum solution method of the three-out-of-one SAT problem according to claim 6 is characterized in that: Determining the target ground state by evaluating whether the maximum eigenvalue of the target Hamiltonian is equal to zero includes: Acquire a second quantum circuit, wherein the number of layers of a target solver corresponding to the second quantum circuit is lower than a preset layer number threshold; By optimizing the target number parameters of the target solver, an objective function is obtained, wherein the objective function is the maximized target Hamiltonian, and the target number is twice the number of layers; The target solver is used to measure the states of all quantum bits in the output state of the second quantum circuit to obtain the target ground state.

9. The quantum solution method for the three-out-of-one SAT problem according to claim 1 is characterized in that: Before updating the solution space of the one-out-of-three SAT problem to the target solution space to obtain the target 2-SAT problem, the method further includes: Determine whether the text of all clauses in the three-out-of-one SAT problem is positive, and obtain a target ratio corresponding to the three-out-of-one SAT problem, where the target ratio is a ratio of a first quantity to a second quantity, where the first quantity is used to characterize the number of clauses in the three-out-of-one SAT problem, and the second quantity is used to characterize the number of variables in the three-out-of-one SAT problem; The method of updating the solution space of the three-out-of-one SAT problem to the target solution space to obtain the target 2-SAT problem includes: When the literals of all clauses in the three-out-of-one SAT problem are positive and the target ratio is greater than 0.5 and less than 0.8, the solution space of the three-out-of-one SAT problem is updated to the target solution space to obtain the target 2-SAT problem.

10. The quantum solution method of the three-out-of-one SAT problem according to claim 9 is characterized in that: The difference between the target ratio and 0.626 is not less than a preset threshold, and the not less than the preset threshold is used to indicate that the target ratio significantly deviates from 0.

626.

11. The quantum solution method of the three-out-of-one SAT problem according to claim 9 is characterized in that: The dimension of the target solution space is 2 to the power of a third number, and the third number is equal to the difference between the second number and the first number.

12. A quantum solution device for a three-out-of-one SAT problem, characterized in that: include: A problem dimension reduction module, used for updating the solution space of the three-out-of-one SAT problem to a target solution space to obtain a target 2-SAT problem, wherein the target solution space corresponds to the solution space of the relaxed problem, and the relaxed problem includes a clause of a relaxed constraint condition; An energy acquisition module, used to obtain a target Hamiltonian corresponding to the target 2-SAT problem; A solution determination module is used to determine a solution to the one-out-of-three SAT problem according to the target Hamiltonian.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the quantum solution method for the one-out-of-three SAT problem as claimed in any one of claims 1 to 11 is implemented.

14. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the quantum solution method for the SAT problem of the one-out-of-three form as claimed in any one of claims 1 to 11 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the quantum solution method for the SAT problem of the one-out-of-three form as claimed in any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Training a quantum optimizer

    CN109155007A

  • Method and device for solving MAX-SAT problem of vehicle configuration, terminal and storage medium

    CN116502322A

  • Compact k-sat validation with tcams

    CN117275552A

  • Method and device for determining optimal solution of nonlinear programming problem based on quantum circuit

    CN118014091A

  • Transformation from general max sat to max 2sat

    US20170185565A1