Integer decomposition method based on quantum approximate optimization algorithm
By applying quantum approximation optimization algorithms on general quantum computers, the problem that adiabatic quantum computing method relies on dedicated computers and is difficult to combine with classical computing is solved, and efficient integer decomposition on noisy medium-scale quantum devices is achieved.
Patent Information
- Application Number
- CN202411679407.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-01
AI Technical Summary
Existing adiabatic quantum computing methods usually rely on dedicated quantum computers and are difficult to implement and scale on other general-purpose quantum computers; existing adiabatic quantum computing methods are difficult to combine with classical computing optimization algorithms, and it is difficult to use classical computing to accelerate the computing process and improve performance.
A integer decomposition method based on quantum approximation optimization algorithm is proposed. The method includes constructing an optimization algorithm for decomposing the RSA key in clauses, constructing a parametric quantum circuit based on clauses, solving the parameters of the quantum approximation optimization algorithm, and mapping the prime factor of the RSA key through quantum state measurement results.
This method is easy to implement and expand on general-purpose quantum computers, can be combined with optimization algorithms for classical computing, and accelerates the computing process using classical computing. It is suitable for noisy medium-scale quantum devices, avoiding dependence on resource-intensive fault-tolerant quantum computers.
Smart Images

Figure CN119743261A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of password decryption, and in particular relates to an integer decomposition method based on a quantum approximate optimization algorithm. Background Art
[0002] Modern cryptography is generally designed based on mathematical problems and high-order iterations, and its cryptographic strength far exceeds the computing power of classical computers. As a widely used public key data encryption standard, the RSA cryptography relies on the difficulty of factoring the product of two large prime numbers to achieve security, and can resist most cryptographic attacks known so far. In recent years, with the advancement of quantum computing technology, the possibility of deciphering RSA cryptography in a limited time is increasing.
[0003] Mathematician Peter Shor proposed a quantum algorithm for integer factorization, the Shor algorithm, which is of great significance in cracking RSA keys. The Shor algorithm can theoretically complete the prime factorization of large integers in polynomial time, which can achieve exponential improvement in computing efficiency compared to classical algorithms. In a fault-tolerant quantum computer architecture, when the logical quantum bits reach 100,000 and the circuit depth reaches 100 million, it only takes about 10 days to run the Shor algorithm to factorize a 2048-bit RSA number. However, at present and in the next five to ten years, quantum computing is at the level of noisy intermediate-scale quantum (NISQ) devices, where noisy means that the noise of quantum gates limits the scale of gate circuits, and intermediate-scale means that 50-100 physical quantum bits can be used for calculations at present. If algorithms such as the Shor algorithm based on general quantum circuits are run, extremely high numbers of quantum bits, extremely large circuit depths, and complex quantum error correction are required, and it is difficult to achieve efficient and accurate quantum computing with current equipment.
[0004] Converting integer decomposition into an optimization problem can avoid reliance on resource-intensive, fault-tolerant quantum computers. At present, existing results use adiabatic quantum computing for integer decomposition. Adiabatic quantum computing uses a quantum annealing architecture to initialize the system to a non-localized state, and the system finds the final lowest energy state in the evolution corresponding to the answer it is trying to find. To execute the quantum annealing algorithm, the cost function of integer decomposition is usually constructed based on the transverse field Ising model of magnetism. The Ising model has discrete variables representing the magnetic dipole moments of atomic spins, which can be arranged in a lattice, allowing local interactions only between neighboring nodes. In the preparation of Ising machines, breakthroughs have been made in D-Wave systems, optical Ising machines, and electronic Ising machines. However, the existing results still have the following shortcomings:
[0005] First, existing adiabatic quantum computing methods usually rely on dedicated quantum computers and are difficult to implement and expand on other general-purpose quantum computers.
[0006] Second, the existing adiabatic quantum computing methods are difficult to combine with the optimization algorithms of classical computing, and it is difficult to use classical computing to accelerate the computing process and improve performance. Summary of the invention
[0007] 1. Technical issues to be resolved
[0008] The technical problem to be solved by the present invention is how to provide an integer decomposition method based on a quantum approximate optimization algorithm to solve the problem that the existing adiabatic quantum computing method usually relies on a dedicated quantum computer and is difficult to implement and expand on other general-purpose quantum computers; the existing adiabatic quantum computing method is difficult to combine with the optimization algorithm of classical computing, and it is difficult to use classical computing to accelerate the computing process and improve performance.
[0009] (II) Technical solution
[0010] In order to solve the above technical problems, the present invention proposes an integer decomposition method based on a quantum approximate optimization algorithm, which comprises the following steps:
[0011] Step S1, construct a clause to describe an optimization algorithm for decomposing an RSA key M, where M is an integer;
[0012] Step S2, constructing a parameterized quantum circuit based on the clause;
[0013] Step S3, solving the parameters of the parameterized quantum circuit based on the quantum approximate optimization algorithm and measuring the final quantum state;
[0014] Step S4: The quantum state measurement result is mapped to two prime factors P and Q of the RSA key M, and P and Q are used to calculate the private key of the RSA algorithm.
[0015] (III) Beneficial effects
[0016] The present invention proposes an integer decomposition method based on a quantum approximate optimization algorithm, and the beneficial effects of the present invention include:
[0017] First, the present invention uses parameterized quantum gate circuits to describe integer decomposition optimization problems, which is easy to implement and expand on general quantum computers;
[0018] Second, the present invention adopts a quantum approximate optimization algorithm to solve the parameters of quantum gate circuits, and can use classical computing to accelerate the calculation process.
[0019] Third, the present invention can be run on noisy medium-scale quantum devices, does not rely on resource-intensive fault-tolerant quantum computers, and adapts to the current level of quantum computing development.
[0020] Fourth, the present invention uses parameterized quantum gate circuits to describe the key integer decomposition optimization problem, which is easy to implement and expand on a general quantum computer;
[0021] Fifth, the present invention adopts a quantum approximate optimization algorithm to solve the parameters of the quantum gate circuit and uses classical computing to accelerate the calculation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The overall flow chart of the integer decomposition method based on the quantum approximate optimization algorithm provided by the example of the present invention;
[0023] Figure 2 A flowchart for solving a parameterized quantum circuit based on a quantum approximate optimization algorithm provided for an example of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0025] The purpose of the present invention is to provide an integer decomposition method based on a quantum approximate optimization algorithm. The method should be able to effectively handle the following problems: first, it should be easy to implement and expand on a general-purpose quantum computer; second, it should be combined with an optimization algorithm for classical computing to accelerate the computing process using classical computing.
[0026] The purpose of the present invention is achieved through the following technical solutions: The present invention provides an integer decomposition method based on a quantum approximate optimization algorithm, comprising:
[0027] Step S1, construct a clause to describe an optimization algorithm for decomposing an RSA key M, where M is an integer;
[0028] Step S2, constructing a parameterized quantum circuit based on the clause;
[0029] Step S3, solving the parameters of the parameterized quantum circuit based on the quantum approximate optimization algorithm and measuring the final quantum state;
[0030] Step S4: The quantum state measurement result is mapped to two prime factors P and Q of the RSA key M, and P and Q are used to calculate the private key of the RSA algorithm.
[0031] In step S1, the construction clause is used to describe the optimization algorithm for decomposing the RSA key M, including:
[0032] Step S11, converting the RSA key M into a binary number m;
[0033] Step S12, constructing binary number coding dictionaries p and q corresponding to prime factors P and Q;
[0034] Step S13: Construct clause
[0035] Furthermore, the clause is a collection of multiple expressions.
[0036] Furthermore, the expression consists of symbols, numbers, and operators.
[0037] Furthermore, the symbols represent variables of the encoding dictionary p and the encoding dictionary q at corresponding binary bits.
[0038] Furthermore, the operators only include addition and multiplication, where addition is used to combine two or more symbols or numbers together for a summation operation, and multiplication is used to combine two or more symbols or numbers together for a product operation.
[0039] In step S2, constructing a parameterized quantum circuit based on clauses includes:
[0040] Step S21, initializing a Pauli term set and a secondary Pauli term set;
[0041] Step S22, traverse the clauses to construct Pauli terms;
[0042] Step S23, constructing a Pauli term combination corresponding to the cost Hamiltonian;
[0043] Step S24, constructing a Pauli term combination corresponding to the mixed Hamiltonian;
[0044] Step S25, constructing a parameterized quantum circuit layer of the cost Hamiltonian;
[0045] Step S26, constructing a parameterized quantum circuit layer of a hybrid Hamiltonian;
[0046] Step S27: construct a parameterized quantum circuit with an evolution step length of d.
[0047] In step S22, traversing the clause includes traversing each expression of the clause and traversing the numeric items or symbol items in each expression.
[0048] If the expression term is a number, a Pauli-I gate with the number as coefficient is constructed on the first qubit, and the Pauli term is added to the Pauli term set.
[0049] If the expression term contains and only contains one symbol, a Pauli-I gate with a coefficient of 0.5 is constructed on the quantum bit corresponding to the term, and a Pauli-Z gate with a coefficient of -0.5 is constructed on the quantum bit corresponding to the term, and these two Pauli terms are added to the Pauli term set.
[0050] If the expression term contains two and only two symbols, two additive combinations are constructed.
[0051] The first addition combination performs an addition operation on the first Pauli term and the second Pauli term. The first Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the first expression term. The second Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the first expression term.
[0052] The second addition combination performs an addition operation on the third Pauli term and the fourth Pauli term. The third Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the second expression term. The fourth Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the second expression term.
[0053] The first addition combination and the second addition combination perform a multiplication operation and add the multiplication result to the set of quadratic Pauli terms.
[0054] In step S23, the Pauli term combination corresponding to the cost Hamiltonian is the multiplication result of the summation term and the summation term.
[0055] The summation term is a result of sequentially performing addition operations on all the Pauli terms in the Pauli term set and the quadratic Pauli term set.
[0056] In step S24, each symbol type item in the clause is traversed, and a Pauli-X gate with a coefficient of -1 is constructed on the quantum bit corresponding to the item.
[0057] In step S24, the combination of Pauli terms corresponding to the mixed Hamiltonian is the result of performing an addition operation on all the Pauli-X gates constructed in step S24.
[0058] In the step S25, constructing the parameterized quantum circuit layer of the cost Hamiltonian includes: constructing a unitary transformation of the cost Hamiltonian based on a combination of a variable parameter γ and a Pauli term corresponding to the cost Hamiltonian.
[0059] In the step S26, constructing the parameterized quantum circuit layer of the hybrid Hamiltonian includes: constructing a unitary transformation of the hybrid Hamiltonian based on a combination of a variable parameter β and a Pauli term corresponding to the hybrid Hamiltonian.
[0060] In step S27, the parameterized quantum circuit is obtained by connecting multiple layers of assumed circuit layers, the number of layers being the evolution step d. The assumed circuit layer is obtained by connecting the parameterized quantum circuit layer of the cost Hamiltonian and the parameterized quantum circuit layer of the hybrid Hamiltonian.
[0061] The step S3 comprises:
[0062] Step S31, the initial state is prepared into a uniformly distributed quantum superposition state;
[0063] Step S32, initializing the variable parameters γ and β of the parameterized quantum circuit;
[0064] Step S33, using a classical optimizer to optimize the parameters γ and β to minimize the expected value of the cost Hamiltonian;
[0065] Step S34: Measure the final quantum state to obtain a candidate solution.
[0066] In step S31, the initial state, used to describe the ground state of the cost Hamiltonian, is prepared by applying an H gate to each quantum bit.
[0067] In step S32, the variable parameters γ and β are both arrays with a length of 2^d, and each element is a random number uniformly distributed in the range of [0,2Π]).
[0068] In step S33, the classical optimizer adopts the quasi-Newton method BFGS.
[0069] In step S34, the final quantum state is measured by applying a measurement gate to each quantum bit of the quantum circuit, and then substituting the solved parameters γ and β into the quantum circuit, and running the quantum circuit multiple times to obtain a bit string for sampling.
[0070] In step S34, the candidate solutions are obtained by counting the bit strings with the highest occurrence frequency.
[0071] Embodiment 1:
[0072] In order to make the purpose, content, and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings and examples.
[0073] The present invention provides an embodiment of an integer decomposition method based on a quantum approximate optimization algorithm. Figure 1 As shown, the embodiment of the present invention provides an integer decomposition method based on a quantum approximate optimization algorithm, comprising the following steps:
[0074] Step S1, construct a clause to describe an optimization algorithm for decomposing an RSA key M;
[0075] Step S2, constructing a parameterized quantum circuit based on the clause;
[0076] Step S3, solving the parameters of the parameterized quantum circuit based on the quantum approximate optimization algorithm and measuring the final quantum state;
[0077] Step S4: The quantum state measurement result is mapped into two prime factors P and Q of the RSA key M.
[0078] The step S1 is characterized in that the clause is constructed to describe the optimization algorithm for decomposing the integer M, including:
[0079] Step S11, converting the RSA key M into a binary number m;
[0080] Step S12, constructing binary number coding dictionaries p and q corresponding to prime factors P and Q;
[0081] Step S13: Construct clause
[0082] The clause is characterized by being a collection of multiple expressions.
[0083] The expression is characterized by being composed of symbols, numbers, and operators.
[0084] The symbol is characterized in that it represents the variables of the encoding dictionary p and the encoding dictionary q in the corresponding binary bits.
[0085] The operator is characterized in that it only includes addition and multiplication. Addition is used to combine two or more symbols or numbers together for summation operation, and multiplication is used to combine two or more symbols or numbers together for product operation.
[0086] The step S2 is characterized in that the clause-based construction of a parameterized quantum circuit includes: step S21, initializing a Pauli term set and a quadratic Pauli term set;
[0087] Step S22, traverse the clauses to construct Pauli terms;
[0088] Step S23, constructing a Pauli term combination corresponding to the cost Hamiltonian;
[0089] Step S24, constructing a Pauli term combination corresponding to the mixed Hamiltonian;
[0090] Step S25, constructing a parameterized quantum circuit layer of the cost Hamiltonian;
[0091] Step S26, constructing a parameterized quantum circuit layer of a hybrid Hamiltonian;
[0092] Step S27: construct a parameterized quantum circuit with an evolution step length of d.
[0093] The step S22 is characterized in that the clause is traversed, and the process includes traversing each expression of the clause and traversing the numerical terms or symbol terms in each expression.
[0094] The step S22 is characterized in that, if the expression term is a number, a Pauli-I gate with the number as a coefficient is constructed on the first quantum bit, and the Pauli term is added to the Pauli term set.
[0095] The step S22 is characterized in that, if the expression term contains and only contains one symbol, a Pauli-I gate with a coefficient of 0.5 is constructed on the quantum bit corresponding to the term, and a Pauli-Z gate with a coefficient of -0.5 is constructed on the quantum bit corresponding to the term, and these two Pauli terms are added to the Pauli term set.
[0096] The step S22 is characterized in that if the expression term contains and only contains two symbols, two addition combinations are constructed.
[0097] The step S22 is characterized in that the first addition combination performs an addition operation on the first Pauli term and the second Pauli term. The first Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the first expression term. The second Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the first expression term.
[0098] The step S22 is characterized in that the second addition combination performs an addition operation on the first Pauli term and the second Pauli term. The first Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the second expression term. The second Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the second expression term.
[0099] The step S22 is characterized in that the first addition combination and the second addition combination perform a multiplication operation, and add the multiplication result to the set of secondary Pauli terms.
[0100] The step S23 is characterized in that the Pauli term combination corresponding to the cost Hamiltonian is the result of multiplication of sum terms and sum terms. The sum term is characterized in that it is the result of sequentially performing addition operations on all Pauli terms in the Pauli term set and the quadratic Pauli term set.
[0101] The step S24 is characterized by traversing each symbol type item in the clause, and constructing a Pauli-X gate with a coefficient of -1 on the quantum bit corresponding to the item.
[0102] The step S24 is characterized in that the combination of Pauli terms corresponding to the mixed Hamiltonian is the result of performing an addition operation on all the Pauli-X gates constructed in step S24.
[0103] The step S25 is characterized in that the parameterized quantum circuit layer of the cost Hamiltonian constructs a unitary transformation of the cost Hamiltonian based on a combination of variable parameters γ and Pauli terms corresponding to the cost Hamiltonian.
[0104] The step S26 is characterized in that the parameterized quantum circuit layer of the hybrid Hamiltonian constructs a unitary transformation of the hybrid Hamiltonian based on a combination of a variable parameter β and a Pauli term corresponding to the hybrid Hamiltonian.
[0105] The step S27 is characterized in that the parameterized quantum circuit is obtained by connecting multiple layers of assumed circuit layers, and the number of layers is the evolution step d. The assumed circuit layer is characterized in that it is obtained by connecting a parameterized quantum circuit layer of a cost Hamiltonian and a parameterized quantum circuit layer of a mixed Hamiltonian.
[0106] The step S3 is characterized in that the parameters of the parameterized quantum circuit are solved based on the quantum approximate optimization algorithm, including:
[0107] Step S31, the initial state is prepared into a uniformly distributed quantum superposition state;
[0108] Step S32, initializing the variable parameters γ and β of the parameterized quantum circuit;
[0109] Step S33, using a classical optimizer to optimize the parameters γ and β to minimize the expected value of the cost Hamiltonian;
[0110] Step S34: Measure the final quantum state to obtain a candidate solution.
[0111] The step S31 is characterized in that the initial state, describing the ground state of the cost Hamiltonian, is prepared by applying an H gate on each quantum bit.
[0112] The step S32 is characterized in that the variable parameters γ and β are both arrays with a length of 2^d, and each element is a random number uniformly distributed in the range of [0,2Π]).
[0113] The step S33 is characterized in that the classical optimizer adopts the quasi-Newton method BFGS.
[0114] The step S34 is characterized in that the final quantum state is measured by applying a measurement gate to each quantum bit of the quantum circuit, and then substituting the solved parameters γ and β into the quantum circuit, and running the quantum circuit multiple times to obtain a bit string for sampling.
[0115] The step S34 is characterized in that the candidate solution is obtained by counting the bit strings with the highest occurrence frequency.
[0116] The beneficial effects of the present invention include:
[0117] First, the present invention uses parameterized quantum gate circuits to describe integer decomposition optimization problems, which is easy to implement and expand on general quantum computers;
[0118] Second, the present invention adopts a quantum approximate optimization algorithm to solve the parameters of quantum gate circuits, and can use classical computing to accelerate the calculation process.
[0119] Third, the present invention can be run on noisy medium-scale quantum devices, does not rely on resource-intensive fault-tolerant quantum computers, and adapts to the current level of quantum computing development.
[0120] Fourth, the present invention uses parameterized quantum gate circuits to describe integer decomposition optimization problems, which is easy to implement and expand on general quantum computers;
[0121] Fifth, the present invention adopts a quantum approximate optimization algorithm to solve the parameters of the quantum gate circuit and uses classical computing to accelerate the calculation process.
[0122] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An integer decomposition method based on quantum approximate optimization algorithm, characterized in that: The method comprises the following steps: Step S1, construct a clause to describe an optimization algorithm for decomposing an RSA key M, where M is an integer; Step S2, constructing a parameterized quantum circuit based on the clause; Step S3, solving the parameters of the parameterized quantum circuit based on the quantum approximate optimization algorithm and measuring the final quantum state; Step S4: The quantum state measurement result is mapped to two prime factors P and Q of the RSA key M, and P and Q are used to calculate the private key of the RSA algorithm.
2. The integer decomposition method based on quantum approximate optimization algorithm according to claim 1, characterized in that: In step S1, the construction clause is used to describe the optimization algorithm for decomposing the RSA key M, including: Step S11, converting the RSA key M into a binary number m; Step S12, constructing binary number coding dictionaries p and q corresponding to prime factors P and Q; Step S13: Construct clause 3. The integer decomposition method based on quantum approximate optimization algorithm as claimed in claim 2, characterized in that: The clause is a collection of multiple expressions, each of which consists of symbols, numbers, and operators. The symbols represent variables of the coding dictionary p and the coding dictionary q at corresponding binary bits. The operators only include addition and multiplication. Addition is used to combine two or more symbols or numbers together for a summation operation, and multiplication is used to combine two or more symbols or numbers together for a product operation.
4. The integer decomposition method based on the quantum approximate optimization algorithm according to claim 2 or 3, characterized in that: In step S2, constructing a parameterized quantum circuit based on clauses includes: Step S21, initializing a Pauli term set and a secondary Pauli term set; Step S22, traverse the clauses to construct Pauli terms; Step S23, constructing a Pauli term combination corresponding to the cost Hamiltonian; Step S24, constructing a Pauli term combination corresponding to the mixed Hamiltonian; Step S25, constructing a parameterized quantum circuit layer of the cost Hamiltonian; Step S26, constructing a parameterized quantum circuit layer of a hybrid Hamiltonian; Step S27: construct a parameterized quantum circuit with an evolution step length of d.
5. The integer decomposition method based on quantum approximate optimization algorithm as claimed in claim 4, characterized in that: In the step S22, traversing the clause includes traversing each expression of the clause and traversing the numeric items or symbol items in each expression; If the expression term is a number, a Pauli-I gate with the number as the coefficient is constructed on the first quantum bit, and the Pauli term is added to the Pauli term set; If the expression term contains only one symbol, a Pauli-I gate with a coefficient of 0.5 is constructed on the quantum bit corresponding to the term, and a Pauli-Z gate with a coefficient of -0.5 is constructed on the quantum bit corresponding to the term, and these two Pauli terms are added to the Pauli term set; If the expression term contains two and only two symbols, two additive combinations are constructed; The first addition combination performs an addition operation on the first Pauli term and the second Pauli term; the first Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the first expression term; the second Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the first expression term; The second addition combination performs an addition operation on the third Pauli term and the fourth Pauli term; the third Pauli term is a Pauli-I gate with a coefficient of 0.5 on the quantum bit corresponding to the second expression term; the fourth Pauli term is a Pauli-Z gate with a coefficient of -0.5 on the quantum bit corresponding to the second expression term; The first addition combination and the second addition combination perform a multiplication operation and add the multiplication result to the set of quadratic Pauli terms.
6. The integer decomposition method based on quantum approximate optimization algorithm as claimed in claim 5, characterized in that: In the step S23, the Pauli term combination corresponding to the cost Hamiltonian is the result of multiplication of sum terms and sum terms; the sum term is the result of sequentially performing addition operations on all Pauli terms in the Pauli term set and the secondary Pauli term set; In the step S24, each symbol type item in the clause is traversed, and a Pauli-X gate with a coefficient of -1 is constructed on the quantum bit corresponding to the item respectively; in the step S24, the combination of Pauli terms corresponding to the mixed Hamiltonian is the result of performing an addition operation on all the Pauli-X gates constructed in step S24.
7. The integer decomposition method based on quantum approximate optimization algorithm according to claim 6, characterized in that: In the step S25, constructing the parameterized quantum circuit layer of the cost Hamiltonian includes: constructing a unitary transformation of the cost Hamiltonian based on a combination of the variable parameter γ and the Pauli term corresponding to the cost Hamiltonian; In the step S26, constructing the parameterized quantum circuit layer of the hybrid Hamiltonian includes: constructing a unitary transformation of the hybrid Hamiltonian based on a combination of a variable parameter β and a Pauli term corresponding to the hybrid Hamiltonian.
8. The integer decomposition method based on quantum approximate optimization algorithm according to claim 7, characterized in that: In step S27, the parameterized quantum circuit is obtained by connecting multiple layers of assumed circuit layers, and the number of layers is the evolution step d; the assumed circuit layer is obtained by connecting the parameterized quantum circuit layer of the cost Hamiltonian and the parameterized quantum circuit layer of the mixed Hamiltonian.
9. The integer decomposition method based on quantum approximate optimization algorithm as claimed in claim 8, characterized in that: The step S3 comprises: Step S31, the initial state is prepared into a uniformly distributed quantum superposition state; Step S32, initializing the variable parameters γ and β of the parameterized quantum circuit; Step S33, using a classical optimizer to optimize the parameters γ and β to minimize the expected value of the cost Hamiltonian; Step S34: Measure the final quantum state to obtain a candidate solution.
10. The integer decomposition method based on quantum approximate optimization algorithm according to claim 9, characterized in that: In the step S31, the initial state, used to describe the ground state of the cost Hamiltonian, is prepared by applying an H gate to each qubit; In step S32, the variable parameters γ and β are arrays of length 2^d, and each element is a random number uniformly distributed in the range of [0,2Π]); In step S33, the classical optimizer adopts the quasi-Newton method BFGS; In step S34, the final quantum state is measured by applying a measurement gate to each quantum bit of the quantum circuit, and then substituting the solved parameters γ and β into the quantum circuit, and running the quantum circuit multiple times to obtain a bit string for sampling; In step S34, the candidate solutions are obtained by counting the bit strings with the highest occurrence frequency.
Citation Information
Cited By
Public key decomposition method based on digital inverse adiabatic quantum optimization
CN120433927A
RSA public key cracking method based on CRAB quantum algorithm optimization, storage medium and equipment
CN120498666A
A method, storage medium, and device for cracking RSA public keys based on CRAB quantum algorithm optimization
CN120498666B
