Quantum computer and method for producing dummy circuit
By defining the variational form of the scattering matrix based on the Gailman-Lao theorem in quantum computers and optimizing the operator configuration, the problems of high computational complexity and slow optimization convergence are solved, and a hypothetical circuit with low complexity is generated, which improves the approximate accuracy and optimized convergence speed of the ground-state wave function of the quantum system.
Patent Information
- Application Number
- CN202411717454.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-27
- Filing Date
- 2024-11-27
- Publication Date
- 2025-05-27
AI Technical Summary
Existing quantum computing algorithms, such as VQE, QAOA and UCCSD, have problems with high computational complexity, insufficient excited state information and slow optimization convergence, especially when dealing with complex quantum systems.
By defining the variational form of the scattering matrix based on the Gailman-Lao theorem in a quantum computer and calculating the gradient in the operator pool, selecting the operator with great influence in the configuration in the proposed circuit, optimizing the variational parameters to improve the convergence speed.
The proposed circuit with low generation complexity is realized, the approximate accuracy of the ground-state wave function of the quantum system is improved and the optimized convergence speed is optimized, and the depth of the quantum circuit is reduced.
Smart Images

Figure CN120046748A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a quantum computer technology, and more particularly to a quantum computer and method for generating an Ansatz circuit. Background Art
[0002] A variational quantum eigensolver (VQE) can use a quantum computer to calculate the ground-state energy of a quantum system. Currently, VQE can include several algorithms for generating an Ansatz circuit: a quantum approximate optimization algorithm (QAOA), a variational Hamiltonian Ansatz (VHA), or a unitary coupled-cluster singles and doubles (UCCSD).
[0003] However, the above algorithms have some disadvantages. For example, most algorithms can only approximate the ground-state wave function of a quantum system. The approximation result contains less information about excited states. In addition, the functions used in the algorithms increase the computational complexity. For example, the computational complexity of UCCSD and its variant iterative qubit coupled cluster (iQCC) is O(N 4 ), where N is the number of eigenstates. In addition, due to the non-interacting terms of the Hamiltonian function, high-frequency oscillations will appear in the variational wave function, resulting in slower convergence of the optimization. In addition, some algorithms have a very large operator pool size, which in turn leads to an increase in the depth of the quantum circuit. Summary of the Invention
[0004] The present invention provides a quantum computer and method for generating an Ansatz circuit, which can generate an Ansatz circuit with advantages such as low complexity.
[0005] A quantum computer for generating an Ansatz circuit according to the present invention includes a quantum processor and a processor. The processor is coupled to the quantum processor. The processor defines a scattering matrix based on the interaction terms of the Hamiltonian function according to the Gell-Mann and Low theorem. The processor generates a variational form of the scattering matrix. The processor and the quantum processor generate the operators of the Ansatz circuit according to the variational form. The quantum processor performs quantum operations according to the operators to process input data.
[0006] In an embodiment of the present invention, the variational form of the above scattering matrix is where i is a positive integer, θ iis the i-th variational parameter, is the incident momentum k corresponding to two-body scattering of the quantum state 1 and k 2 , and the operator for the momentum difference q before and after scattering, and is the conjugate transpose matrix of.
[0007] In an embodiment of the present invention, the above-mentioned processor obtains an operator pool. The processor uses a quantum processor to perform partial differentiation of the Hamiltonian function with respect to a plurality of variational parameters to obtain a plurality of gradients respectively corresponding to the plurality of variational parameters, where the plurality of gradients includes a maximum gradient. The processor selects an operator from the operator pool according to the maximum gradient.
[0008] In an embodiment of the present invention, the above-mentioned processor generates a threshold according to the maximum gradient. In response to the gradient corresponding to the operator being greater than or equal to the threshold, the processor selects an operator from the operator pool.
[0009] In an embodiment of the present invention, the above-mentioned processor selects a first operator and a second operator from the operator pool, where the first operator corresponds to a first gradient, and the second operator corresponds to a second gradient. The processor sequentially configures the first operator and the second operator in the ansatz circuit according to the first gradient and the second gradient.
[0010] In an embodiment of the present invention, in response to the first gradient being greater than the second gradient, the processor preferentially configures the first operator and then configures the second operator.
[0011] In an embodiment of the present invention, the above-mentioned processor configures an operator in the ansatz circuit to update the ansatz circuit, and optimizes the variational parameters according to the ansatz circuit, where in response to the absolute value of the maximum gradient being less than the gradient threshold, the processor transmits the ansatz circuit to the quantum processor to perform a quantum operation.
[0012] In an embodiment of the present invention, in response to the absolute value being greater than or equal to the gradient threshold, the processor updates the ansatz circuit.
[0013] A method for generating an ansatz circuit according to the present invention includes: defining a scattering matrix based on the Gell-Mann and Low theorem by a processor according to the interaction terms of the Hamiltonian function; generating a variational form of the scattering matrix by the processor; generating an operator of the ansatz circuit by the processor and a quantum processor according to the variational form; and performing a quantum operation on input data by the quantum processor according to the operator.
[0014] Based on the above, the quantum computer of the present invention can define the variational form of the scattering matrix based on the Gell-Mann and Low theorem, and can calculate the gradients of the operators in the operator pool based on the variational form. The quantum computer can select the operators that have a greater influence on the ansatz circuit according to the gradients, and can sequentially configure the operators in the ansatz circuit according to the gradients. After performing multiple iterative operations until the operators converge, the quantum computer can generate the final version of the ansatz circuit. The quantum processor can perform quantum operations according to the ansatz circuit to solve the eigenstates of the Hamiltonian function. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 FIG. 1 shows a schematic diagram of a quantum computer for generating an ansatz circuit according to an embodiment of the present invention;
[0016] Figure 2 FIG. 2 shows a flowchart of a method for generating an ansatz circuit according to an embodiment of the present invention;
[0017] Figure 3 FIG. 3 shows a flowchart of a method for generating an ansatz circuit according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals will be used in the drawings and the description to refer to the same or like parts.
[0019] Figure 1 FIG. 1 shows a schematic diagram of a quantum computer 100 for generating an ansatz circuit according to an embodiment of the present invention. The quantum computer 100 may include a processor 110 and a quantum processor 120, wherein the processor 110 may be coupled to the quantum processor 120. The processor 110 may be a classical processor.
[0020] The processor 110 is, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose micro control unit (MCU), microprocessor, digital signal processor (DSP), programmable controller, application specific integrated circuit (ASIC), graphics processing unit (GPU), image signal processor (ISP), image processing unit (IPU), arithmetic logic unit (ALU), complex programmable logic device (CPLD), field programmable gate array (FPGA), or other similar components or a combination of the above components.
[0021] In one embodiment, the processor 110 may be coupled to a storage medium or a transceiver. The processor 110 accesses and executes multiple modules stored in the storage medium to perform various functions of the quantum computer 100. The processor 110 may communicate with an external electronic device through the transceiver to receive or transmit data. The above storage medium is, for example, any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk drive (HDD), solid state drive (SSD), or similar components or a combination of the above components.
[0022] The proposed circuit can be configured with one or more quantum gates. The quantum gates are formed by operators and can be used to change the behavior of qubits (e.g., rotation angle or phase). The quantum processor 110 can perform quantum operations such as quantum superposition or quantum entanglement using qubits based on the proposed circuit. The quantum operations can change the quantum states of the qubits, such as the initial state, incident state, final state, intermediate state, eigenstate, superposition state, or entangled state.
[0023] Figure 2 A flowchart showing a method for generating a proposed circuit according to an embodiment of the present invention, wherein the generating method can be implemented by the quantum computer 100 as shown in Figure 1 shown.
[0024] In step S201, the processor 110 can obtain the Hamiltonian function H. For example, the processor 110 can receive the Hamiltonian function H that the user wants to solve from an external electronic device through a transceiver. The processor 110 can obtain an operator pool based on the Hamiltonian function H.
[0025] Specifically, the total energy of a quantum system is as shown in Equation (1), where H is the Hamiltonian function based on the Hubbard model, H 0 is the non-interacting term, H int is the interacting term, g is the coupling constant, ∈k is the energy of momentum k (dispersion relation), μ is the chemical potential, is the annihilation operator, is the conjugate transpose matrix of, U is the interaction strength, k 1 and k 2 are the incident momenta of two-body scattering, and is the corresponding two-body scattering incident momentum k 1 and k 2The operator for the momentum difference q before and after scattering.
[0026] H = H 0 + gH int (1)
[0027]
[0028] In the interaction picture, the wave function and operator of the quantum system are shown in Equation (2), where |Ψ G (t)> is the ground state vector of the wave function at time t, |Ψ G (0)> is the ground state vector of the wave function at time t = 0, and is the operator at time t.
[0029]
[0030] In the interaction picture, the evolution process of the quantum system from the initial state to the final state is shown by the Gellman-Low theorem of Equation (3), where |Ψ G (0)> is the ground state vector of the wave function at t = 0, S(0, -∞, g) is the scattering matrix from time t = 0 to t = -∞ when the coupling constant is g, and |Ψ 0 > is the ground state vector of H 0 .
[0031] |Ψ g (0)> = S(0, -∞, g)|Ψ 0 > (3)
[0032] Processor 110 can define the scattering matrix as shown in Equation (4) based on the Gellman-Low theorem, where S(t, t int , g) is the scattering matrix from time t to time t′ when the coupling constant is g, T is the time-ordered operator, and ′ is the interaction Hamiltonian in the interaction picture at time t at time t 1 .
[0033]
[0034] Processor 110 can perform the Jordan-Wigner (JW) transformation on any real symmetric Hamiltonian function, including the Hubbard model and most time-reversal symmetric systems. In the representation of the JW basis, the Hamiltonian function remains a real symmetric matrix, and the ground state wave function |Φ 0 > is a real vector.
[0035] Processor 110 can define a variational form of the scattering matrix S(t,t ′ ,g) based on the scattering matrix S(t,t ′ ,g) as shown in Equation (4). As shown in Equation (5), where i is the index of the operator in the operator pool and i is a positive integer, θ i is the i-th variational parameter, is the operator corresponding to the incident momentum k 1 and k 2 in two-body scattering, and the momentum difference q before and after scattering, and is 's conjugate transpose matrix. The initial value of the variational parameter θ i can be 0.
[0036]
[0037] Processor 110 can obtain an operator pool corresponding to the Hubbard model. The operators in the operator pool satisfy Equation (6), where is the operator for creating a quantum with momentum (k 1 +q) and spin up, is the operator for creating a quantum with momentum (k 2 -q) and spin down, is the operator for annihilating a quantum with momentum k 2 and spin down, and is the operator for annihilating a quantum with momentum k 1 and spin up.
[0038]
[0039] Processor 110 can define according to the operator as shown in Equation (7).
[0040]
[0041] Upon obtaining After that, the variational form can be equivalent to Equation (8). corresponds to the quantum logic gate formed by the operator and corresponds to the variational parameter θ to be optimized i , where represents the set of all selected logic gates updated on the ansatz circuit.
[0042]
[0043] In step S202, the processor 110 can generate an initial ansatz circuit representing a non-interacting ground state. The processor 110 can generate a ground state quantum circuit corresponding to the non-interaction term as the initial ansatz circuit.
[0044] In step S203, the processor 110 can calculate the gradient of the operator. In one embodiment, before step S208 has not been executed, the processor 110 can select one or more operators from the operator pool and calculate the gradient of each operator. In one embodiment, after step S208 has been executed, the processor 110 can calculate the gradient of each operator configured for the ansatz circuit in step S203, where the number of operators configured for the ansatz circuit can be less than the number of all operators in the operator pool.
[0045] Specifically, the processor 110 can use the quantum processor 120 to perform partial differentiation of the Hamiltonian function H with respect to multiple variational parameters to respectively obtain multiple gradients corresponding to the multiple variational parameters As shown in Equation (9), where <Ψ(θ)|H|Ψ(θ)> represents performing a measurement on the Hamiltonian function H using the quantum processor 120, and represents performing a measurement on the Hamiltonian function H corresponding to using the quantum processor 120.
[0046]
[0047] In step S204, the processor 110 can determine whether the operator converges according to the gradient of the operator. A configurable and updatable operator is provided on the trial circuit, where the operator can be used to form quantum gates on the trial circuit. Assume that the gradient of the operator with the largest gradient in the current trial circuit is y. If the absolute value of y is less than the gradient threshold, the processor 110 can determine that the operator on the trial circuit has converged, and thus decide to end the process. The processor 110 can transmit information such as the current trial circuit and the optimized variational parameters to the quantum processor 120. The quantum processor 120 can perform quantum operations (e.g., calculating the eigenstate of the Milton function) according to the information such as the trial circuit (or operator) and the variational parameters. On the other hand, if the absolute value of y is greater than or equal to the gradient threshold, the processor 110 can determine that the operator on the trial circuit has not converged, and execute step S205 again.
[0048] It should be noted that in the first execution of step S204, the operator on the initial trial circuit has not been updated. The processor 110 cannot determine whether the operator on the trial circuit converges. Therefore, the processor 110 can skip the first execution of step S204 and execute step S205.
[0049] In step S205, the processor 110 can select an operator from the operator pool. Specifically, after obtaining the gradients of the operators in the operator pool, the processor 110 can select the maximum gradient and determine a threshold according to the maximum gradient. The processor 110 can select the operators whose gradients are greater than or equal to the threshold from the operator pool, as shown in formula (10), where is the maximum gradient, 0 < r < 1 and r is a positive number (e.g., r = 0.1), and is the threshold. That is, the processor 110 can select the operator corresponding to that meets formula (10) from the operator pool The operator selected by the processor 110 (or ) has a more significant impact on the result of the quantum operation.
[0050]
[0051] In step S206, the processor 110 can update the trial circuit according to the selected one or more operators. In one embodiment, the processor 110 can configure the operators on the trial circuit in sequence according to the gradients of multiple operators. The variational parameter θ of the operator initially configured on the trial circuit iThe initial value of [[ID=]] can be 0. For example, assume that the selected operators include a first operator with a first gradient and a second operator with a second gradient. If the first gradient is greater than the second gradient, the processor 110 may preferentially configure the first operator on the candidate circuit and then configure the second operator on the candidate circuit. That is, the greater the gradient of the operator, the higher the priority of the operator being configured on the candidate circuit. The smaller the gradient of the operator, the lower the priority of the operator being configured on the candidate circuit.
[0052] After completing the update of the candidate circuit, in step S207, the processor 110 may optimize the variational parameters corresponding to the candidate circuit based on an optimization algorithm according to the candidate circuit. The optimization algorithm can be determined by the user according to requirements, and the present invention does not limit it.
[0053] In step S208, during the process of performing the optimization of the variational parameters, the processor 110 may determine whether the variational parameter θ i converges. If the variational parameter θ i has not converged, the processor 110 executes step S207 to continue the optimization. If the variational parameter θ i has converged, the processor 110 may complete the optimization and execute step S203.
[0054] After completing Figure 2 the process and generating the final candidate circuit, the processor 110 may transmit the configuration of the candidate circuit to the quantum processor 120, where the configuration may include information such as the candidate circuit, the operators on the candidate circuit, and the optimized variational parameters corresponding to the candidate circuit. The quantum processor 120 may perform a quantum operation according to the operators on the candidate circuit and the variational parameters to process the input data. For example, the quantum processor 120 may perform a quantum operation according to the candidate circuit to solve the eigenstate of the Hamiltonian function H.
[0055] Figure 3 According to an embodiment of the present invention, a flowchart of a method for generating a candidate circuit is shown, where the method may be implemented by the quantum computer 100 as shown in Figure 1 In step S301, the processor defines a scattering matrix based on the interaction terms of the Hamiltonian function according to the Gell-Mann and Low theorem. In step S302, the processor generates a variational form of the scattering matrix. In step S303, the processor and the quantum processor generate the operators of the candidate circuit according to the variational form. In step S304, the quantum processor performs a quantum operation according to the operators to process the input data.
[0056] In summary, the present invention proposes a new VQE architecture and method. Compared with the traditional VQE architecture, the method based on the perturbative interaction picture in the present invention approximates the S matrix order-by-order to accelerate the initial convergence. The method can select appropriate parameters to further improve the convergence. Compared with the operator pool of UCCSD, the present invention has an operator pool with a smaller size, reducing the depth of the quantum circuit. Compared with UCCSD which only contains information of single excitations and double excitations, the output generated by the present invention can contain information of all possible excitations.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A quantum computer for generating a proposed circuit, characterized in that: include: Quantum processors; as well as A processor coupled to the quantum processor, wherein The processor defines a scattering matrix based on interaction terms of the Hamiltonian function based on the Gelman-Law theorem; The processor generates a variational form of the scattering matrix; The processor and the quantum processor generate operators of the proposed circuit according to the variational form; and The quantum processor performs a quantum operation according to the operator to process input data.
2. The quantum computer according to claim 1, wherein the variational form of the scattering matrix is Where i is a positive integer, θ i is the ith variational parameter, is the operator corresponding to the incident momenta k1 and k2 of the quantum two-body scattering, and the difference q of the momentum before and after scattering, and for The conjugate transposed matrix of .
3. The quantum computer according to claim 2, wherein The processor obtains an operator pool; The processor uses the quantum processor to perform partial differentiation of a plurality of variational parameters on the Hamiltonian function to obtain a plurality of gradients respectively corresponding to the plurality of variational parameters, wherein the plurality of gradients includes a maximum gradient; and The processor selects the operator from the operator pool according to the maximum gradient.
4. The quantum computer according to claim 3, wherein The processor generates a threshold value according to the maximum gradient; and In response to the gradient corresponding to the operator being greater than or equal to the threshold, the processor selects the operator from the operator pool.
5. The quantum computer according to claim 3, wherein The processor selects a first operator and a second operator from the operator pool, wherein the first operator corresponds to a first gradient and the second operator corresponds to a second gradient; and The processor sequentially arranges the first operator and the second operator in the proposed circuit according to the first gradient and the second gradient.
6. The quantum computer according to claim 5, wherein In response to the first gradient being greater than the second gradient, the processor configures the first operator first and then configures the second operator.
7. The quantum computer according to claim 3, wherein The processor configures the operator on the assumed circuit to update the assumed circuit, and optimizes the variational parameter according to the assumed circuit, wherein In response to an absolute value of the maximum gradient being less than a gradient threshold, the processor transmits the proposed circuit to the quantum processor to perform the quantum operation.
8. The quantum computer according to claim 7, wherein In response to the absolute value being greater than or equal to the gradient threshold, the processor updates the proposed circuit.
9. A method for generating a hypothetical circuit, characterized in that: include: defining, by a processor, a scattering matrix based on interaction terms of the Hamiltonian function based on the Gel-Mann-Law theorem; generating, by the processor, a variational form of the scattering matrix; The processor and the quantum processor generate operators of the proposed circuit according to the variational form; and A quantum operation is performed by the quantum processor according to the operator to process input data.