A quantized data processing method and device

By segmenting the linear differential equations into differential equations, using quantum circuits and Hamiltonian ground state solutions, the high computational complexity problem of high-dimensional differential equations is solved, and efficient solution of low qubit resources is achieved.

CN114936646BActive Publication Date: 2025-09-02TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210646841.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-09-02
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

In the prior art, when solving high-dimensional linear differential equation systems, classical computer computing resources consume too much and are difficult to effectively solve, and the existing quantum computing solutions increase the demand for quantum bit resources as the solution accuracy and time increase.

Method used

The intervals of differential equations are segmented into differential equations, and the quantum circuit is solved by quantum circuits and Hamiltonian ground states, and quantum superposition and entanglement characteristics are used to design quantum circuit optimization parameters and iteratively solve differential equation systems.

Benefits of technology

It significantly reduces the computational complexity, reduces the demand for qubit resources, and maintains high precision and long-term solution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936646B_ABST
    Figure CN114936646B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a quantized data processing method and apparatus, the method comprising: dividing a time interval for solving a differential equation into a preset number of segments, and approximating the differential equation as a first difference equation based on the segments; superimposing a constant vector of the differential equation and a function vector to be solved to obtain a first function vector, and determining a second difference equation equivalent to the first difference equation based on the first function vector; setting a quantum circuit for a first segment of the preset number of segments based on the second difference equation; determining a value of the first function vector at the initial time of the first segment based on the value of the function vector to be solved at the initial time of the first segment, and preparing a first quantum state based on the value of the first function vector at the initial time of the first segment; inputting the first quantum state into the quantum circuit, and obtaining the value of the function vector to be solved at the end time of the first segment through the quantum circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing, and in particular to a quantized data processing method and device. Background Art

[0002] Linear differential equations play a crucial role in natural science and engineering. The evolution of many typical physical systems obeys laws expressed by these equations. For example, calculating nuclear fusion energy, simulating fluid dynamics, and simulating the evolution of quantum systems can all be accomplished by solving these equations. However, when the dimensionality of the system state is large, solving these linear differential equations using classical computers is often difficult. Summary of the Invention

[0003] Embodiments of the present invention provide a quantized data processing method and device. Compared with the differential equation solving method based on classical computers, this method can significantly reduce the computational complexity in solving differential equations, thereby greatly reducing the computing resources consumed in the differential equation solving process.

[0004] In a first aspect, an embodiment of the present invention provides a quantized data processing method, the method comprising:

[0005] Dividing a time interval for solving a differential equation into a preset number of segments, and approximating the differential equation into a first difference equation based on the segments;

[0006] superimposing the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determining a second differential equation equivalent to the first differential equation based on the first function vector;

[0007] For a first segment of the preset number of segments, setting a quantum circuit according to a second difference equation;

[0008] Determining a value of a first function vector at the initial time of the first segment according to the value of the to-be-solved function vector at the initial time of the first segment, and preparing a first quantum state based on the value of the first function vector at the initial time of the first segment;

[0009] The first quantum state is input into the quantum circuit, and the value of the function vector to be solved at the end time of the first segment is obtained through the quantum circuit.

[0010] Preferably, the differential equation and the value of the function vector to be solved at the initial time of the first segment can be expressed as:

[0011]

[0012]

[0013] Among them, t is the segment number, is the function vector to be solved, A is the coefficient matrix, is a constant vector, is the value of the function vector to be solved at the initial time of the first segment;

[0014] The first function vector can be expressed as:

[0015]

[0016] in, is the first function vector.

[0017] Preferably, according to the second set of difference equations, setting up a set of equations to solve a quantum circuit comprises:

[0018] Determining a corresponding Hamiltonian according to the second set of difference equations;

[0019] A quantum circuit is set up to determine the ground state of the Hamiltonian.

[0020] Preferably, the first set of difference equations is expressed as,

[0021]

[0022] The solution interval [0, T] of the differential equation is divided into T / Δt small intervals of length Δt, I N is an N×N dimensional identity matrix;

[0023] The second set of difference equations is expressed as,

[0024]

[0025] in,() -1 is the inverse of the matrix, M is

[0026] The Hamiltonian is expressed as:

[0027]

[0028] in, is the conjugate transpose, express The normalized state vector, I 2N is a 2N×2N dimensional identity matrix.

[0029] Preferably, determining the ground state of the Hamiltonian comprises:

[0030] The expected value of the Hamiltonian is minimized, and the ground state of the Hamiltonian is determined according to the minimized expected value.

[0031] Preferably, the quantum circuit includes at least a first sub-circuit:

[0032] By minimizing the expected value of the Hamiltonian, including:

[0033] Based on the pre-optimized first sub-circuit, the expected value of the Hamiltonian is minimized.

[0034] Preferably, the pre-optimization of the first sub-circuit includes optimization of line parameters of the first sub-circuit, and the optimization of the line parameters is performed based on a classical computer.

[0035] Preferably, the expected value of the Hamiltonian is expressed as:

[0036]

[0037] in, is the expected value of the Hamiltonian, This is the first sub-line.

[0038] In a second aspect, a quantized data processing device is provided, the device comprising:

[0039] a first differential equation group obtaining unit configured to divide a time interval for solving the differential equation into a preset number of segments, and approximate the differential equation to a first differential equation based on the segments;

[0040] a second differential equation determining unit configured to superimpose the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determine a second differential equation equivalent to the first differential equation based on the first function vector;

[0041] a quantum circuit setting unit configured to set up a quantum circuit for a first segment of the preset number of segments according to a second difference equation;

[0042] a first quantum state preparation unit configured to determine a value of a first function vector at an initial time of the first segment according to a value of the to-be-solved function vector at an initial time of the first segment, and prepare a first quantum state based on the value of the first function vector at the initial time of the first segment;

[0043] The equation solution determination unit is configured to input the first quantum state into the quantum circuit and obtain the value of the function vector to be solved at the end time of the first segment through the quantum circuit.

[0044] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1 A flowchart of a quantized data processing method provided by an embodiment of the present invention;

[0047] Figure 2 The measurement provided by the embodiment of the present invention Quantum circuit diagram;

[0048] Figure 3 The measurement provided by the embodiment of the present invention Quantum circuit diagram;

[0049] Figure 4 Preparation provided by the embodiment of the present invention Quantum circuit diagram;

[0050] Figure 5 A parameterized quantum circuit diagram provided by an embodiment of the present invention;

[0051] Figure 6 The measurement B provided in the embodiment of the present invention 23 Quantum circuit diagram;

[0052] Figure 7 A quantum circuit diagram for measuring γ3 provided in an embodiment of the present invention;

[0053] Figure 8 This is a structural diagram of a quantized data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0055] As mentioned earlier, solving systems of linear differential equations holds significant technological significance in both science and industry. However, existing classical computer-based solutions often struggle to implement in real-world scenarios due to the high computational complexity and resource consumption when the parametric dimensions of the linear differential equations are too large.

[0056] Quantum computing, on the other hand, exploits quantum mechanical phenomena (such as quantum superposition and entanglement) to perform information processing tasks, overcoming the limitations of classical computing and enabling faster computation for certain problems. Other existing approaches employ quantum algorithms to solve systems of linear differential equations, significantly reducing the computational complexity compared to classical algorithms. However, these quantum computing approaches also present the challenge of increasing the quantum computing resources (e.g., qubits) consumed as the accuracy of the equations solved increases and as the evolution time of the physical systems simulated by the equations increases.

[0057] In order to solve the above technical problems, an embodiment of the present invention provides a quantized data processing method. The basic idea of ​​the present invention is described below. First, the linear equations to be solved are preprocessed, the solution of the equations is encoded into a quantum system, and the solution interval is divided into several segments. The differential evolution of each segment is replaced by the corresponding differential evolution, and then the problem of solving the linear equations is transformed into the problem of solving the Hamiltonian ground state of the quantum system; the Hamiltonian expectation value expression is decomposed into a combination of several experimental observables, and a quantum circuit is designed to measure these quantities; the Hamiltonian expectation value is reconstructed based on the measured value, and then the parameters of the quantum circuit are optimized with the help of a classical optimization algorithm. Finally, based on the optimized quantum circuit, the differential evolution of each step is completed on the quantum system through continuous iteration, thereby giving an approximate solution to the equations to be solved at the final moment.

[0058] Figure 1 Flowchart of a quantized data processing method provided by an embodiment of the present invention. Figure 1 As shown, the process of the method at least includes:

[0059] Step 11: Divide the time interval for solving the differential equation into a preset number of segments, and approximate the differential equation into a first difference equation according to the segments.

[0060] A differential equation is an equation that describes the relationship between the derivative of an unknown function and the independent variable. The solution to a differential equation is a function that satisfies the equation. A difference equation, also known as a recursive relation, is an equation that contains an unknown function and its differential, but does not contain a derivative. The function that satisfies the equation is called the solution to the difference equation. A difference equation can be a discretization of a differential equation. In this step, the time interval for solving the differential equation can be divided into a preset number of segments, and then a first difference equation that is approximate to the differential equation can be obtained based on the obtained segments. Furthermore, in subsequent steps, an approximate solution to the differential equation can be obtained through the first difference equation.

[0061] In one embodiment, the differential equation and the value of the function vector to be solved at the initial time of the first segment can be expressed as:

[0062]

[0063]

[0064] Among them, t is the segment number, is the function vector to be solved, A is the coefficient matrix, is a constant vector, is the value of the function vector to be solved at the initial time of the first segment. In one embodiment, the first differential equation group can be expressed as,

[0065]

[0066] The solution interval [0, T] of the differential equation is divided into T / Δt small intervals of length Δt, I N is an N×N dimensional identity matrix.

[0067] Step 12: Superimpose the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determine a second differential equation equivalent to the first differential equation based on the first function vector.

[0068] In the above-mentioned function vector and constant vector, and In the embodiment of , the first function vector can be expressed as:

[0069]

[0070] in, is the first function vector. In a specific embodiment, the determined second differential equation group can be expressed as,

[0071]

[0072] in,() -1 is the inverse of the matrix, M is

[0073] Step 13: For a first segment of the predetermined number of segments, a quantum circuit is set up according to the second differential equation. Specifically, in one embodiment, a corresponding Hamiltonian can be determined according to the second set of differential equations; and a quantum circuit is set up to determine the ground state of the Hamiltonian.

[0074] In the embodiment where the second differential equation group is expressed as formula (4), the determined Hamiltonian can be expressed as:

[0075]

[0076] in, is the conjugate transpose, express The normalized state vector, I 2N is a 2N×2N dimensional identity matrix.

[0077] In a specific embodiment, the expected value of the Hamiltonian may be minimized, and the ground state of the Hamiltonian may be determined based on the minimized expected value.

[0078] In a specific embodiment, the quantum circuit may include at least a first subcircuit. Furthermore, based on the pre-optimized first subcircuit, the expectation value of the Hamiltonian may be minimized. In a specific embodiment, the pre-optimization of the first subcircuit includes optimizing circuit parameters of the first subcircuit, where the optimization of the circuit parameters is performed using a classical computer.

[0079] In one embodiment, the expected value of the Hamiltonian can be expressed as:

[0080]

[0081] in, is the expected value of the Hamiltonian, This is the first sub-line.

[0082] The method is further illustrated below through a complete embodiment.

[0083] In this embodiment, the linear differential equation to be solved is:

[0084]

[0085]

[0086] We hope to find the solution at time t = T.

[0087] The coefficient matrix A in the known equations, the constant vector and initial conditions (Right now Initial values ​​at time 0), which are constant matrices / constant vectors in N-dimensional space. In one embodiment, n q is the number of quantum bits required to quantum encode the above constant matrix / constant vector.

[0088] First, in step A1, the initial conditions Combine into column vector Prepare it into the corresponding quantum state In different embodiments, quantum states can be prepared in different specific ways In a specific embodiment, the column vector Normalize it, and then use an auxiliary quantum bit and n q Working qubits, using quantum gates Prepared into the corresponding quantum state

[0089] And, decompose the matrix A into L n q Bit Pauli term (i.e. no more than n q Linear superposition of the direct product of Pauli operators:

[0090]

[0091] In a specific embodiment, the above decomposition of the matrix A can be performed through classical calculations.

[0092] Then, in step A2, the solution interval [0, T] can be divided into n=T / Δt segments of length Δt. In each segment, the differential equation system can be approximated using the following difference equation (i.e., formula (2)):

[0093]

[0094] Among them I N is an N×N dimensional identity matrix.

[0095] In a specific embodiment, the auxiliary vector The solution of the above difference equation is obtained by quantum evolution using a quantum computer. At this time, it can be known from formula (2) that Satisfies the following equation (i.e., formula (4)):

[0096]

[0097] In this way, the formula (2) can be arrive The differential evolution of is transformed into the equation (3) In addition, the solution prepared in the previous step Its corresponding It is exactly at t=0

[0098] Then, in step A3, the solution of the equation (4) can be completed by introducing the Hamiltonian. Specifically, in one embodiment, as shown in formula (5), the Hamiltonian H can be expressed as:

[0099]

[0100] in Represents a vector The normalized state vector. The only basis state of this Hamiltonian is corresponds to zero eigenenergy, and from formula (4) we can see that the ground state is exactly Therefore we can use the variational subroutine to find the ground state of H.

[0101] Next, in step A4, in order to use the variational quantum program on the quantum computer to find the ground state of H, a parameterized circuit can be used. To prepare the quantum state, the input of the circuit is By adjusting the parameters To minimize the output state The expected value of H is:

[0102]

[0103] That is, the above formula (6), according to the output state of the circuit, can be obtained In a specific embodiment, for example, when iterating to the i+1th time segment, the first quantum state at time t=iΔt has been obtained, and the first quantum state at time t=(i+1)Δt is to be solved. For convenience, we use the symbol to replace use to replace In a specific embodiment, the measurement scheme for the expected value of H can be specifically as follows: With the help of formula (7), the matrix M in formula (4) can be expressed as a linear combination of Pauli terms:

[0104]

[0105] Among them, I, I N represent 2×2 and N×N dimensional identity matrices respectively, is the direct product; {X, Y, Z} represents three Pauli operators; μ iis the superposition coefficient (complex number) of 3+4L Pauli operators, which can be determined by formula (7) using a classical computer. They form a constant vector P i is n q +1-bit Pauli term. Substituting formula (8) into formula (5) and then into formula (6), we can obtain:

[0106]

[0107] Among them, B They are matrices / vectors composed of the following elements:

[0108]

[0109]

[0110] These physical quantities can be measured by introducing an auxiliary bit on the quantum computer. In different embodiments, they can be obtained by different specific quantum measurement circuits. In one embodiment, their measurement circuits can be respectively as follows: Figure 2 and Figure 3 shown. Figure 2 The measurement provided by the embodiment of the present invention The quantum circuit diagram of It represents the output state of the i-th iteration and is used as the initial state in the (i+1)-th iteration. S is the phase-shift gate diag(1, i), and the index f on it takes the value of 0 or 1, indicating that the final measured output is B. jk The real or imaginary part of . Is the parameterized circuit used in the current step (step (i+1)). |0> m P represents the initial state of the quantum bit used to assist in measurement. k , P j is the Pauli term in the Pauli expansion of the matrix M. Their controlled operations are all performed when the auxiliary bit is in |1> m The final measurement result is given by the expectation value of the Pauli Z operator of the auxiliary bit: when f = 0 <z>=Re{B jk }, when f=1 <z>=-Im{B jk }. Figure 3 The measurement provided by the embodiment of the present invention The quantum circuit diagram of Figure 3 As shown, the controlled operation is performed when the auxiliary bit is at |1> m The final measurement result is given by the expectation value of the Pauli Z operator of the auxiliary bit: when f = 0 <z>=Re{γ k }, when f=1 <z>=Im{γ k }.

[0111] Then, in step A5, the quantum circuit can be optimized using the variational quantum algorithm principle. Line parameters So we can get the approximation of the next moment In a specific embodiment, the parameter optimization process of classical calculation can be used to update the quantum circuit The parameters in , thereby minimizing Iterate until it converges (close to 0), then is an approximation of the ground state of Hamiltonian H. Specifically, From the expression of Given the time vector t=(t+1)Δt Normalized approximation of .

[0112] In one embodiment, steps A4 to A5 may be iterated multiple times, for example, n=T / Δt times, to obtain the final quantum state. The normalized approximation of .

[0113] Finally, in step A6, the auxiliary qubit can be measured to obtain an approximate solution to the equations. Specifically, if the result of measuring the auxiliary bit is 0, the quantum state of the working bit gives the solution to the equations Normalized approximation of ; if the result is 1, repeatedly run the trained circuit and measure until the measurement result is 0.

[0114] The method is further described below through a more specific embodiment.

[0115] In this embodiment, the linear differential equation to be solved is:

[0116]

[0117] Among them, the coefficient matrix A, the constant vector and initial conditions Specifically:

[0118]

[0119]

[0120] First, in step B1, the vector Normalized, we get

[0121]

[0122] In a specific embodiment, they can be prepared from |0> using Pauli X-gate and Hadamard gate respectively on the working bit. In a specific embodiment, in order to prepare the quantum state An auxiliary bit can be used |0> a , and apply the following unitary operation to it:

[0123]

[0124] At this time, the auxiliary bit is in the state Then, a 0-controlled Pauli X gate and a 1-controlled Hadamard gate controlled by the auxiliary bit are applied to the working bit, so that the auxiliary bit and the working bit will be in the quantum state:

[0125]

[0126] Note that in this case, A in formula (7) is exactly the identity matrix, and there is only one expanded term I in formula (7). Figure 4 Preparation provided by the embodiment of the present invention Quantum circuit diagram.

[0127] Then, in step B2, we can set the total solution time to T = 10 and the step size of the differential evolution to Δt = 0.1. In this way, we transform the evolution of the system of equations in the interval [0, 10] into a 100-step differential evolution. For step i, we use a quantum computer to simulate the evolution of the system in the interval [(i-1)Δt, iΔt]. From steps A2 to A4 in the previous embodiment, we can see that this is achieved by applying a parameterized quantum circuit to the two-bit system (1 auxiliary bit + 1 working bit) used in step B1. In different embodiments, different parameterized quantum circuits can be used. Figure 5 The parameterized quantum circuit diagram provided by the embodiment of the present invention is as follows: Figure 5 In the parameterized quantum circuit shown, the input state is the output of the previous step (i-1 step), that is, By adjusting the line parameters (i.e. (θ1, θ2, θ3, θ4) in the figure), we hope that the output state of the current circuit Given a vector To achieve this goal, the solution of the equation can be converted into a problem of determining the ground state of the Hamiltonian through quantum coding, and the problem can be solved using a variational quantum procedure.

[0128] Next, in step B3, it can be seen from the description of Hamiltonian encoding in steps A2 to A3 in the previous embodiment that the circuit output state Measure the expectation value of the Hamiltonian defined by equation (6) And use it as the objective function in the classical optimization algorithm, and use the classical optimization algorithm (in a specific embodiment, for example, the gradient descent algorithm) to dynamically update the parameters Thus gradually reducing Until it approaches 0, the line output state will give the vector Normalized approximation of .

[0129] Because the expectation value of the Hamiltonian It can be obtained by measuring the line output state. From the description of step A4 in the previous embodiment, it can be known that another measurement auxiliary bit |0> m Since A=I, the Pauli expansion of the matrix M in formula (8) is

[0130]

[0131] There are four Pauli terms in total, and the expansion coefficients and corresponding Pauli terms are

[0132]

[0133] Based on the above expansion results, we can use the same circuit diagram given in step A4 of the previous embodiment ( Figure 2 、 Figure 3 )Measurement of physical quantities

[0134]

[0135]

[0136] In a specific embodiment, taking j=2, k=3 as an example, measuring γ3 and B 23 The circuit diagram can be as follows Figure 6 and Figure 7 As shown, Figure 6 The measurement B provided in the embodiment of the present invention 23 The quantum circuit diagram of Figure 7 A quantum circuit diagram for measuring γ3 provided in an embodiment of the present invention.

[0137] When all γ is measured k and B jk , the expected value of the Hamiltonian can be obtained through formula (9) This allows for dynamic parameter updates using classic optimization algorithms Thus minimizing To close to 0, the line output state will give the vector The normalized approximation of , which can be used as the input for the next step (i+1 step). Denoted as U i , and record it for subsequent preparation of quantum states.

[0138] Thereafter, in step B4, the above iteration is repeated, for example, step. After the last step, the quantum state of the two-bit system is You can give a vector Normalized approximation of . At this time, the auxiliary bit is measured. If the result is 0, the working bit will give Normalized approximation of ; if the result is 1, then repeat the operation of the obtained parameterized circuit sequence U 100 ...U2U1, preparation Until the measurement gives 0.

[0139] The quantized data processing methods provided in the embodiments of this specification have the following advantages: Existing quantum computing methods for solving systems of linear differential equations increase their demand for qubit resources as the accuracy of the solution increases and the quantum evolution time of the computation increases. Using the quantized data processing methods provided in the embodiments of this specification, even when the accuracy of the solution increases or the quantum evolution time of the computation increases, the demand for qubit resources remains essentially unchanged (for example, for an N-dimensional differential system, only log2N+2 qubits are required, i.e., the minimum number of qubits required to encode an N-dimensional vector in an asymptotic sense), which significantly reduces the qubit resources required for quantized data processing.

[0140] According to another embodiment, a quantized data processing device is provided. Figure 8 This is a structural diagram of a quantized data processing device provided by an embodiment of the present invention. Figure 8 As shown, the apparatus 800 includes:

[0141] The first differential equation group obtaining unit 81 is configured to divide the differential equation solution time interval into a preset number of segments, and approximate the differential equation into a first differential equation according to the segments;

[0142] The second differential equation determining unit 82 is configured to superimpose the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determine a second differential equation equivalent to the first differential equation based on the first function vector;

[0143] The quantum circuit establishment unit 83 is configured to establish a quantum circuit for a first segment of the preset number of segments according to the second difference equation;

[0144] a first quantum state preparation unit 84 configured to determine a value of a first function vector at an initial time of the first segment according to a value of the to-be-solved function vector at an initial time of the first segment, and prepare a first quantum state based on the value of the first function vector at the initial time of the first segment;

[0145] The equation solution determination unit 85 is configured to input the first quantum state into the quantum circuit, and obtain the value of the function vector to be solved at the end time of the first segment through the quantum circuit.

[0146] According to yet another embodiment, a computer-readable medium is provided, comprising a computer program stored thereon, and the computer program executes the above method when the computer is executed.

[0147] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0148] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0149] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0150] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.< / z> < / z> < / z> < / z>

Claims

1. A quantized data processing method, comprising: Dividing a time interval for solving a differential equation into a preset number of segments, and approximating the differential equation into a first difference equation based on the segments; superimposing the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determining a second differential equation equivalent to the first differential equation based on the first function vector; For a first segment of the preset number of segments, setting a quantum circuit according to a second difference equation; Determining a value of a first function vector at the initial time of the first segment according to the value of the to-be-solved function vector at the initial time of the first segment, and preparing a first quantum state based on the value of the first function vector at the initial time of the first segment; Inputting a first quantum state into the quantum circuit, and obtaining a value of a function vector to be solved at an end time of the first segment through the quantum circuit; The values ​​of the differential equation and the function vector to be solved at the initial time of the first segment can be expressed as: Among them, t is the segment number, is the function vector to be solved, A is the coefficient matrix, is a constant vector, is the value of the function vector to be solved at the initial time of the first segment; The preparing of the first quantum state based on the value of the first function vector at the initial time of the first segment comprises: Combine into column vector Column vector Normalization is performed, and an auxiliary quantum bit and multiple working quantum bits are used to Prepared into the corresponding quantum state The method uses an auxiliary quantum bit and multiple working quantum bits, based on the quantum gate. Prepared into the corresponding quantum state include: For an auxiliary bit |0> a , applying the unitary operation U a , The auxiliary bit is in the state Applying a 0-controlled Pauli X gate and a 1-controlled Hadamard gate controlled by the auxiliary bit to the working bit makes the auxiliary bit and the working bit in a quantum state 2. The method according to claim 1, wherein The first function vector can be expressed as: in, is the first function vector.

3. The method according to claim 2, wherein: According to the second set of difference equations, a set of equations is established to solve the quantum circuit, including: Determining a corresponding Hamiltonian according to the second set of difference equations; A quantum circuit is set up to determine the ground state of the Hamiltonian.

4. The method according to claim 3, wherein: The first difference equation system is expressed as, The solution interval [0, T] of the differential equation is divided into T / Δt small intervals of length Δt, I N is an N×N dimensional identity matrix; The second set of difference equations is expressed as, in,()- 1 is the inverse of the matrix, M is The Hamiltonian is expressed as: in, is the conjugate transpose, express The normalized state vector, I 2N It is a 2N×2N dimensional identity matrix.

5. The method according to claim 4, wherein Determining a ground state of the Hamiltonian, comprising: The expected value of the Hamiltonian is minimized, and the ground state of the Hamiltonian is determined according to the minimized expected value.

6. The method according to claim 5, wherein: The quantum circuit comprises at least a first sub-circuit: By minimizing the expected value of the Hamiltonian, including: Based on the pre-optimized first sub-circuit, the expected value of the Hamiltonian is minimized.

7. The method according to claim 6, wherein: The pre-optimization of the first sub-circuit includes optimizing the line parameters of the first sub-circuit, and the optimization of the line parameters is performed based on a classical computer.

8. The method according to claim 6, wherein: The expectation value of the Hamiltonian is expressed as: in, is the expected value of the Hamiltonian, This is the first sub-line.

9. A quantized data processing device, comprising: a first differential equation group obtaining unit configured to divide a time interval for solving the differential equation into a preset number of segments, and approximate the differential equation to a first differential equation based on the segments; a second differential equation determining unit configured to superimpose the constant vector of the differential equation and the function vector to be solved to obtain a first function vector, and determine a second differential equation equivalent to the first differential equation based on the first function vector; a quantum circuit setting unit configured to set up a quantum circuit for a first segment of the preset number of segments according to a second difference equation; a first quantum state preparation unit configured to determine a value of a first function vector at an initial time of the first segment according to a value of the to-be-solved function vector at an initial time of the first segment, and prepare a first quantum state based on the value of the first function vector at the initial time of the first segment; The equation solution determination unit is configured to input the first quantum state into the quantum circuit, and obtain the value of the function vector to be solved at the end time of the first segment through the quantum circuit; wherein the differential equation and the value of the function vector to be solved at the initial time of the first segment can be expressed as: Among them, t is the segment number, is the function vector to be solved, A is the coefficient matrix, is a constant vector, is the value of the function vector to be solved at the initial time of the first segment; The preparing of the first quantum state based on the value of the first function vector at the initial time of the first segment comprises: Combine into column vector Column vector Normalization is performed, and an auxiliary quantum bit and multiple working quantum bits are used to Prepared into the corresponding quantum state The method uses an auxiliary quantum bit and multiple working quantum bits, based on the quantum gate. Prepared into the corresponding quantum state include: For an auxiliary bit |0> a , applying the unitary operation U a , The auxiliary bit is in the state Applying a 0-controlled Pauli X gate and a 1-controlled Hadamard gate controlled by the auxiliary bit to the working bit makes the auxiliary bit and the working bit in a quantum state 10. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Quantum circuit construction method and device

    CN111582491A

  • Schrodinger-Heisenberg variable sub-ground state solving method

    CN113344209A