Method and device for adiabatic quantum calculation of linear equation set based on block coding
By constructing a time-dependent Hamiltonian and discrete adiabatic evolution quantum circuits using a block-coded adiabatic quantum computing method, the problem of efficiently solving large-scale sparse linear equation systems is solved, achieving an exponential speedup effect for quantum computers in this area.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
- Filing Date
- 2024-10-30
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies struggle to efficiently solve large-scale sparse linear equation systems, and quantum computers have potential in this area, but current methods have not fully utilized them.
A block-coding-based adiabatic quantum computing method is adopted. By constructing a time-dependent Hamiltonian and a discrete adiabatic evolution quantum circuit, the block encoding of the Hamiltonian is realized using a family of qubits. The specific steps include constructing initial and target Hamiltonians, building a discrete adiabatic evolution quantum circuit and performing quantum state evolution, and finally obtaining the solution through quantum state measurement.
It achieves efficient solution of linear equation systems with a complexity of O[sκlogNlog(1/ε)], improving the efficiency of quantum computers in solving sparse linear equation systems.
Smart Images

Figure CN122021952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum computing technology, and in particular to a method and apparatus for adiabatic quantum computation of linear equations. Background Technology
[0002] One of the core problems in applied mathematics and scientific and engineering computing is how to solve large-scale sparse linear equation systems in a reasonable amount of time. Quantum computers, as physical devices that perform high-speed mathematical and logical operations, store and process quantum information according to the laws of quantum mechanics, possess a higher efficiency than conventional computers when running quantum algorithms to solve certain mathematical problems, including linear system problems. Because quantum computers offer exponential speedups when solving linear systems using quantum linear solvers, these solvers hold promise for accelerating the solution process for many practical problems in science and engineering.
[0003] Sparse Hamiltonian block encoding is an important method for realizing Hamiltonian simulation and a crucial prerequisite for the implementation of quantum algorithms such as quantum linear algorithms. Adiabatic quantum computation linear algorithms are currently the most efficient quantum linear algorithms known for solving sparse linear equation systems. Therefore, it is hoped that a discrete adiabatic quantum linear solver can be constructed through sparse Hamiltonian block encoding to solve linear equation systems. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for calculating linear equations based on block coding adiabatic quantum computing, so as to solve the technical problems in the prior art.
[0005] In a first aspect, the present invention provides a method for calculating adiabatic quantum equations based on block coding, comprising the following steps:
[0006] Obtain the linear system of equations Ax = b, where A is the coefficient matrix and b is a vector;
[0007] Construct a time-dependent Hamiltonian H(f(s)) for adiabatic evolution, wherein the time-dependent Hamiltonian H(f(s)) includes an initial Hamiltonian H(0) and a target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>;
[0008] Construct a discrete adiabatic evolution quantum circuit, wherein the block discrete adiabatic evolution quantum circuit has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) The evolution operator U H(f(s)) The evolution operator U is used to implement the block coding of the time-dependent Hamiltonian H(f(s)). H(f(s))The discrete adiabatic evolution quantum circuit is continuously acted upon, and the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of the adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of the adiabatic evolution. -1 b>.
[0009] The method for calculating linear equations based on block coding adiabatic quantum computing, as described above, preferably includes an auxiliary qubit family and a target qubit family in the discrete adiabatic evolution quantum circuit, wherein the evolution operator U... H(f(s)) The process is applied to the auxiliary qubit family and the target qubit family, where the initial quantum state of the auxiliary qubit family is the |0> state and the initial quantum state of the target qubit family is the |b> state, and then processed by the evolution operator U. H(f(s)) After the action, when the quantum state measurement result of the auxiliary qubit family is |0> state, the quantum state of the target qubit family is |A. -1 b>state.
[0010] In the method for calculating linear equations based on block coding adiabatic quantum computing as described above, preferably, the auxiliary qubit family includes a first qubit and n second qubits, and the target qubit family includes n third qubits;
[0011] The evolution operator U H(f(s)) This includes the first H gate distributed sequentially along the action time sequence, and the matrix query unitary operation logic gate O. A The first H gate and the second H gate act on the second qubit, and the matrix query unitary operation logic gate O... A The SWAP gate is used to encode the time-dependent Hamiltonian H(f(s)) into the second qubit, and the SWAP gate is applied to the second qubit and the third qubit.
[0012] The method for calculating linear equations based on block coding adiabatic quantum computation, as described above, preferably includes a matrix query unitary operation logic gate O. A Defined as:
[0013]
[0014] Among them, α ij For elements of coefficient matrix A, ||a| ij ‖≤1, |i> and |j> are the ground states calculated by n qubits.
[0015] The method for calculating linear equations based on block coding for adiabatic quantum computation, as described above, preferably includes a matrix query unitary operation logic gate O.A Including 2 n A multi-controlled quantum rotating gate, wherein each element of the coefficient matrix A corresponds one-to-one with one of the multi-controlled quantum rotating gates, the target qubit of the multi-controlled quantum rotating gate is the first qubit, and the control qubit of the multi-controlled quantum rotating gate is the second qubit.
[0016] The method for calculating linear equations based on block coding adiabatic quantum computation as described above, wherein preferably, the multi-controlled quantum rotation gate includes an RX gate, an RY gate, or an RZ gate.
[0017] In the method for calculating linear equations based on block coding adiabatic quantum computing as described above, preferably, the time-dependent Hamiltonian H(f(s)) is defined as:
[0018] H(f(s))=(1-f(s))H0+f(s)H1,0≤s≤1;
[0019] Wherein, f(s) is a scheduling function, and f(0) = 0, f(1) = 1;
[0020] H0 is defined as:
[0021]
[0022] H1 is defined as:
[0023]
[0024] Among them, Q b =I N -|b> <b|。
[0025] Secondly, the present invention provides a solving apparatus, the apparatus comprising:
[0026] The acquisition module is used to acquire the linear equation system Ax = b, where A is the coefficient matrix and b is a vector;
[0027] A time-dependent Hamiltonian construction module is used to construct a time-dependent Hamiltonian H(f(s)) for adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes an initial Hamiltonian H(0) and a target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>;
[0028] A discrete adiabatic evolution quantum circuit construction module is used to construct discrete adiabatic evolution quantum circuits. The block discrete adiabatic evolution quantum circuit has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) The evolution operator UH(f(s)) The evolution operator U is used to implement the block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) The discrete adiabatic evolution quantum circuit is continuously acted upon, and the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of the adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of the adiabatic evolution. -1 b>.
[0029] Thirdly, the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the aforementioned method at runtime.
[0030] Fourthly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the aforementioned method.
[0031] Compared with the prior art, this invention provides a specific implementation method of Hamiltonian block encoding for quantum circuits, and based on this block encoding, a discrete adiabatic quantum linear solver can be constructed to solve the linear equation system with a complexity of O[sκlogNlog(1 / ∈)]. Attached Figure Description
[0032] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of this application;
[0033] Figure 2 This is a flowchart illustrating the solution method provided in the embodiments of this application;
[0034] Figure 3 This is a schematic diagram of the block coding circuit of the coefficient matrix A provided in the embodiments of this application;
[0035] Figure 4 The matrix query unitary operation logic gate O provided in this application embodiment is... A A schematic diagram of the quantum circuit structure encoded by the coefficient matrix A block;
[0036] Figure 5 This is the matrix query unitary operation logic gate O for encoding a real number matrix A as provided in the embodiments of this application. A Structural diagram;
[0037] Figure 6 This is a schematic diagram of the block coding circuit of the complex matrix A provided in the embodiments of this application;
[0038] Figure 7 This is a schematic diagram of the structure of a solving device provided in an embodiment of this application. Detailed Implementation
[0039] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0040] [Structure of a quantum circuit construction system]
[0041] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of this application. The quantum circuit construction system may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.
[0042] Network 110 is a medium used to provide communication links between various devices and computers connected together within a quantum circuit construction system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.
[0043] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.
[0044] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the quantum circuit construction method provided in the embodiments of this application.
[0045] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.
[0046] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.
[0047] The aforementioned classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, the first device, including the classical processing system 160, runs a classical computer operating system that provides quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum applications using the quantum application development tools and services on the second device and send the quantum program to the second device, including the quantum processing system 170, via the network services. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.
[0048] In the classic silicon-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of these computing units in a silicon chip is sufficient; currently, a classic processor contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.
[0049] Unlike the logic units in the classical processing system 160, the basic computational unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logic function combinations to achieve computational effects.
[0050] Based on these differences, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit's use) is crucial to improving the computational performance of quantum computers and requires specialized design. The aforementioned design considerations for qubits are technical issues that ordinary computing devices do not need to address.
[0051] [Block-coded quantum circuits]
[0052] In the embodiments provided by this invention, a block-coded quantum circuit is provided. Block coding technology is a method of embedding an arbitrary matrix into a larger-dimensional unitary matrix and using the embedded arbitrary matrix as a submatrix of the current larger-dimensional unitary matrix, as described above. Figure 3 As shown, the block-coded quantum circuit includes an auxiliary qubit family and a target qubit family. A unitary operator U acts on both families. The auxiliary qubit family represents the lower-order qubits shown in the diagram, and the target qubit family represents the higher-order qubits. The initial quantum state of the auxiliary qubit family is |0>, and the initial quantum state of the target qubit family is |ψ>. After the action of the unitary operator U, when the quantum state measurement result of the auxiliary qubit family is |0>, the quantum state of the target qubit family is... state.
[0053] Given non-negative integers a, n, m, let m = a + n, where a is the number of auxiliary qubits in the auxiliary qubit family, n is the number of target qubits in the target qubit family, and m is the number of qubits in the entire quantum circuit.
[0054] if
[0055]
[0056] Here, |0> represents the ground state of the qubit, I n It is an n-dimensional identity matrix. and Let U represent the outer product of α ground states, then the m-bit unitary operator U is called the (α, α)-block code of the n-bit operator A.
[0057]
[0058] The parameters (α, ɑ) are the normalization factor required to encode the matrix of arbitrary norm and the number of qubits used in block encoding, respectively. Since ||U|² = 1, therefore This leads to the derivation that ||A||2≤α.
[0059] For block encoding It is a partial trace of the unitary operator U in the zero state of the auxiliary space, which means that the Hilbert space Divided into Given an n-bit quantum state, Apply the unitary operator U to The following results were obtained:
[0060]
[0061] in, |σ ⊥ >A normalized quantum state, orthogonal to the auxiliary qubit family of quantum states.
[0062] When the probability is At that time, the measurement result of the auxiliary quantum bit family was The result of the target qubit family is the target quantum state. That is, running the block-coded quantum circuit and measuring the auxiliary qubit. When the measured auxiliary qubit register is in the |0> state, it means that the measurement is successful and the target quantum state can be obtained in the target qubit register.
[0063] Reference Figure 4 As shown, this invention provides a matrix query unitary operation logic gate O. A The quantum circuit encoded by the matrix A block, specifically:
[0064] The auxiliary qubit family includes one first qubit and n second qubits, where a = n + 1 as mentioned above. The target qubit family includes n third qubits.
[0065] The unitary operator U includes the first H gate distributed sequentially along the action time sequence, and the matrix query unitary operation logic gate O. A The first and second H gates act on the second qubit. The first and second H gates represent a Hadamard transformation of a single qubit, producing an equal superposition across n second qubits. A 2n-qubit SWAP gate acts on both the second and third qubits, achieving quantum state swapping. The matrix query unitary operation logic gate O... A An Oracle or a combination of Oracles can be understood as a module (similar to a black box) that performs a specific function in a quantum algorithm. In this embodiment, the matrix query unitary operation logic gate O... A Used to encode the time-dependent Hamiltonian H(f(s)) into the second qubit.
[0066] Assume α ij These are elements of an N×N matrix A, where N = 2. n ,||ɑ ijIf ||≤1, then the matrix query operation logic gate O A The definition is as follows:
[0067]
[0068] Where |i> and |j> are the ground states of n qubits, after passing through the SWAP gate, they are realized as SWAP|i>|j>=|j>|i>.
[0069] when|a ij |≤1, Figure 4 The quantum circuit in the diagram is (1 / 2) of the n-bit matrix A. n Block encoding of (n+1).
[0070] Figure 4 The unitary operator U-quantum circuit in the model can be represented by a matrix as follows:
[0071]
[0072] For the unitary operator U is (1 / 2) of matrix A n (n+1) block encoding has the following equation:
[0073]
[0074] This equation shows that when the unitary operator U acts on a specific input state, a component of the output state interacts with an element α of matrix A. ij Proportional, and the scaling factor is
[0075] It can be proven that:
[0076] on the one hand,
[0077] on the other hand,
[0078]
[0079] In summary
[0080]
[0081]
[0082] Figure 4 In addition to O, the provided quantum circuits A Other quantum gates can be implemented as single gates or double gates, and the complexity of the first H gate, the second H gate, and the SWAP gate is only poly(n).
[0083] The following content introduces O A How to implement arbitrary matrices using single-gate and double-gate methods.
[0084] In the embodiments provided by this invention, the matrix query unitary operation logic gate O A Including 2 n Each element of the coefficient matrix A corresponds to a multi-controlled quantum rotation gate. The target qubit of the multi-controlled quantum rotation gate is the first qubit, and the control qubit of the multi-controlled quantum rotation gate is the second qubit.
[0085] In one feasible implementation, when A is a real matrix, for a given row and column index i and j, the target qubit of the multi-control quantum rotation gate acts on the |0> state of the first qubit. The quantum rotation gate of the multi-control quantum rotation gate is preferably an RY gate with an angle.
[0086] Rotation parameters of RY gate
[0087] θ ij =arccos(ɑ ij )
[0088] ,Right now
[0089]
[0090] for Matrix query unitary operation logic gate O A The implementation can be done using 2 n A multi-controlled quantum rotating gate. Using the symbol C. n (R y ) represents R with n control qubits y Gate. Matrix query unitary operation logic gate O. A The circuit construction is for each matrix element ɑ ij Use a C n (R y The gate, where the second qubit encodes the row and column indices |i>|j> of the corresponding element. Figure 5 This application provides a 2×2 matrix-encoded quantum circuit, which uses one first qubit, two second qubits, and four C-qubits. 2 (R y )Door.
[0091] In another feasible implementation, when A is a complex matrix, refer to Figure 6 As shown, the quantum rotation gates in a multi-control quantum rotation gate are preferably RY gates and RZ gates with angles. The elements of matrix A are encoded as the product of the rotations of the RY gate and the RZ gate. For a given row index and column index i and j, the matrix elements to be encoded are... And O A The |0> state acting on the first qubit is equivalent to R y and Rz The product of the doors, their angles
[0092] θ ij =arccos(|a ij |)
[0093] φ ij =-α ij
[0094] Right now
[0095]
[0096] The second qubit encodes the row and column indices |i>|j> of the corresponding element.
[0097] [Linear Equations for Adiabatic Evolution Calculation]
[0098] Reference Figure 2 As shown, this invention provides a method for calculating adiabatic quantum equations based on block coding, comprising the following steps:
[0099] Step S101: Obtain the linear system of equations Ax = b, where A is the coefficient matrix and b is a vector.
[0100] Assumption It is an invertible matrix with condition number κ, ∥A∥2=1, and It is a normalized vector. Given a target error ∈, according to the characteristics of quantum computing, the original linear equation system Ax=b is first transformed into the expression form A|x>=|b>, where |x> and |b> are the normalized x and b vectors, respectively. The goal of the Quantum Linear Systems Problem (QLSP) is to prepare a normalized state |x> on a quantum computer. a > It is a linear system |x>=A -1 |b> / ∥A -1 The ∈-approximation of the solution of |b>∥2, i.e., ||x| ɑ > <x ɑ |-|x> <x|‖2≤∈。
[0101] Assuming A is Hermitian and positive definite, the first step in designing an algorithm based on adiabatic quantum computation (AQC) to solve QLSP is to transform QLSP into an equivalent eigenvalue problem.
[0102] Step S102: Construct the time-dependent Hamiltonian H(f(s)) of adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes the initial Hamiltonian H(0) and the target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>.
[0103] The meaning of adiabatic evolution is to execute a time-dependent Hamiltonian H(f(s)) on a quantum circuit. If the quantum circuit is initially in the eigenstate of the initial Hamiltonian H(0), after sufficiently slow evolution, the system will be in the ground state of the target Hamiltonian H(1). Because the condition for adiabatic evolution is to be in the eigenstate at each moment, the finally evolved Hamiltonian is also in the eigenstate. Therefore, based on this principle, the problem of solving the eigenvector will be specifically introduced below.
[0104] Suppose Q b = I N - |b><b|, the Hamiltonians H0 and H1 are constructed as follows
[0105]
[0106] where, The null space of H0 is So there is The null space of H1 is So there is
[0107] Since Q b is a projection operator, the gap between 0 and other eigenvalues of H0 is 1, and the gap between 0 and other eigenvalues of H1 is at least 1 / κ. It can be proved that if the initial state is then the final state of adiabatic evolution remains unchanged, while the initial state is then the final state of adiabatic evolution is which is the desired adiabatic path to be constructed.
[0108] If the ground state of H1 can be prepared as the QLSP can be solved by the AQC algorithm. Define the time-dependent Hamiltonian H(f(s)) as follows:
[0109] H(f(s)) = (1 - f(s))H0 + f(s)H1, 0 ≤ s ≤ 1
[0110] The function f(s): [0,1] → [0,1] is called the scheduling function, which is a strictly increasing mapping, and f(0) = 0, f(1) = 1. For simplicity, here f(s) = s can be taken for the function f(s). For any s, is always in Null(H(f(s))), and there exists an intermediate state such that In particular, and That is which is the required adiabatic path.
[0111] Theoretically, when H(f(s)) changes slowly enough, the entire system will maintain the ground state (eigenstate) of H(f(s)) throughout the evolution process, thus achieving adiabatic evolution. Assuming the total number of steps in the adiabatic evolution is T, and the discrete time of the adiabatic evolution is n∈[0,T-1], and s=n / T represents the current evolution time, then the state of the discrete adiabatic evolution process can be described as |ψ n >=U(s|ψ0>, where
[0112]
[0113] U(0)=I
[0114] U(s) can be referred to as the cumulative operator of the adiabatic process. H(s) The evolution operator for each step in the discrete adiabatic process is called the evolution operator.
[0115] The adiabatic evolution from H0 to H1 gradually changes the Hamiltonian of the quantum circuit. This evolutionary process is also the evolution of the solution |x>. The state |b,0> is the characteristic state of H0 with an eigenvalue of 0, and the goal is to evolve it into the characteristic state |A> of H1. -1 b,0>, thus obtaining the solution to the quantum linear system problem (QLSP).
[0116] Step S103: Construct a discrete adiabatic evolution quantum circuit, which has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) Evolution operator U H(f(s)) Preferred Figure 4 The quantum circuit shown, evolution operator U H(f(s)) The evolution operator U is used to implement block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) The number corresponds to the number of discrete moments in the adiabatic evolution, and the evolution operator U H(f(s)) Continuously acting on the discrete adiabatic evolution quantum circuit, the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of adiabatic evolution. -1 b>.
[0117] As the scheduling function f(s) evolves from 0 to 1, it acquires a variable parameter at each discrete moment of adiabatic evolution, for example, using... Figure 5 For example, in each discrete moment of adiabatic evolution, the rotation parameters of the RY gate will change, and this process is repeated until the target Hamiltonian of the adiabatic evolution is reached. At this point, the target qubit family also obtains the corresponding final quantum state |A. -1 b>.
[0118] Finally, the auxiliary qubit family is measured to obtain the quantum state of the solution that meets the accuracy requirements. The quantum state of the solution is extracted using methods such as quantum state tomography and transformed into a classical solution.
[0119] In one feasible implementation, when A is not positive time, the time-dependent Hamiltonian obtained by the above construction may become irreversible. In this case, the time-dependent Hamiltonian is constructed as follows:
[0120]
[0121] Note Q at this point. b =I-|1,b><1,b|. This time-dependent Hamiltonian construction method is equivalent to
[0122] H(s) = [1-f(s)]H0 + f(s)H1
[0123]
[0124]
[0125] Structure of the solver
[0126] See Figure 7 As shown, the solving apparatus includes:
[0127] The acquisition module is used to acquire the linear equation system Ax = b, where A is the coefficient matrix and b is a vector.
[0128] A time-dependent Hamiltonian construction module is used to construct the time-dependent Hamiltonian H(f(s)) of adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes an initial Hamiltonian H(0) and a target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>.
[0129] The Discrete Adiabatic Evolution Quantum Circuit Construction Module is used to construct discrete adiabatic evolution quantum circuits. Each block of discrete adiabatic evolution quantum circuits has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) Evolution operator U H(f(s)) The evolution operator U is used to implement block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) Continuously acting on the discrete adiabatic evolution quantum circuit, the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of adiabatic evolution. -1 b>.
[0130] [Structure of storage media]
[0131] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to implement the steps in any of the above method embodiments when running.
[0132] Specifically, in this embodiment, the storage medium can be configured to store a computer program for implementing the following steps:
[0133] S101: Obtain the linear system of equations Ax = b, where A is the coefficient matrix and b is a vector.
[0134] S102: Construct the time-dependent Hamiltonian H(f(s)) of adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes the initial Hamiltonian H(0) and the target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>.
[0135] S103: Construct a discrete adiabatic evolution quantum circuit, which has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) Evolution operator U H(f(s)) The evolution operator U is used to implement block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) Continuously acting on the discrete adiabatic evolution quantum circuit, the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of adiabatic evolution. -1 b>.
[0136] Structure of electronic devices
[0137] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the steps in any of the above method embodiments.
[0138] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0139] Specifically, in this embodiment, the processor described above can be configured to implement the following steps via a computer program:
[0140] S101: Obtain the linear system of equations Ax = b, where A is the coefficient matrix and b is a vector.
[0141] S102: Construct the time-dependent Hamiltonian H(f(s)) of adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes the initial Hamiltonian H(0) and the target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>.
[0142] S103: Construct a discrete adiabatic evolution quantum circuit, which has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) Evolution operator U H(f(s)) The evolution operator U is used to implement block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) Continuously acting on the discrete adiabatic evolution quantum circuit, the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of adiabatic evolution. -1 b>.
[0143] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. A method for calculating a system of linear equations based on block coding adiabatic quantum computation, characterized in that: Includes the following steps: Obtain the linear system of equations Ax = b, where A is the coefficient matrix and b is a vector; Construct a time-dependent Hamiltonian H(f(s)) for adiabatic evolution, wherein the time-dependent Hamiltonian H(f(s)) includes an initial Hamiltonian H(0) and a target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>; A discrete adiabatic evolution quantum circuit is constructed, wherein the discrete adiabatic evolution quantum circuit has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) The evolution operator U H(f(s)) The evolution operator U is used to implement the block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) The discrete adiabatic evolution quantum circuit is continuously acted upon, and the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of the adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of the adiabatic evolution. -1 b>.
2. The method according to claim 1, characterized in that: The discrete adiabatic evolution quantum circuit includes an auxiliary quantum bit family and a target quantum bit family, and the evolution operator U H(f(s)) The process is applied to the auxiliary qubit family and the target qubit family, where the initial quantum state of the auxiliary qubit family is the |0> state and the initial quantum state of the target qubit family is the |b> state, and then processed by the evolution operator U. H(f(s)) After the action, when the quantum state measurement result of the auxiliary qubit family is |0> state, the quantum state of the target qubit family is |A. -1 b>state.
3. The method according to claim 2, characterized in that: The auxiliary qubit family includes a first qubit and n second qubits, and the target qubit family includes n third qubits; The evolution operator U H(f(s)) This includes the first H gate distributed sequentially along the action time sequence, and the matrix query unitary operation logic gate O. A The first H gate and the second H gate act on the second qubit, and the matrix query unitary operation logic gate O... A The SWAP gate is used to encode the time-dependent Hamiltonian H(f(s)) into the second qubit, and the SWAP gate is applied to the second qubit and the third qubit.
4. The method according to claim 3, characterized in that: The matrix query unitary operation logic gate O A Defined as: Among them, α ij For elements of coefficient matrix A, ||ɑ ij ||≤1,|i>,|j> are the ground state calculated by n qubits.
5. The method according to claim 4, characterized in that: The matrix query unitary operation logic gate O A Including 2 n A multi-controlled quantum rotating gate, wherein each element of the coefficient matrix A corresponds one-to-one with one of the multi-controlled quantum rotating gates, the target qubit of the multi-controlled quantum rotating gate is the first qubit, and the control qubit of the multi-controlled quantum rotating gate is the second qubit.
6. The method according to claim 5, characterized in that: The multi-control quantum rotation gate includes an RX gate, an RY gate, or an RZ gate.
7. The method according to claim 1, characterized in that: The time-dependent Hamiltonian H(f(s)) is defined as: H(f(s))=(1-f(s))H0+f(s)H1,0≤s≤1; Wherein, f(s) is a scheduling function, and f(0) = 0, f(1) = 1; H0 is defined as: H1 is defined as: Among them, Q b =I N -|b> <b|。 8. A solving apparatus, characterized in that, The device includes: The acquisition module is used to acquire the linear equation system Ax = b, where A is the coefficient matrix and b is a vector; A time-dependent Hamiltonian construction module is used to construct a time-dependent Hamiltonian H(f(s)) for adiabatic evolution. The time-dependent Hamiltonian H(f(s)) includes an initial Hamiltonian H(0) and a target Hamiltonian H(1). The eigenstate of the initial Hamiltonian H(0) is represented by |b>, and the eigenstate of the target Hamiltonian H(1) is represented by |A>. -1 b>; A discrete adiabatic evolution quantum circuit construction module is used to construct discrete adiabatic evolution quantum circuits. The block discrete adiabatic evolution quantum circuit has an evolution operator U corresponding to the time-dependent Hamiltonian H(f(s)). H(f(s)) The evolution operator U H(f(s)) The evolution operator U is used to implement the block coding of the time-dependent Hamiltonian H(f(s)). H(f(s)) The discrete adiabatic evolution quantum circuit is continuously acted upon, and the initial quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |b> of the initial Hamiltonian H(0) of the adiabatic evolution, and the final quantum state of the discrete adiabatic evolution quantum circuit corresponds to the eigenstate |A> of the target Hamiltonian H(1) of the adiabatic evolution. -1 b>.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 7.