Quantum approximate optimization method and device based on easy Hamiltonian

By comparing the variable component quantum circuit composed of easy Hamiltonian and target Hamiltonian, the problem of QAOA being unable to effectively encode constraints is solved, efficient quantum computing constraint optimization is achieved, and the solution success rate and constraint satisfaction rate are improved, which is suitable for binary constraint optimization problems in intelligent decision-making and resource configuration.

CN120450072APending Publication Date: 2025-08-08ZHEJIANG UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510387348.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing quantum approximation optimization algorithm (QAOA) cannot effectively encode constraints, resulting in low success rate when solving binary constraint optimization problems. The existing Hamiltonian method is difficult to apply to arbitrary linear equations, resulting in increased optimization difficulty.

Method used

A variable component quantum circuit composed of easy Hamiltonian and target Hamiltonian is used to ensure that the quantum state evolution process is carried out in feasible subspace, the quantum state is initialized through quantum logic gate operations, and the classical optimization algorithm is used to iterate the parameters to approximate the optimal solution.

Benefits of technology

It significantly improves the constraint satisfaction rate and solution success rate of quantum computing, reduces the number of iterations, and supports general encoding of arbitrary linear constraints, which is suitable for graph theory, combination allocation optimization and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450072A_ABST
    Figure CN120450072A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum approximate optimization method and device based on easy Hamiltonian, and belongs to the technical field of quantum computation.The quantum approximate optimization method comprises the steps that a binary constraint optimization problem in intelligent decision making and resource configuration is converted into a linear constraint equation; preparing the initial state of the quantum circuit into an initial state corresponding to the special solution of the linear constraint equation; a variable component sub-circuit composed of a target Hamiltonian and an easy-to-drive Hamiltonian is designed, so that quantum state evolution is strictly limited in a feasible sub-space; a final quantum state is simulated and measured through Hamiltonian to obtain a candidate solution, and parameters are iteratively adjusted by using a classical optimization algorithm to approach an optimal solution. According to the method, convergence is accelerated through special solution initialization, the number of iterations is reduced, the evolutionary process is guaranteed to always meet constraint conditions through peaceability, and the solving efficiency and the success rate are remarkably 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 computing technology, and in particular to a quantum approximation optimization method and device based on a commutative Hamiltonian. Background Art

[0002] Quantum computing, as an emerging computing paradigm, holds the promise of resolving technical challenges in combinatorial optimization, quantum chemistry, information security, and artificial intelligence that are intractable with classical computers. Quantum computing hardware and software are currently experiencing rapid development. The question of how to leverage quantum hardware to solve practical problems in the short term has become a research hotspot in the field. Exploring the near-term applications of quantum hardware is crucial for understanding its capabilities and advancing its practical application.

[0003] Current quantum computing hardware is often referred to as noisy, medium-scale quantum devices. They operate on a small number of qubits and have limited error correction capabilities. Demonstrating quantum advantage on these devices requires developing quantum computing algorithms that can be run using moderate quantum circuit depths.

[0004] In quantum computing, the Quantum Approximate Optimization Algorithm (QAOA) is a quantum algorithm used to solve combinatorial optimization problems. It was first proposed by Farhi, Goldstone, and Gutmarn in 2014. Its goal is to use quantum computing to approximate solutions to NP-hard problems, such as the maximum cut problem. These problems can typically be formulated as binary optimization problems, where the decision variables can only take on values of 0 or 1. When additional constraints are involved, these problems become constrained binary optimization problems.

[0005] QAOA is a variational quantum algorithm that consists of a target Hamiltonian and a driving Hamiltonian, used to iteratively search for optimal solutions. It encodes the objective function and constraints into the Hamiltonian and updates the parameters during the Hamiltonian simulation. Penalty-based methods are a natural approach, inserting constraints as penalty terms into the objective function. However, existing QAOAs are unable to fully encode constraints, resulting in a low success rate for solving binary constrained optimization problems. Fundamentally, penalty-based methods only support soft constraint encoding and are highly dependent on the coefficient of the penalty term. Small penalty coefficients may not fully account for the constraints, while larger coefficients narrow the gap between optimal and suboptimal solutions when calculating the objective, thereby reducing the success rate of quantum computation.

[0006] The penalty-based QAOA essentially expresses the Hamiltonian matrix described by the Ising model, which is a mathematical representation of the evolution of a quantum system. Therefore, another way to encode constraints is to develop other types of Hamiltonians, such as encoding constraints into the driving Hamiltonian. However, existing Hamiltonian-based methods usually require constraints to conform to a specific format and are difficult to apply to arbitrary linear equations. For example, simulations based on periodic Hamiltonians only support equations described in summation format (e.g., x1+x2+x3=2, or -x1-x2-x3=-1). Therefore, when dealing with complex constraints, solutions may be found in non-constrained spaces, and these methods also exhibit poor quantum computing solution success rates.

[0007] Current QAOA methods based on penalty terms or traditional driving Hamiltonians cannot effectively represent all constraints when solving constrained combinatorial optimization problems, causing the solution to deviate from the feasible solution space and increasing the optimization difficulty. Therefore, optimizing the current QAOA methods to overcome the low constraint ratio and thus improve the accuracy of quantum computing solutions is an urgent issue that needs to be addressed. Summary of the Invention

[0008] To solve the above technical problems, the present invention provides a quantum approximate optimization method and device based on the commutative Hamiltonian. Through a variational quantum circuit composed of a target Hamiltonian and a commutative driving Hamiltonian, each step in the evolution process is controlled within a subspace that satisfies the constraints, realizing universal encoding of arbitrary linear constraints, improving the approximate optimization effect, reducing the number of iterations, and accelerating the quantum computing process.

[0009] To achieve the above-mentioned object of the invention, an embodiment provides a quantum approximate optimization method based on a commutative Hamiltonian, comprising the following steps:

[0010] Transform the binary constraint optimization problem in intelligent decision-making and resource allocation into a linear constraint equation, and prepare the initial state of the quantum circuit into the initial state corresponding to the particular solution of the linear constraint equation;

[0011] Construct the target Hamiltonian based on the objective function in the binary constrained optimization problem;

[0012] Solve the basic solution system of the homogeneous equations of the linear constraint equations, construct each solution vector in the basic solution system into a commutative Hamiltonian, and linearly combine the commutative Hamiltonians corresponding to all solution vectors to construct a commutative driving Hamiltonian;

[0013] Based on the initial state of the particular solution, the Hamiltonian simulation of the target Hamiltonian and the easy-driven Hamiltonian is alternately applied in the quantum circuit to obtain the variational quantum circuit;

[0014] By measuring the variational quantum circuit, we obtain the quantum state of the solution to the corresponding constrained binary optimization problem, calculate the expectation of the objective function, and optimize the parameters in the Hamiltonian simulation so that the expectation continuously approaches the optimal solution.

[0015] In one embodiment, the qubit corresponding to the variable 1 in the particular solution is flipped from |0> to |1> through a Pauli-X gate, and the remaining qubits remain unchanged.

[0016] In one embodiment, the basic solution system of homogeneous equations for solving linear constraint equations includes: Homogeneous equation of Convert it into matrix form, convert it into simplified row echelon form by Gaussian elimination method, and solve the basic solution system of homogeneous equations in, is a linearly independent solution of the homogeneous equation, u i ∈{-1, 0, 1}.

[0017] In one embodiment, constructing a commutative Hamiltonian for each basic solution vector in the basic solution system includes: for each solution vector Constructing commutative operators to generate commutative Hamiltonians Expressed as:

[0018]

[0019] Among them, σ i is the operator acting on the ith qubit, for a given linear constraint The corresponding constraint operator is Commutative Hamiltonian AND constraint operator The commutation relationship between

[0020] In one embodiment, the final driving Hamiltonian is a linear combination of the commutative Hamiltonians corresponding to all bases Commutative driving Hamiltonian H d AND constraint operator The commutation relationship between

[0021] In one embodiment, the Hamiltonian simulation of the target Hamiltonian and the easy-driven Hamiltonian is applied alternately in the quantum circuit to obtain the variational quantum circuit, including: applying the target Hamiltonian H alternately in each layer of the quantum circuit. O and the commutative driving Hamiltonian H d The Hamiltonian simulation of the final quantum state |ψ θ >:

[0022]

[0023] Where L is the number of layers of Hamiltonian simulation repeated alternation, and the parameter set |ψ0> is the initial state corresponding to the particular solution of the linear constraint equation, γ l Control the target Hamiltonian H of the lth layer O The evolution time, β l Control the commutative driving Hamiltonian H of the lth layer d Length of evolution.

[0024] In one embodiment, the solution to the binary constrained optimization problem is obtained by measuring the final quantum state, including: θ > Take measurements and get the solution to the binary constrained optimization problem Repeat the measurement several times and calculate the target expected value <H O >.

[0025] In one embodiment, iteratively updating the parameters in the Hamiltonian to approach the optimal solution includes: based on the target expected value <H O >, use classic optimization algorithm to iteratively update parameter set Until convergence or the maximum number of iterations is reached, the expectation approaches the optimal solution.

[0026] In one embodiment, the variational quantum circuit uses a gradient descent method, an adaptive moment estimation method, or a stochastic parallel approximation method for parameter optimization.

[0027] The present invention also provides a quantum approximate optimization device based on the commutative Hamiltonian, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the quantum approximate optimization method based on the commutative Hamiltonian when executing the computer program.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] (1) Starting from a particular solution, the initial quantum state of the quantum circuit is encoded into a classical solution through quantum logic gate operations, which accelerates the convergence of quantum computing and effectively reduces the number of iterations;

[0030] (2) By driving the commutativity between the Hamiltonian and the target Hamiltonian, the quantum states of the Hamiltonian simulation evolution strictly satisfy the original constraints, so that the Hamiltonian simulation evolution is carried out in the feasible subspace, and the constraint satisfaction rate and solution success rate of quantum computing are significantly improved;

[0031] (3) The quantum approximate optimization method provided by the present invention supports arbitrary linear constraints, has strong generalization capabilities, and can be widely applied to fields such as graph theory and combinatorial allocation optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.

[0033] Figure 1 1 is a flow chart of a quantum approximate optimization method based on the commutative Hamiltonian provided by the present invention;

[0034] Figure 2 It is a schematic diagram of the quantum approximation optimization method based on the commutative Hamiltonian provided by the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0036] In order to achieve universal encoding of arbitrary linear constraints, improve the approximate optimization effect, and reduce the number of iterations, the embodiment provides a quantum approximate optimization method based on the commutative Hamiltonian, such as Figure 1 As shown, the following steps are included:

[0037] S1. Convert the binary constraint optimization problem in intelligent decision-making and resource allocation into a linear constraint equation, and prepare the initial state of the quantum circuit into the initial state corresponding to the particular solution of the linear constraint equation.

[0038] In the embodiment, Figure 2 As shown, given a binary constrained optimization problem, it is transformed into a linear constraint equation For a particular solution of the linear constraint equation Pauli-X gates are applied to the first and third qubits to flip the qubits from the initial state |0> to the target state |1>. No operations are applied to the remaining qubits to complete the initialization of the quantum circuit. The initial quantum state of the quantum circuit is represented as |ψ0).

[0039] S2. Construct the target Hamiltonian based on the objective function in the binary constrained optimization problem.

[0040] S3. Solve the basic solution system of the homogeneous equations of the linear constraint equations, construct each solution vector in the basic solution system into a commutative Hamiltonian, and linearly combine the commutative Hamiltonians corresponding to all solution vectors to construct a commutative driving Hamiltonian.

[0041] Given a binary constrained optimization problem, transform it into a linear constraint equation The linear constraint equation Convert it to matrix form, and then use Gaussian elimination to convert the matrix into simplified row echelon form. Then, assign 1 to each free variable in turn, and take the remaining free variables as 0, and back-substitute to solve the main variable. Then, scale the solution vector to {-1, 0, 1} n Range, we get a set of homogeneous solutions, which is the basic solution system of the original constraint equation, expressed as in, is a linearly independent solution of the homogeneous equation, u i ∈{-1,0,1}, specifically, Figure 2 As shown, the basic solution series can be

[0042] For each solution vector in the basic solution system Constructing commutative operators to generate commutative Hamiltonians Expressed as:

[0043]

[0044] Among them, σ i is the operator acting on the ith qubit, for a given linear constraint The corresponding constraint operator is Commutative Hamiltonian AND constraint operator The commutation relationship between

[0045] Next, each basic solution vector The corresponding commutative Hamiltonian The linear combination constructs the commutative driving Hamiltonian H d :

[0046]

[0047] Among them, the commutative driving Hamiltonian H d AND constraint operator The commutation relationship between This ensures that the quantum state is always in the feasible subspace during the driving process. Figure 2 As shown, the constructed commutative driving Hamiltonian

[0048] S4. Based on the initial state of the particular solution, the Hamiltonian simulation of the target Hamiltonian and the easy-driven Hamiltonian is alternately applied in the quantum circuit to obtain a variational quantum circuit.

[0049] like Figure 2 As shown, the quantum circuit is composed of L layers of alternating Hamiltonian simulations, and the target Hamiltonian H is applied alternately in each layer of the quantum circuit. Oand the commutative driving Hamiltonian H d The Hamiltonian simulation of the variational electronic circuit and the final quantum state |ψ θ >:

[0050]

[0051] Where L is the number of layers of Hamiltonian simulation repeated alternation, and the parameter set |ψ0> is the initial state corresponding to the particular solution of the linear constraint equation, γ l Control the target Hamiltonian H of the lth layer O The evolution time, β l Control the commutative driving Hamiltonian H of the lth layer d Length of evolution.

[0052] Among them, when encoding the Hamiltonian to the quantum circuit, the complete solution is substituted into the expression to obtain the Hamiltonian matrix, and then the matrix gate is inserted through QuantumCircuit.unitary in IBM's Qiskit library, and then it is encoded into the basic gate through transpile to realize real machine deployment.

[0053] S5. By measuring the variational quantum circuit, we obtain the quantum state of the solution to the corresponding constrained binary optimization problem, calculate the expectation of the objective function, and optimize the parameters in the Hamiltonian simulation so that the expectation continuously approaches the optimal solution.

[0054] In this embodiment, the final quantum state |ψ θ > Take measurements and get the solution to the binary constrained optimization problem Repeat the measurement several times and calculate the target expected value <H O >. Based on target expected value<H O >, use classic optimization algorithm to iteratively update parameter set Until convergence or the maximum number of iterations is reached, the expectation approaches the optimal solution.

[0055] Variational quantum circuits use gradient descent methods, such as the Cobyla classic parameter optimizer in the scipy.optimize library, to modify the objective function of the original equation as the cost function. Adaptive moment estimation methods or stochastic parallel approximation methods can also be used for parameter optimization.

[0056] An embodiment also provides a quantum approximate optimization device based on the commutative Hamiltonian, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the quantum approximate optimization method based on the commutative Hamiltonian when executing the computer program.

[0057] In order to verify the effectiveness of the quantum approximate optimization method based on the commutative Hamiltonian proposed in the present invention, experiments were conducted in the following three application scenarios.

[0058] 1. Graph coloring problem: Graph coloring problems in the fields of circuit wiring, spectrum allocation, and course scheduling are used to solve conflict allocation problems, with the goal of making adjacent nodes have different colors. Based on the constraint of making adjacent nodes have different colors under a given adjacency relationship, a commutative Hamiltonian is constructed, and a variational quantum circuit for the graph coloring problem is constructed. The calculation results are obtained through quantum measurement, and the circuit parameters are optimized in combination with classical optimization algorithms to solve the conflict allocation problem and achieve the goal of using as few colors as possible. As shown in Table 1, compared with the traditional penalty term QAOA and the periodic Hamiltonian QAOA, the success rate of the optimal solution of the present invention reaches 67.1%, the constraint satisfaction rate is significantly improved, and the latency is greatly reduced, while the success rate of the optimal solution of other methods is less than 10%.

[0059] Table 1

[0060] method Constraint satisfaction rate Success rate (optimal solution) Latency Traditional penalty item QAOA 0.07% 0.003% 16.6s Periodic Hamiltonian QAOA 0.67% 0.14% 19.6s The present invention 100% 67.1% 7.07s

[0061] 2. Facility location: Facility location in logistics, supply chain management, and urban planning requires determining the optimal facility distribution within constraints such as cost, distance, and service range. Traditional integer linear programming suffers from a large number of dependent variables and is computationally inefficient, making it difficult to address modern complex scenarios (such as multi-warehouse collaborative optimization). By applying the commutative Hamiltonian, we can rigorously ensure that all linear constraints (such as supply-demand balance and facility capacity limits) are satisfied, avoiding suboptimal results caused by approximate solutions violating constraints.

[0062] 3. K-segmentation: K-segmentation in market segmentation, customer clustering, and image segmentation aims to partition a dataset into K subsets while minimizing the differences between them. Traditional dynamic programming and heuristic algorithms suffer from computational overhead when the data dimension is high. By leveraging the properties of the commutative Hamiltonian, parallel exploration of multiple solution spaces is possible.

[0063] Therefore, for the binary constraint optimization problems in intelligent decision-making and resource allocation, they are converted into linear constraint equations. Then, through the variational quantum circuit composed of the target Hamiltonian and the commutative driving Hamiltonian, each step of the evolution process is controlled within the subspace that satisfies the constraints, realizing the universal encoding of arbitrary linear constraints, improving the approximate optimization effect, reducing the number of iterations, and accelerating the quantum computing process.

[0064] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A quantum approximate optimization method based on commutative Hamiltonian, characterized in that: The following steps are involved: Transform the binary constraint optimization problem in intelligent decision-making and resource allocation into a linear constraint equation, and prepare the initial state of the quantum circuit into the initial state corresponding to the particular solution of the linear constraint equation; Construct the target Hamiltonian based on the objective function in the binary constrained optimization problem; Solve the basic solution system of the homogeneous equations of the linear constraint equations, construct each solution vector in the basic solution system into a commutative Hamiltonian, and linearly combine the commutative Hamiltonians corresponding to all solution vectors to construct a commutative driving Hamiltonian; Based on the initial state of the particular solution, the Hamiltonian simulation of the target Hamiltonian and the easy-driven Hamiltonian is alternately applied in the quantum circuit to obtain the variational quantum circuit; By measuring the variational quantum circuit, we obtain the quantum state of the solution to the corresponding constrained binary optimization problem, calculate the expectation of the objective function, and optimize the parameters in the Hamiltonian simulation so that the expectation continuously approaches the optimal solution.

2. The quantum approximate optimization method according to claim 1, characterized in that The Pauli-X gate is used to flip the quantum bit corresponding to the variable 1 in the special solution from |0> to |1>, and the remaining quantum bits remain unchanged.

3. The quantum approximate optimization method according to claim 1, characterized in that The basic solution system of homogeneous equations for solving linear constraint equations includes: Homogeneous equation of Convert it into matrix form, convert it into simplified row echelon form by Gaussian elimination method, and solve the basic solution system of homogeneous equations in, is a linearly independent solution of the homogeneous equation, u i ∈{-1, 0, 1}.

4. The quantum approximate optimization method according to claim 3, characterized in that: Construct a commutative Hamiltonian for each basic solution vector in the basic solution system, including: for each solution vector Constructing commutative operators to generate commutative Hamiltonians Expressed as: Among them, σ i is the operator acting on the ith quantum bit, for a given linear constraint The corresponding constraint operator is Commutative Hamiltonian AND constraint operator The commutation relationship between 5. The quantum approximate optimization method according to claim 4, characterized in that: The final commutative driving Hamiltonian is a linear combination of the commutative Hamiltonians corresponding to all bases Commutative driving Hamiltonian H d AND constraint operator The commutation relationship between 6. The quantum approximate optimization method according to claim 1, characterized in that The method of alternately applying the target Hamiltonian and the Hamiltonian of the easy-driven Hamiltonian in the quantum circuit to obtain the variational quantum circuit includes: alternately applying the target Hamiltonian H in each layer of the quantum circuit. o and the commutative driving Hamiltonian H d The Hamiltonian simulation of the final quantum state |ψ θ >: Where L is the number of layers of Hamiltonian simulation repeated alternation, and the parameter set |ψ0> is the initial state corresponding to the particular solution of the linear constraint equation, γ l Control the target Hamiltonian H of the lth layer o The evolution time, β l Control the commutative driving Hamiltonian H of the lth layer d Length of evolution.

7. The quantum approximate optimization method according to claim 6, characterized in that: The solution to the binary constrained optimization problem is obtained by measuring the final quantum state, including: θ > Take measurements and get the solution to the binary constrained optimization problem Repeat the measurement multiple times and calculate the target expected value <H o >.

8. The quantum approximate optimization method according to claim 7, characterized in that: Iteratively update the parameters in the Hamiltonian to approach the optimal solution, including: based on the target expected value <H O >, iteratively update the parameter set using classic optimization algorithms Until convergence or the maximum number of iterations is reached, the expectation approaches the optimal solution.

9. The quantum approximate optimization method according to claim 8, characterized in that: Variational quantum circuits are optimized using gradient descent methods, adaptive moment estimation methods, or stochastic parallel approximation methods.

10. A quantum approximate optimization device based on a commutative Hamiltonian, comprising a memory and a processor, wherein the memory is used to store a computer program, characterized in that: The processor is configured to implement the quantum approximate optimization method based on the commutative Hamiltonian according to any one of claims 1 to 9 when executing the computer program.

Citation Information

Cited By

  • Iterative optimization robust quantum operation chromatography method

    CN121031812A

  • Unmanned global path planning method and system based on quantum annealing optimization

    CN121089768A

  • Coding method and device for quantum optimization solution, program and storage medium

    CN121457653A

  • Quantum measurement method and system for molecular orbital of material and electronic equipment

    CN122117075A