Pauli operator string grouping method, hamiltonian expectation value solving method and device

By grouping and unitary transforming the Pauli operator strings, the problem of high computational cost in solving the expectation value of Hamiltonians is solved, and computational efficiency is improved, especially for large-scale systems.

CN122452807APending Publication Date: 2026-07-24ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
Filing Date
2025-01-17
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing techniques involve large computational costs when solving for the expected value of the Hamiltonian of real molecular systems, and it is difficult to optimize the calculation process through commutation relations, resulting in low efficiency.

Method used

By grouping Pauli operator strings and using operator and index features to determine the commutation relations of the Pauli operator strings, they are classified into the same group and transformed into per-qubit commutation relations using unitary transformation, thus achieving unified measurement of Pauli operator strings.

Benefits of technology

It reduces the computational cost in solving the expectation value of the Hamiltonian and improves computational efficiency, especially for large-scale systems where the reduction in computational cost is more significant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122452807A_ABST
    Figure CN122452807A_ABST
Patent Text Reader

Abstract

The application discloses a Pauli operator string grouping method and a Hamiltonian expectation value solving method and device. The method comprises the following steps: obtaining a plurality of Pauli operator strings, each Pauli operator string being composed of a plurality of Pauli operators and the number of each Pauli operator, and the number of the Pauli operator being used for representing the bit sequence number acted by the Pauli operator; determining an operator feature according to the number and / or type of the Pauli operators in each Pauli operator string, and determining an index feature according to the number of the Pauli operators in each Pauli operator string and the operator feature; and dividing the Pauli operator strings with the same operator feature and index feature into the same group. By adopting the application, the grouping of the Pauli operator strings can be realized, and the calculation amount in the Hamiltonian expectation value solving process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing technology, and in particular to a Pauli operator string grouping method, a method and apparatus for solving the expectation value of Hamiltonian. Background Technology

[0002] Commutation relations generally refer to the relationship where two operators can be interchanged under certain conditions without changing the result. Commutation relations have important applications in physics and mathematics. In quantum mechanics, microscopic mechanical quantities (such as coordinates, momentum, angular momentum, and energy) are represented using linear Hermitian operators in Hilbert space. Commutation relations are the essence of mechanical quantity operators, the cornerstone of the study and analysis of microscopic physics, and an important component of quantum mechanics courses.

[0003] In practical applications, commutation properties can be used to optimize computational processes and improve computational efficiency. Taking the Variational Quantum Eigensolver (VQE) algorithm as an example, its core process is to optimize the minimum expected value corresponding to the Hamiltonian of a molecular system. The expected value solution consists of two parts: a proposed circuit and the Hamiltonian. For real molecular systems, the Hamiltonian typically contains tens of thousands of terms, requiring the expected value solution algorithm to traverse all terms and measure the proposed circuit sequentially. If a commutation relationship can be found, the Hamiltonian to be solved can be grouped. The computational cost of the grouped expected value solution can be reduced to less than 10%, or even 2%, and the larger the system, the greater the reduction in computational cost. The Hamiltonian can be expanded using a set of Pauli bases, each Pauli base being represented as a string of Pauli operators. Therefore, how to group these Pauli operator strings is key to reducing the computational cost in solving practical problems. Summary of the Invention

[0004] This application provides a Pauli operator string grouping method, a Hamiltonian expectation value solution method and apparatus, which can realize the grouping of Pauli operator strings, thereby reducing the computational load in the Hamiltonian expectation value solution process.

[0005] The first aspect of this application provides a Pauli operator string grouping method, including:

[0006] Obtain multiple Pauli operator strings, each of which consists of multiple Pauli operators and a number for each Pauli operator, wherein the number of the Pauli operator is used to represent the bit sequence number of the action of the Pauli operator;

[0007] Operator features are determined based on the number and / or type of Pauli operators in each Pauli operator string, and index features are determined based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators. The index features are used to characterize the number index of X and Y in each Pauli operator string. The type of Pauli operator includes at least one of the following: X, Y, Z, I.

[0008] Pauli operator strings that have the same operator features and index features are grouped together.

[0009] Optionally, determining the operator characteristics based on the number and / or type of Pauli operators in each Pauli operator string includes:

[0010] A first operator feature is determined based on the number and / or type of Pauli operators in each Pauli operator string, and the first operator feature is used to characterize the Pauli operator string after canceling out some Pauli operators.

[0011] A second operator feature is determined based on the first operator feature, and the second operator feature is used to characterize the Pauli operator string after partially canceling the Pauli operator Z in the first operator feature.

[0012] Optionally, determining the first operator feature based on the number and / or type of Pauli operators in each Pauli operator string includes:

[0013] Determine the sum of the number of X and Y in each of the Pauli operator strings;

[0014] If the sum of the quantities of X and Y is 0, then determine the quantity of Z in each Pauli operator string;

[0015] If the quantity of Z is 0, then return "I" as the first operator feature;

[0016] If the quantity of Z is 1, then return "Z" as the first operator feature;

[0017] If the quantity of Z is 2, then “ZZ” is returned as the first operator feature.

[0018] Optionally, the method further includes:

[0019] If the sum of the quantities of X and Y is 2, then the type of the Pauli operator in each Pauli operator string that is either the start position or the end position is determined to be Z;

[0020] If the Pauli operator type at the starting position is Z, then determine the number of X and Y in each Pauli operator string;

[0021] If the quantity of X is 2, then return "ZXX" as the first operator feature;

[0022] If the quantity of Y is 2, then “ZYY” is returned as the first operator feature.

[0023] Optionally, the method further includes:

[0024] If the Pauli operator type at the termination position is Z, then determine the number of X and Y in each Pauli operator string;

[0025] If the quantity of X is 2, then return "XXZ" as the first operator feature;

[0026] If the quantity of Y is 2, then “YYZ” is returned as the first operator feature.

[0027] Optionally, the method further includes:

[0028] If the Pauli operator type at the start and end positions is not Z, then determine whether the Pauli operator numbers in each Pauli operator string are consecutive.

[0029] If the Pauli operators are numbered consecutively, then the number of X and Y in each Pauli operator string is determined;

[0030] If the quantity of X is 2, then return "XX" as the first operator feature;

[0031] If the quantity of Y is 2, then “YY” is returned as the first operator feature.

[0032] Optionally, the method further includes:

[0033] If the Pauli operators are not consecutively numbered, then determine the number of X and Y in each Pauli operator string;

[0034] If the quantity of X is 2, then return XZX as the first operator feature;

[0035] If the quantity of Y is 2, then YZY is returned as the first operator feature.

[0036] Optionally, the method further includes:

[0037] If the sum of the quantities of X and Y is 4, then the Pauli operator string after removing Z from each Pauli operator string is taken as the first operator feature.

[0038] Optionally, determining the second operator feature based on the first operator feature includes:

[0039] If the first operator feature is any one of "I", "Z", or "ZZ", then return "Z" as the second operator feature;

[0040] If the first operator feature is any one of "XXXX", "YYYY", "XXYY", "YYXX", "XYYX", or "YXXY", then return the first operator feature as the second operator feature;

[0041] If the first operator feature is any one of "XX", "YY", "ZXX", "ZYY", "XZX", "YZY", "XXZ", "YYZ", then return "AA" as the second operator feature, where "AA" represents "XX" or "YY".

[0042] Optionally, the index features include a first index and a second index, and the step of determining the index features based on the Pauli operator number in each Pauli operator string and the operator features includes:

[0043] If the second operator feature is "Z", then set the first and second indicators to 0;

[0044] If the second operator feature is any one of “XXXX”, “YYYY”, “XXYY”, “YYXX”, “XYYX”, and “YXXY”, then the first index and the second index are determined according to the Pauli operator number in the first operator feature.

[0045] If the second operator feature is "AA", then the numbers of the two X or Y in the first operator feature are respectively used as the first index and the second index.

[0046] Optionally, the first operator feature is any one of "XXXX", "YYYY", "XXYY", and "YYXX", and determining the first and second indicators based on the Pauli operator number in the first operator feature includes:

[0047] The average of the sum of the numbers of the two middle Pauli operators of the first operator feature is used as the first index, and the average of the difference between the sum of the numbers of the two Pauli operators on both sides of the first operator feature and the sum of the numbers of the two middle Pauli operators is used as the second index.

[0048] Optionally, the first operator feature is any one of "XYYX" or "YXXY", and the step of determining the first index and the second index based on the Pauli operator number in the first operator feature includes:

[0049] The average of the sum of the numbers of the two Pauli operators preceding the first operator feature is taken as the first index, and the average of the sum of the numbers of the two Pauli operators following the first operator feature is taken as the second index.

[0050] A second aspect of this application provides a method for solving the expectation value of a Hamiltonian, the method comprising:

[0051] Obtain the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string;

[0052] Grouping the plurality of Pauli sub-items according to the method described in the first aspect;

[0053] Obtain the unitary transform and the preset proposed circuit corresponding to each group;

[0054] Construct the target quantum circuit based on the unitary transformation and the proposed circuit;

[0055] The expected value of the Hamiltonian is determined based on the measurement results of the target quantum circuit.

[0056] A third aspect of this application provides a Pauli operator string grouping device, comprising:

[0057] The data acquisition unit is used to acquire multiple Pauli operator strings, each of which consists of multiple Pauli operators and a number for each Pauli operator, wherein the number of the Pauli operator is used to indicate the bit sequence number of the action of the Pauli operator;

[0058] The feature determination unit is configured to determine operator features based on the number and / or type of Pauli operators in each Pauli operator string, and to determine index features based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators. The index features are used to characterize the number index of X and Y in each Pauli operator string. The type of the Pauli operator includes at least one of the following: X, Y, Z, I.

[0059] A Pauli operator string grouping unit is used to group Pauli operator strings that have the same operator features and index features into the same group.

[0060] A fourth aspect of this application provides an apparatus for solving the expectation value of a Hamiltonian, comprising:

[0061] The Hamiltonian acquisition unit is used to acquire the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string;

[0062] A Pauli operator string grouping unit is used to group a plurality of said Pauli sub-items according to the apparatus described in the third aspect;

[0063] The circuit parameter acquisition unit is used to acquire the unitary transform and the preset proposed circuit corresponding to each group;

[0064] A circuit construction unit is used to construct a target quantum circuit based on the unitary transform and the proposed circuit.

[0065] The expected value determination unit is used to determine the expected value of the Hamiltonian based on the measurement results of the target quantum circuit.

[0066] A fifth aspect of this application provides an electronic device, including: a processor and a memory;

[0067] The processor is connected to a memory, wherein the memory is used to store computer programs and the processor is used to invoke the computer programs to execute the methods as described in the first or second aspect of the embodiments of this application.

[0068] A sixth aspect of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform the methods described in the first or second aspect of this application.

[0069] In this embodiment, operator characteristics are determined based on the number and / or type of Pauli operators in each Pauli operator string, so that some Pauli operators in the Pauli operator string can cancel each other out. Then, index characteristics are determined based on the number and operator characteristics of the Pauli operators in each Pauli operator string. The index characteristics are used to represent the number index of the operator, that is, the number of the qubit that confirms its effect. Only when the operator characteristics and index characteristics are the same can it be confirmed that they satisfy the general commutation relation, and then they are grouped together, thereby realizing the grouping of Pauli operator strings according to the general commutation relation.

[0070] Furthermore, Pauli operator strings that satisfy the general commutation relation can be transformed into qubit-by-qubit commutation via unitary transformation. The qubit-by-qubit commuting Pauli operator strings can be uniformly measured, so that the expected value of the set can be obtained by only one measurement, thereby reducing the computational load in the process of solving the expected value of Hamiltonian. Attached Figure Description

[0071] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0072] Figure 1 An example system block diagram is shown for a Pauli operator string grouping method or a Hamiltonian expectation value solving method provided in one embodiment of this application;

[0073] Figure 2A flowchart illustrating a Pauli operator string grouping method provided in one embodiment of this application is shown.

[0074] Figure 3 A flowchart illustrating a method for solving the expectation value of Hamiltonian according to an embodiment of this application is shown.

[0075] Figure 4 This paper shows a schematic diagram of the structure of a Pauli operator string grouping device according to an embodiment of the present application;

[0076] Figure 5 This paper shows a schematic diagram of the structure of a Hamiltonian expectation solving device provided in one embodiment of the present application;

[0077] Figure 6 A schematic diagram of the structure of a computer device provided in one embodiment of this application is shown. Detailed Implementation

[0078] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0079] Classical computers use transistors to encode information in binary data, such as bits, where each bit can represent a value of 1 or 0. These 1s and 0s act as switches to drive the functions of a classical computer. If there are n bits of data, there are 2^n possible classical states, and one state is represented at a time.

[0080] Quantum computers use quantum processors that operate on data represented by qubits, also known as quantum bits. A single qubit can represent the classical binary states "0" or "1", or a superposition of "0" and "1". Because it can represent a superposition of "0" and "1", a qubit can represent both "0" and "1" states simultaneously. For example, if there are n bits of data, then 2^n qubits can represent n bits of data. n A quantum state can be represented simultaneously. Furthermore, qubits in a superposition can be correlated with each other, a phenomenon known as entanglement, where the state of one qubit (whether 1, 0, or both) depends on the state of another qubit, and more information can be encoded within two entangled qubits. Based on the principles of superposition and entanglement, qubits enable quantum computers to perform functions that might be relatively complex and time-consuming for classical computers.

[0081] Please refer to Figure 1This illustrates an example system block diagram of a Pauli operator string grouping method or a Hamiltonian expectation calculation method provided in one embodiment of this application. System 100 may be a hybrid computing system comprising a combination of one or more quantum computers, quantum systems, and / or classical computers. Figure 1 In the example shown, system 100 may include a quantum system 110 and a classical computer 120. In one implementation, the quantum system 110 and the classical computer 120 may be configured to communicate via one or more wired and / or wireless connections (e.g., wireless networks). The quantum system 110 may include a quantum chipset consisting of one or more quantum chips, comprising various hardware components for processing data encoded in qubits. The quantum chipset may be a quantum computing core surrounded by infrastructure to protect the quantum chips from electromagnetic noise sources, mechanical vibration sources, heat sources, and other noise sources that can degrade the performance of the quantum chips. The classical computer 120 may be electronically integrated with the quantum system 110 via any suitable wired and / or wireless electronic connection.

[0082] exist Figure 1 In the example shown, quantum system 110 can be any suitable set of components capable of performing quantum operations on a physical system. Quantum operations, such as quantum gate operations, manipulate the quantum states of qubits to evolve and / or become entangled. Figure 1 In the illustrated example embodiment, the quantum system 110 may include a measurement and control unit 111, an interface 112, and a quantum chip 113. In some embodiments, all or part of each of the measurement and control unit 111, interface 112, and quantum chip 113 may be located in a cryogenic environment to facilitate the performance of quantum operations. The quantum chip 113 may be any hardware capable of processing information using quantum states. This hardware may include multiple qubits and means for coupling or entanglement of the qubits to process information using quantum states. Qubits may include, but are not limited to, charge qubits, flux qubits, phase qubits, spin qubits, and ion qubits. The quantum chip may include a set of quantum logic gates configured to perform quantum logic operations on the qubits stored in a quantum register. The quantum gates may include one or more single-qubit gates, two-qubit gates, and / or other multi-qubit gates.

[0083] The measurement and control unit 111 can be any combination of digital computing devices capable of performing quantum computing (e.g., executing quantum circuits) in conjunction with interface 112. This digital computing device may include a digital processor and memory for storing and executing quantum instructions using interface 112. The digital computing device may also include a communication protocol device for receiving instructions and sending the results of the performed quantum computing to a classical computer. Additionally, the digital computing device may include a communication interface having interface 112. In one embodiment, the measurement and control unit 111 may be configured to receive classical instructions (e.g., from classical computer 120) and convert these classical instructions into measurement and control instructions for interface 112. The measurement and control instructions provided by the measurement and control unit 111 to interface 112 may be, for example, digital signals indicating which quantum gates in a quantum gate array need to be applied to the qubits to perform a specific function. Interface 112 may be configured to convert these digital signals into analog signals (e.g., analog pulses of microwave pulses), which can be used to apply quantum gates to the qubits to manipulate the interactions between the qubits.

[0084] Interface 112 may be a classical-quantum interface, comprising a combination of devices capable of receiving instructions from the integrated measurement and control unit 111 and converting those instructions into a means for implementing quantum operations. In one embodiment, interface 112 may convert instructions from the integrated measurement and control unit 111 into drive signals capable of driving or manipulating qubits, and / or applying quantum gates to qubits. Additionally, interface 112 may be configured to convert signals received from the quantum chip 113 into digital signals capable of being processed and transmitted by the integrated measurement and control unit 111. Devices included in interface 112 may include, but are not limited to, digital-to-analog converters, analog-to-digital converters, waveform generators, attenuators, amplifiers, optical fibers, lasers, and filters. Interface 112 may further include circuitry configured to measure multiple qubits after the application of quantum gates, wherein the measurements may produce results represented in classical bits. Each measurement performed by interface 112 may be read out to a device connected to the quantum system 110, such as a classical computer 120. The multiple measurement results provided by interface 112 may represent probabilistic results.

[0085] The classical computer 120 can include hardware components such as a processor and storage devices (e.g., including memory devices and classical registers) for processing data encoded in classical bits. In one embodiment, the classical computer 120 can be configured to provide the quantum system 110 with various control signals, instructions, and data encoded in classical bits. Further, quantum states measured by the quantum system 110 can be read out by the classical computer 120, and the classical computer 120 can store the measured quantum states as classical bits in classical registers. In one embodiment, the classical computer 120 can be any suitable combination of computer-executable hardware and / or computer-executable software capable of executing the preparation module 121 to perform quantum computation using data stored in the data storage module 122 as part of the construction and computation. The data storage module 122 can be a repository for data to be analyzed using quantum computing algorithms and the results of that analysis. The preparation module 121 can be a program or module capable of preparing classical data from the data storage module 122 as part of a quantum circuit implementation. Preparation module 121 can be instantiated as part of a larger algorithm, such as an application programming interface (API) function call, or by resolving hybrid classical-quantum computing into aspects of quantum and classical computing. For example, preparation module 121 can generate instructions for creating quantum circuits using quantum gates. In an embodiment, such instructions can be stored by the measurement and control unit 111 and can be instantiated by components of interface 112 to execute, enabling quantum operations of quantum gates to be performed on quantum chip 113.

[0086] The classic computer 120 may be a laptop computer, desktop computer, vehicle-integrated computer, smart mobile device, tablet device, and / or any other suitable classic computing device. Additionally or alternatively, the classic computer 120 may also operate as part of a cloud computing service model, such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS). The classic computer 120 may also reside in a cloud computing deployment model, such as a private cloud, community cloud, public cloud, or hybrid cloud.

[0087] Please refer to Figure 2 This document illustrates a flowchart of a Pauli operator string grouping method according to an embodiment of this application. This method can be applied to computer devices, which refer to electronic devices capable of data computation and processing. The method may include the following steps:

[0088] Step 201: Obtain multiple Pauli operator strings, each of which consists of multiple Pauli operators and the number of each Pauli operator. The number of the Pauli operator is used to represent the bit sequence number of the action of the Pauli operator.

[0089] Step 202: Determine operator features based on the number and / or type of Pauli operators in each Pauli operator string, and determine index features based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators in the Pauli operator string. The index features are used to characterize the number index of X and Y in each Pauli operator string. The type of Pauli operator includes at least one of the following: X, Y, Z, I;

[0090] Step 203: Divide the Pauli operator strings that have the same operator features and index features into the same group.

[0091] Pauli operators are a set of matrices in quantum mechanics used to describe the properties of spin systems. There are four types of Pauli operators: X, Y, Z, and I, representing Pauli-X, Pauli-Y, Pauli-Z, and the identity operator, respectively. For example, the Pauli operator string "Y0 Z1 Y2 X3 Z4 X5" contains six Pauli operators: two X, two Y, and two Z. The corresponding numbers indicate the bit number to which the Pauli operator acts; for example, Y0 indicates that the Pauli operator Y acts on the 0th qubit, and Z1 indicates that the Pauli operator Z acts on the 1st qubit.

[0092] As can be seen, in this embodiment, the operator characteristics are determined based on the number and / or type of Pauli operators in each Pauli operator string, so that some Pauli operators in the Pauli operator string can cancel each other out; then, the index characteristics are determined based on the number and operator characteristics of the Pauli operators in each Pauli operator string. The index characteristics are used to represent the number index of the operator, that is, the number of the qubit that confirms its effect; only when the operator characteristics and index characteristics are the same can it be confirmed that they satisfy the general commutation relation, and then they are grouped together, thereby realizing the grouping of Pauli operator strings according to the general commutation relation.

[0093] In one embodiment provided in this application, determining the operator characteristics based on the number and / or type of Pauli operators in each Pauli operator string includes:

[0094] A first operator feature is determined based on the number and / or type of Pauli operators in each Pauli operator string, and the first operator feature is used to characterize the Pauli operator string after canceling out some Pauli operators.

[0095] A second operator feature is determined based on the first operator feature, and the second operator feature is used to characterize the Pauli operator string after partially canceling the Pauli operator Z in the first operator feature.

[0096] It should be noted that, after obtaining the first operator feature, the groups can be directly formed based on the first operator feature and the index feature, or the first operator feature can be further merged to obtain the second operator feature, and then the groups can be formed based on the second operator feature and the index feature.

[0097] For example, for Pauli operator strings "I0 I1 I2 I3 I4 I5", "I0 I1I2 I3 Z4 I5", and "I0 I1 I2 I3 I4 Z5" that contain only Z and I and do not contain X and Y, if the method described in the following embodiment is followed, the first operator feature of "I0 I1 I2I3 I4 I5" can be "I", and the first operator feature of "I0 I1 I2 I3 Z4 I5" and "I0I1 I2 I3 I4 Z5" can be "Z", with both their first and second indices being "0,0". If classification is performed directly based on the first operator feature and the index feature, they can be divided into two groups; if the first operator features "I" and "Z" are further merged, their second operator features are all "Z", and since the first and second indices of the three are the same, they can be divided into one group.

[0098] As can be seen, the embodiments of this application can further reduce the number of groups compared to directly grouping based on the first operator feature and the index feature.

[0099] In one embodiment provided in this application, determining the first operator feature based on the number and / or type of Pauli operators in each Pauli operator string includes:

[0100] Determine the sum of the number of X and Y in each of the Pauli operator strings;

[0101] If the sum of the quantities of X and Y is 0, then determine the quantity of Z in each Pauli operator string;

[0102] If the quantity of Z is 0, then return "I" as the first operator feature;

[0103] If the quantity of Z is 1, then return "Z" as the first operator feature;

[0104] If the quantity of Z is 2, then “ZZ” is returned as the first operator feature.

[0105] For example, for a Pauli operator string that contains only Z and I and does not contain X and Y, the first operator feature is determined based on the number of Z and I. If all Z are I, then "I" is returned as the first operator feature; if there is only one Z, then "Z" is returned as the first operator feature; if there are only two Z, then "ZZ" is returned as the first operator feature. For example, for the Pauli operator string "I0 I1 I2 I3 I4 Z5", "Z" is returned as the first operator feature.

[0106] In one embodiment provided in this application, the method further includes:

[0107] If the sum of the quantities of X and Y is 2, then the type of the Pauli operator in each Pauli operator string that is either the start position or the end position is determined to be Z;

[0108] If the Pauli operator type at the starting position is Z, then determine the number of X and Y in each Pauli operator string;

[0109] If the quantity of X is 2, then return "ZXX" as the first operator feature;

[0110] If the quantity of Y is 2, then “ZYY” is returned as the first operator feature.

[0111] Furthermore, the method also includes:

[0112] If the Pauli operator type at the termination position is Z, then determine the number of X and Y in each Pauli operator string;

[0113] If the quantity of X is 2, then return "XXZ" as the first operator feature;

[0114] If the quantity of Y is 2, then “YYZ” is returned as the first operator feature.

[0115] Furthermore, the method also includes:

[0116] If the Pauli operator type at the start and end positions is not Z, then determine whether the Pauli operator numbers in each Pauli operator string are consecutive.

[0117] If the Pauli operators are numbered consecutively, then the number of X and Y in each Pauli operator string is determined;

[0118] If the quantity of X is 2, then return "XX" as the first operator feature;

[0119] If the quantity of Y is 2, then “YY” is returned as the first operator feature.

[0120] Furthermore, the method also includes:

[0121] If the Pauli operators are not consecutively numbered, then determine the number of X and Y in each Pauli operator string;

[0122] If the quantity of X is 2, then return XZX as the first operator feature;

[0123] If the quantity of Y is 2, then YZY is returned as the first operator feature.

[0124] For example, for the Pauli operator string "Z1 X2 Z3 X5", "ZXX" is returned as the first operator feature; for the Pauli operator string "X1 Z2 X3 Z5", "XXZ" is returned as the first operator feature; for the Pauli operator string "X1 Z2 Z3X4", "XX" is returned as the first operator feature; and for the Pauli operator string "X1 Z2 Z3 X5", "XZX" is returned as the first operator feature.

[0125] In one embodiment provided in this application, the method further includes:

[0126] If the sum of the quantities of X and Y is 4, then the Pauli operator string after removing Z from each Pauli operator string is taken as the first operator feature.

[0127] For example, for the Pauli operator strings “Y0 Y1 X4 X5” and “Y0 Z1 Y2 X3 Z4 X5”, both return “YYXX” as the first operator feature.

[0128] In one embodiment provided in this application, determining the second operator feature based on the first operator feature includes:

[0129] If the first operator feature is any one of "I", "Z", or "ZZ", then return "Z" as the second operator feature;

[0130] If the first operator feature is any one of "XXXX", "YYYY", "XXYY", "YYXX", "XYYX", or "YXXY", then return the first operator feature as the second operator feature;

[0131] If the first operator feature is any one of "XX", "YY", "ZXX", "ZYY", "XZX", "YZY", "XXZ", "YYZ", then return "AA" as the second operator feature, where "AA" represents "XX" or "YY".

[0132] In this embodiment, operators containing only "Z" or "I" are further merged, and two-body operators containing "Z" are merged to obtain a second operator feature. Compared with grouping directly based on the first operator feature, this embodiment can further reduce the number of operators by grouping based on the second operator feature.

[0133] In one embodiment provided in this application, the index feature includes a first index and a second index, and the step of determining the index feature based on the number of the Pauli operator in each Pauli operator string and the operator feature includes:

[0134] If the second operator feature is "Z", then set the first and second indicators to 0;

[0135] If the second operator feature is any one of “XXXX”, “YYYY”, “XXYY”, “YYXX”, “XYYX”, and “YXXY”, then the first index and the second index are determined according to the Pauli operator number in the first operator feature.

[0136] If the second operator feature is "AA", then the numbers of the two X or Y in the first operator feature are respectively used as the first index and the second index.

[0137] For example, for the Pauli operator string "I0 I1 I2 I3 I4 Z5", "Z" is returned as the first operator feature and the second operator feature, and "0,0" is returned as the first index and the second index; for the Pauli operator string "Z1 X2 Z3 X5", "ZXX" is returned as the first operator feature, "AA" is returned as the second operator feature, and "2,3" is returned as the first index and the second index.

[0138] Specifically, the first operator feature is any one of "XXXX", "YYYY", "XXYY", and "YYXX", and the step of determining the first index and the second index based on the Pauli operator number in the first operator feature includes:

[0139] The average of the sum of the numbers of the two middle Pauli operators of the first operator feature is used as the first index, and the average of the difference between the sum of the numbers of the two Pauli operators on both sides of the first operator feature and the sum of the numbers of the two middle Pauli operators is used as the second index.

[0140] Specifically, the first operator feature is any one of "XYYX" or "YXXY", and the step of determining the first index and the second index based on the Pauli operator number in the first operator feature includes:

[0141] The average of the sum of the numbers of the two Pauli operators preceding the first operator feature is taken as the first index, and the average of the sum of the numbers of the two Pauli operators following the first operator feature is taken as the second index.

[0142] For example, for the Pauli operator string "Y0 Z1 Y2 X3 Z4 X5", the returned value is "YYXX" as the first and second operator features. The middle Y is numbered 2, the X is numbered 3, and the sum of the numbers of the two middle Pauli operators is 5. The numbers of the Ys on both sides are 0, the Xs are numbered 5, and the sum of the numbers of the two numbers on both sides is also 5. The first indicator is the average of the sum of the numbers of the two middle Pauli operators, which is 2.5. If 0.5 is represented by p, then it is 2p. The second indicator is the average of the differences between the sum of the numbers of the two numbers on both sides and the sum of the numbers of the two middle Pauli operators, which is 0. Therefore, "2p, 0" is returned as the first and second indicators.

[0143] Please refer to Figure 3 This illustration shows a flowchart of a method for solving the expectation value of the Hamiltonian according to an embodiment of this application. This method can be applied to computer devices, which refer to electronic devices with data calculation and processing capabilities. The method may include the following steps:

[0144] Step 301: Obtain the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string;

[0145] Step 302: Group the multiple Pauli sub-items according to the Pauli operator string grouping method described above;

[0146] Step 303: Obtain the unitary transform and the preset proposed circuit corresponding to each group;

[0147] Step 304: Construct the target quantum circuit based on the unitary transform and the proposed circuit;

[0148] Step 305: Determine the expected value of the Hamiltonian based on the measurement results of the target quantum circuit.

[0149] If the Hamiltonian to be solved is in fermionic form, it can be transformed into Pauli operator form using the Jordan-Wigner transformation. Under the Jordan-Wigner transformation, a raising or lowering operator produces only one X or Y operator, and a Hamiltonian produces at most four annihilation operators, thus a maximum of four X or Y operators. Therefore, the total number of X and Y operators is less than or equal to four.

[0150] Among them, the variational quantum algorithm is a quantum-classical hybrid variational method that, through optimization, gradually adjusts the parameter θ of the variational wavefunction to obtain the ground state energy E of the system. g :

[0151] E g =<ψ trial (θ)|H|ψ trial(θ)>,

[0152] E g The matrix corresponding to the system's Hamiltonian H is given by the variational wave function ψ. trial The expected value on (θ). Variational wave function ψ trial (θ) Constructing a circuit by design:

[0153] |ψ trial (θ)>=U(θ)|00···00>.

[0154] For example, for any system, its Hamiltonian can be written out. By performing a second quantization on the Hamiltonian, it can be expanded using multiple Pauli subterms (tensor products of Pauli operators) as a basis. For instance, the expanded Hamiltonian can take the form:

[0155] H = ∑ k w k P k ,

[0156] Where H is the Hamiltonian, It is a combination of the tensor products of four Pauli matrices, i.e., the Pauli observables in the embodiments of this application, where n is the number of qubits included in the original quantum circuit, and w k The weights for each basis.

[0157] To better illustrate this method, we will use the following 6-bit Hamiltonian as an example.

[0158] k = 4, P = {

[0159] "X1 Z2 Z3 X5":1.0,

[0160] "Y1 Z2 Z3 Y5":1.0,

[0161] "Y0 Y1 X4 X5":1.0,

[0162] "Y0 Z1 Y2 X3 Z4 X5":1.0

[0163] }

[0164] The first operator features, second operator features, and index features corresponding to the four Pauli sub-items are shown in Table 1.

[0165] Table 1. Comparison of Pauli sub-terms, first operator characteristics, second operator characteristics, and index characteristics.

[0166] X1 Z2 Z3 X5 XZX AA,1,5 Y1 Z2 Z3 Y5 YZY AA,1,5 Y0 Y1 X4 X5 YYXX YYXX,2p,0 Y0 Z1 Y2 X3 Z4 X5 YYXX YYXX,2p,0

[0167] Based on the characteristics of the second operator and the index, the four Pauli sub-items can be divided into two groups:

[0168] H1 = {

[0169] "X1 Z2 Z3 X5":1.000000,

[0170] "Y1 Z2 Z3 Y5":-1.000000

[0171] }

[0172] H2={

[0173] "Y0 Y1 X4 X5":1.000000,

[0174] "Y0 Z1 Y2 X3 Z4 X5":1.000000

[0175] }

[0176] After grouping, sets T and Q can be determined using the symplectic Gram-Schmidt orthogonalization method. The unitary matrix corresponding to each group can then be obtained based on the commutation or anticommutation relationship between T and Q.

[0177]

[0178] V j The corresponding circuit is as follows:

[0179]

[0180] Where, set T = {τ1, ..., τ} N}, Q={σ1,···,σ N}

[0181] Finally, the above form can be transformed into a quantum gate through Trotter decomposition.

[0182] For H1, sets T and Q, as well as the transformed Hamiltonian, need to be calculated, and the results are as follows:

[0183]

[0184] As can be seen, the embodiments of this application provide a method for solving the expectation value of Hamiltonians. This method involves grouping the Hamiltonians to be solved into groups, constructing the target quantum circuit based on the unitary transformation corresponding to each group and a preset proposed circuit, and finally determining the expectation value of the Hamiltonians based on the measurement results of the target quantum circuit. By transforming Pauli operator strings that satisfy general commutation relations into qubit-by-qubit commutation through a unitary transformation, the qubit-by-qubit commuting Pauli operator strings can be uniformly measured, thus enabling the expectation value of the group to be obtained through only one measurement, thereby reducing the computational load in the process of solving the expectation value of Hamiltonians.

[0185] Figure 4 A schematic diagram of the structure of a Pauli operator string grouping device provided in one embodiment of this application is shown.

[0186] The device includes:

[0187] The data acquisition unit 401 is used to acquire multiple Pauli operator strings, each of which consists of multiple Pauli operators and a number for each Pauli operator. The number of the Pauli operator is used to indicate the bit sequence number of the action of the Pauli operator.

[0188] The feature determination unit 402 is configured to determine operator features based on the number and / or type of Pauli operators in each Pauli operator string, and to determine index features based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators in the Pauli operator string, and the index features are used to characterize the number index of X and Y in each Pauli operator string. The type of the Pauli operator includes at least one of the following: X, Y, Z, I.

[0189] Pauli operator string grouping unit 403 is used to group Pauli operator strings that have the same operator features and index features into the same group.

[0190] Figure 5 A schematic diagram of a Hamiltonian expectation solving device according to an embodiment of this application is shown. The device includes:

[0191] Hamiltonian acquisition unit 501 is used to acquire the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string;

[0192] Pauli operator string grouping unit 502 is used to group a plurality of said Pauli sub-items by the apparatus according to claim 14;

[0193] The circuit parameter acquisition unit 503 is used to acquire the unitary transformation and the preset proposed circuit corresponding to each group;

[0194] Circuit construction unit 504 is used to construct a target quantum circuit based on the unitary transform and the proposed circuit.

[0195] The expected value determination unit 505 is used to determine the expected value of the Hamiltonian based on the measurement results of the target quantum circuit.

[0196] Figure 6 The diagram illustrates the structure of a computer device provided in one embodiment of this application, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the functions of the computer system of the Pauli operator string grouping method or the Hamiltonian expectation value solving method in any of the above embodiments.

[0197] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, causes the computer to perform the functions of the computer system of the Pauli operator string grouping method or the Hamiltonian expectation value solving method in any of the above embodiments.

[0198] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the functions of the computer system of the Pauli operator string grouping method or the Hamiltonian expectation value solving method in any of the above embodiments.

[0199] It is understood that the specific examples in this application are only intended to help those skilled in the art better understand the implementation methods of this application, and are not intended to limit the scope of the invention.

[0200] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this application in any way.

[0201] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and the implementation methods in this application are not limited in this respect.

[0202] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0203] It is understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0204] It is understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0205] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0206] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0207] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0208] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0209] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0210] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0211] The above are merely specific embodiments of this application, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A Pauli operator string grouping method, characterized in that, include: Obtain multiple Pauli operator strings, each of which consists of multiple Pauli operators and a number for each Pauli operator, wherein the number of the Pauli operator is used to represent the bit sequence number of the action of the Pauli operator; Operator features are determined based on the number and / or type of Pauli operators in each Pauli operator string, and index features are determined based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators. The index features are used to characterize the number index of X and Y in each Pauli operator string. The type of Pauli operator includes at least one of the following: X, Y, Z, I. Pauli operator strings that have the same operator features and index features are grouped together.

2. The method according to claim 1, characterized in that, The step of determining operator features based on the number and / or type of Pauli operators in each Pauli operator string includes: A first operator feature is determined based on the number and / or type of Pauli operators in each Pauli operator string, and the first operator feature is used to characterize the Pauli operator string after canceling out some Pauli operators. A second operator feature is determined based on the first operator feature, and the second operator feature is used to characterize the Pauli operator string after partially canceling the Pauli operator Z in the first operator feature.

3. The method according to claim 2, characterized in that, Determining the first operator feature based on the number and / or type of Pauli operators in each Pauli operator string includes: Determine the sum of the number of X and Y in each of the Pauli operator strings; If the sum of the quantities of X and Y is 0, then determine the quantity of Z in each Pauli operator string; If the quantity of Z is 0, then return "I" as the first operator feature; If the quantity of Z is 1, then return "Z" as the first operator feature; If the quantity of Z is 2, then "ZZ" is returned as the first operator feature.

4. The method according to claim 3, characterized in that, The method further includes: If the sum of the quantities of X and Y is 2, then the type of the Pauli operator in each Pauli operator string that is either the start position or the end position is determined to be Z; If the Pauli operator type at the starting position is Z, then determine the number of X and Y in each Pauli operator string; If the quantity of X is 2, then return "ZXX" as the first operator feature; If the quantity of Y is 2, then "ZYY" is returned as the first operator feature.

5. The method according to claim 4, characterized in that, The method further includes: If the Pauli operator type at the termination position is Z, then determine the number of X and Y in each Pauli operator string; If the quantity of X is 2, then return "XXZ" as the first operator feature; If the quantity of Y is 2, then "YYZ" is returned as the first operator feature.

6. The method according to claim 5, characterized in that, The method further includes: If the Pauli operator type at the start and end positions is not Z, then determine whether the Pauli operator numbers in each Pauli operator string are consecutive. If the Pauli operators are numbered consecutively, then the number of X and Y in each Pauli operator string is determined; If the quantity of X is 2, then return "XX" as the first operator feature; If the quantity of Y is 2, then "YY" is returned as the first operator feature.

7. The method according to claim 6, characterized in that, The method further includes: If the Pauli operators are not consecutively numbered, then determine the number of X and Y in each Pauli operator string; If the quantity of X is 2, then return XZX as the first operator feature; If the quantity of Y is 2, then YZY is returned as the first operator feature.

8. The method according to claim 7, characterized in that, The method further includes: If the sum of the quantities of X and Y is 4, then the Pauli operator string after removing Z from each Pauli operator string is taken as the first operator feature.

9. The method according to claim 8, characterized in that, Determining the second operator feature based on the first operator feature includes: If the first operator feature is any one of "I", "Z", or "ZZ", then return "Z" as the second operator feature; If the first operator feature is any one of "XXXX", "YYYY", "XXYY", "YYXX", "XYYX", or "YXXY", then the first operator feature is returned as the second operator feature; If the first operator feature is any one of "XX", "YY", "ZXX", "ZYY", "XZX", "YZY", "XXZ", and "YYZ", then "AA" is returned as the second operator feature, where "AA" represents "XX" or "YY".

10. The method according to claim 9, characterized in that, The index features include a first index and a second index. Determining the index features based on the Pauli operator number in each Pauli operator string and the operator features includes: If the second operator feature is "Z", then set the first and second indicators to 0; If the second operator feature is any one of "XXXX", "YYYY", "XXYY", "YYXX", "XYYX", or "YXXY", then the first index and the second index are determined according to the Pauli operator number in the first operator feature. If the second operator feature is "AA", then the numbers of the two X or Y in the first operator feature are respectively used as the first index and the second index.

11. The method according to claim 10, characterized in that, The first operator feature is any one of "XXXX", "YYYY", "XXYY", and "YYXX". The step of determining the first and second indicators based on the Pauli operator number in the first operator feature includes: The average of the sum of the numbers of the two middle Pauli operators of the first operator feature is used as the first index, and the average of the difference between the sum of the numbers of the two Pauli operators on both sides of the first operator feature and the sum of the numbers of the two middle Pauli operators is used as the second index.

12. The method according to claim 10, characterized in that, The first operator feature is either "XYYX" or "YXXY", and the step of determining the first index and the second index based on the Pauli operator number in the first operator feature includes: The average of the sum of the numbers of the two Pauli operators preceding the first operator feature is taken as the first index, and the average of the sum of the numbers of the two Pauli operators following the first operator feature is taken as the second index.

13. A method for solving the expectation value of a Hamiltonian, characterized in that, include: Obtain the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string; The method according to any one of claims 1-12 groupes the plurality of said Pauli sub-items; Obtain the unitary transform and the preset proposed circuit corresponding to each group; Construct the target quantum circuit based on the unitary transformation and the proposed circuit; The expected value of the Hamiltonian is determined based on the measurement results of the target quantum circuit.

14. A Pauli operator string grouping device, characterized in that, include: The data acquisition unit is used to acquire multiple Pauli operator strings, each of which consists of multiple Pauli operators and a number for each Pauli operator, wherein the number of the Pauli operator is used to indicate the bit sequence number of the action of the Pauli operator; The feature determination unit is configured to determine operator features based on the number and / or type of Pauli operators in each Pauli operator string, and to determine index features based on the number of Pauli operators in each Pauli operator string and the operator features. The operator features are used to characterize the Pauli operator string after canceling out some Pauli operators. The index features are used to characterize the number index of X and Y in each Pauli operator string. The type of the Pauli operator includes at least one of the following: X, Y, Z, I. A Pauli operator string grouping unit is used to group Pauli operator strings that have the same operator features and index features into the same group.

15. A device for solving the expectation value of a Hamiltonian, characterized in that, include: The Hamiltonian acquisition unit is used to acquire the Hamiltonian to be solved, wherein the Hamiltonian includes multiple Pauli sub-items, and each Pauli sub-item corresponds to a Pauli operator string; A Pauli operator string grouping unit is used to group a plurality of said Pauli sub-items by the apparatus according to claim 14; The circuit parameter acquisition unit is used to acquire the unitary transform and the preset proposed circuit corresponding to each group; A circuit construction unit is used to construct a target quantum circuit based on the unitary transform and the proposed circuit. The expected value determination unit is used to determine the expected value of the Hamiltonian based on the measurement results of the target quantum circuit.

16. An electronic device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to perform the method as described in any one of claims 1-12 or 13.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, perform the method as described in any one of claims 1-12 or 13.