Quantum circuit simulation method and apparatus, computer device, storage medium, and program product
By converting the UCC factors from exponential form to polynomial form and operating with the wave function, the problem of large calculation amount of UCC quantum circuit simulation is solved, and efficient quantum simulation and fast and convenient quantum state determination are achieved.
Patent Information
- Application Number
- PCT/CN2023/098652
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-01-30
- Filing Date
- 2023-06-06
- Publication Date
- 2024-09-19
AI Technical Summary
When existing technology simulates unitary coupling cluster (UCC) quantum circuits on a classical computer, the amount of calculation is large, making the simulation difficult.
Quantum simulation is achieved by converting the UCC factors from exponential form to polynomial form, including the linear and quadratic terms of the inverse Hermitian excitation operator G, and operating it with the wave function.
It significantly reduces the computational complexity of quantum simulation, improves simulation efficiency, and enables quick and easy determination of the quantum state of the corresponding object of the UCC quantum circuit.
Smart Images

Figure CN2023098652_19092024_PF_FP_ABST
Abstract
Description
Quantum circuit simulation method, device, computer equipment, storage medium and program product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese patent application with application number 202310113388.5 and application date of January 30, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field
[0003] The present application relates to the quantum field, and in particular to a quantum circuit method, apparatus, computer equipment, storage medium and program product. Background Art
[0004] A quantum circuit is a representation of a quantum universal computer, representing the hardware implementation of a corresponding quantum algorithm or program within the quantum gate model. A quantum circuit acts on quantum states, generating new quantum states and performing quantum computations. If a quantum circuit includes adjustable parameters for controlling quantum gates, it is called a parameterized quantum circuit (PQC) or a variational quantum circuit. For example, a unitary coupled-cluster (UCC) quantum circuit is a special type of parameterized quantum circuit, primarily used for quantum computations of the chemical properties of molecular systems.
[0005] Quantum simulation is the use of quantum computers to simulate the motion and evolution of quantum systems. In related technologies, classical simulation schemes for UCC quantum circuits are all based on the idea of faithfully simulating quantum circuits. In quantum circuit implementation, the UCC factor needs to be decomposed into a series of quantum gates. The UCC factor is a component factor in the UCC quantum circuit, namely The entire UCC quantum circuit is obtained by multiplying the UCC factors.
[0006] The UCC factor can be efficiently implemented on quantum circuits, but since the UCC factor is an exponential operation with a large amount of computation, it is difficult to simulate on a classical computer. How to effectively simulate the UCC quantum circuit is an urgent problem that needs to be solved.
[0007] Summary of the Invention
[0008] In order to solve the above technical problems, the embodiments of the present application provide a quantum circuit simulation method, apparatus, computer equipment, storage medium and program product, which effectively improve the efficiency of quantum simulation and achieve the effect of quickly and conveniently determining the quantum state of the object corresponding to the UCC quantum circuit.
[0009] The embodiments of this application disclose the following technical solutions:
[0010] In one aspect, an embodiment of the present application provides a quantum circuit simulation method, applied to a computer device, the method comprising:
[0011] Obtaining a polynomial obtained by transforming the UCC factor, wherein the exponential portion of the UCC factor includes an anti-Hermitian excitation operator G, and the polynomial includes a linear term and a quadratic term of G;
[0012] Obtain N UCC factors for constructing a UCC quantum circuit, where N is an integer and N>1;
[0013] Obtaining a wave function, wherein the wave function is used to characterize the quantum state of the object;
[0014] According to the wave function and the N UCC factors, quantum simulation is performed on the UCC quantum circuit to obtain a result wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial, and the result wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit.
[0015] On the other hand, an embodiment of the present application provides a quantum circuit simulation device, the device comprising an acquisition unit, a determination unit, and a simulation unit:
[0016] The acquisition unit is configured to acquire a polynomial obtained by factoring the UCC, wherein the exponential part of the UCC factor includes an anti-Hermitian excitation operator G, and the polynomial includes a linear term and a quadratic term of G;
[0017] The determining unit is configured to obtain N UCC factors used to construct a UCC quantum circuit and obtain a wave function, wherein the wave function is used to characterize the quantum state of an object corresponding to the UCC quantum circuit, and N is an integer and N>1;
[0018] The simulation unit is configured to perform quantum simulation on the UCC quantum circuit according to the wave function and the N UCC factors to obtain a resulting wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial, and the resulting wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit.
[0019] On the other hand, an embodiment of the present application provides a computer device, the computer device including a processor and a memory:
[0020] The memory is used to store program code and transmit the program code to the processor;
[0021] The processor is configured to execute the method described above according to the instructions in the program code.
[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
[0023] On the other hand, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the above method.
[0024] It can be seen from the above technical solution that the polynomial obtained by converting the UCC factors in exponential form, which includes the linear and quadratic terms of G, is obtained to obtain the wave function of the object quantum state corresponding to the UCC quantum circuit to be simulated and the N UCC factors that characterize the UCC quantum circuit. When performing quantum simulation for the circuit based on the wave function and the UCC factors, each UCC factor is operated on the wave function in the form of a polynomial, and finally the result wave function is obtained after quantum simulation. In the above calculation process, since the polynomial is converted from exponential form to the linear and quadratic terms of G, the computational complexity of the wave function and the UCC factor in quantum simulation is significantly reduced compared to the calculation in exponential form. There is no need to decompose the UCC factor by quantum gate to perform quantum simulation, and the efficiency of quantum simulation is effectively improved, achieving the effect of quickly and conveniently determining the quantum state of the object corresponding to the UCC quantum circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] FIG1 is a schematic diagram of a quantum circuit obtained by decomposing a quantum gate for a UCC factor;
[0027] FIG2 is a schematic diagram of a quantum circuit mode scenario provided in an embodiment of the present application;
[0028] FIG3 is a flow chart of a quantum circuit simulation method provided in an embodiment of the present application;
[0029] Figure 4 is provided in an embodiment of the present application;
[0030] FIG5 is a schematic diagram showing a wave function of a chemical molecule in a configuration space provided by an embodiment of the present application;
[0031] FIG6 is a schematic diagram of an embodiment of the present application providing a method for implementing an operation between an operator G and a wave function through vector feature rearrangement and phase transformation;
[0032] FIG7 is a diagram showing a comparison of effects in a quantum simulation case provided by an embodiment of the present application;
[0033] FIG8 is a device structure diagram of a quantum circuit simulation device provided in an embodiment of the present application.
[0034] FIG9 is a structural diagram of a terminal device provided in an embodiment of the present application;
[0035] FIG10 is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0037] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0039] The embodiments of the present application are described below with reference to the accompanying drawings.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0041] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0042] 1) A quantum circuit is a representation of a quantum universal computer, representing the hardware implementation of a corresponding quantum algorithm or program within a quantum gate model. A quantum circuit acts on quantum states, generating new quantum states and performing quantum computations. If a quantum circuit includes adjustable parameters for controlling quantum gates, it is called a parameterized quantum circuit (PQC) or a variational quantum circuit. For example, a unitary coupled-cluster (UCC) quantum circuit is a special type of parameterized quantum circuit, primarily used for quantum computations of the chemical properties of molecular systems.
[0043] 2) Quantum simulation is the use of quantum computers to simulate the movement and evolution of quantum systems. Through quantum simulation, the processing results of UCC quantum circuits can be quickly simulated: the resulting wave function.
[0044] 3) Quantum computing is a computing method that uses the superposition and entanglement properties of quantum states to quickly complete computing tasks.
[0045] 4) Qubits are the carriers of quantum information. In quantum computing, the unit of quantum information is the qubit, which is similar to a classical bit but incorporates the quantum properties of physical atoms.
[0046] 5) A quantum gate is a fundamental quantum circuit that operates on a small number of qubits. Quantum gates are the foundation of quantum circuits, much like the relationship between logic gates and digital circuits. Quantum gates operate on one or two qubits. A quantum gate operating on one qubit is called a single-qubit gate, while a quantum gate operating on two qubits is called a two-qubit gate. Table 1 below shows some quantum gates and their definitions.
[0047] Table 1 Quantum gates
[0048] 6) Quantum state: The quantum state of a system can be represented as a linear combination of basis states. For example, for a system with 1 qubit, all possible basis states are 0 and 1, while for a system with 3 qubits, all possible basis states are 000, 001, 010, 011, 100, 101, 110, 111, a total of 8. Let these basis states be {φ i}, then the quantum state can be expressed as ∑ i c i φ i , where c i are the linear combination coefficients.
[0049] 7) Full qubit space: The space composed of all basis states of all qubits in the system. If the number of qubits is N, then all basis states are 2 N The size of the full quantum bit space is 2 N .
[0050] 8) UCC quantum circuit: A special parameterized quantum circuit, mainly used for quantum calculation of chemical properties of molecular systems, which can be expressed mathematically as where θ i is a parameter, G i is the anti-Hermitian excitation operator. The unitary coupled cluster quantum circuit is essentially simulating the quantum state of the chemical system. Therefore, based on the variational principle, we can optimize θ i The energy of the molecule or material system can be obtained, and the optimal θ i Other chemical properties can be further calculated later.
[0051] 9) UCC factor: A component factor in the UCC quantum circuit. The i-th UCC factor is denoted as The entire UCC quantum circuit is obtained by multiplying multiple UCC factors.
[0052] 10) Creation and annihilation operators: As shown in Figure 4, the operators acting on quantum states or configurations are denoted as and a i , a particle can be created or annihilated at the i-th quantum bit.
[0053] 11) Wave function. In a broad sense, a wave function is a quantum state. In a narrow sense, a wave function is the representation of a quantum state in a coordinate representation.
[0054] In related technologies, classical simulation schemes for UCC quantum circuits are all based on the idea of faithfully simulating quantum circuits. In quantum circuit implementation, the UCC factor needs to be decomposed into a series of quantum gates. The UCC factor is a component factor in the UCC quantum circuit, namely The entire UCC quantum circuit is obtained by multiplying the UCC factors. This UCC factor can be efficiently implemented in quantum circuits, but when simulated by a classical computer, the result of each quantum gate acting on the quantum state is realized as a matrix-vector multiplication. Therefore, the more quantum gates there are, the more matrix multiplications are required for classical simulation, and the huge computational effort makes classical computer simulation difficult.
[0055] Figure 1 shows a relatively simple quantum gate decomposition result, that is, Figure 1 shows the quantum circuit obtained after the quantum gate decomposition of a UCC factor. Among them, q0-q3 represent quantum bits, and the square or circular nodes in Figure 1 are quantum gates. For example, the square x indicates a processing method similar to the NOT gate, and the circular symbol The processing logic of the instruction is similar to that of controlling a NOT gate, etc.
[0056] In classical simulations, the result of each quantum gate acting on a quantum state is realized as a matrix-vector multiplication. Therefore, the more quantum gates there are, the more matrix multiplications are required for classical simulations.
[0057] It can be seen that the amount of computation and complexity brought by the UCC factor through quantum gate disassembly are considerable.
[0058] To this end, an embodiment of the present application provides a quantum circuit simulation method, which can effectively improve the efficiency of quantum simulation and realize the rapid and convenient determination of the quantum state of the object corresponding to the UCC quantum circuit.
[0059] The quantum circuit simulation method provided in the embodiments of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0060] FIG2 is a schematic diagram of a quantum circuit simulation scenario provided in an embodiment of the present application. In the embodiment of the present application, the server 100 is used as the aforementioned computer device for illustration.
[0061] In order to reduce the computational complexity of quantum simulation, the server 100 can obtain a polynomial converted from the UCC factor in exponential form. Through the above conversion, G in the exponential part of the UCC factor is converted into the linear and quadratic terms of G in the polynomial. For example, the form of the polynomial in Figure 1 is: θG =I+(1-cosθ)G 2 +sinθG (1)
[0062] Where I is the identity matrix, e θG is the UCC factor, θ is a parameter, G is the anti-Hermitian excitation operator, (1-cosθ)G 2 is a quadratic term, and sinθG is a linear term.
[0063] The server 100 determines, based on the UCC quantum circuit to be simulated, a wave function representing the quantum state of the object corresponding to the circuit and N UCC factors representing the circuit. The UCC quantum circuit is set for the object.
[0064] When performing quantum simulation on the circuit based on the wave function and UCC factor, the server 100 operates each UCC factor with the wave function in the form of the aforementioned polynomial, and finally obtains the resulting wave function after quantum simulation. The resulting wave function can represent the quantum state of the object after passing through the UCC quantum circuit.
[0065] Each UCC factor can be operated with the wave function in the form of the aforementioned polynomial in the form of: θG ψ=ψ+(1-cosθ)G 2 ψ+sinθGψ (2)
[0066] where ψ is the wave function.
[0067] Since G is converted from the exponential part to linear and quadratic terms through polynomial transformation, the computational complexity of the wave function and UCC factor in quantum simulation is significantly reduced. Quantum simulation can be performed without decomposing the UCC factor by quantum gates. It also effectively improves the efficiency of quantum simulation and achieves the effect of quickly and conveniently determining the quantum state of the object corresponding to the UCC quantum circuit.
[0068] FIG3 is a flowchart of a method for simulating a quantum circuit according to an embodiment of the present application. In this embodiment, a server is used as the aforementioned computer device for illustration. The method includes:
[0069] S301: Obtain a polynomial obtained by converting the UCC factor.
[0070] The UCC factor is a component factor in the UCC quantum circuit, namely The entire UCC circuit is obtained by multiplying N UCC factors. Because the exponential part of the UCC factor includes the anti-Hermitian excitation operator G, and G is a relatively complex operator, this UCC factor can be efficiently implemented on a quantum circuit, but is difficult to simulate on a classical computer.
[0071] In an embodiment of the present application, in order to improve the efficiency of quantum simulation and reduce the computational complexity of the simulation, the server can convert the UCC factor into a polynomial, or directly obtain the polynomial converted from the UCC factor. The polynomial includes the linear and quadratic terms of G. By converting the UCC factor from an exponential form to a polynomial, the computational complexity of multiplying the UCC factors in quantum calculations is significantly reduced during subsequent quantum simulations, effectively increasing the speed of quantum simulations.
[0072] Among them, quantum computing is a computing method based on quantum logic. The basic unit of data storage is Qubit (quantum bit), which is the basic unit of quantum computing.
[0073] A classical computer (taking a PC as an example) consists of a mainframe, monitor, mouse, keyboard, and other components. The mainframe typically includes a motherboard, power supply, chip, graphics card, hard drive, and other components. These machines occupy a small footprint and can be used at room temperature. A quantum computer (taking a superconducting quantum computer as an example) primarily consists of three components: a quantum chip, a control system, and a cryogenic system. The quantum chip performs computations, while the control system generates, collects, controls, and processes the precise signals required by the quantum chip. The cryogenic system provides a stable operating environment for the quantum chip, including extremely low temperatures and electromagnetic shielding. Quantum computers are large and generally require dedicated facilities for their operation.
[0074] Classical computers use 0 and 1 as the basic units of binary, while quantum computers can process 0 and 1 simultaneously. The system can be in a linear superposition state of 0 and 1: |ψ>=α|0>+β|1>, where α and β represent the complex probability amplitude of the system at 0 and 1, and their squared moduli |α|2, |β| 2 represent the probabilities of being 0 and 1 respectively.
[0075] In a possible implementation, the polynomial is specifically as follows: θG =I+(1-cosθ)G2+sinθG (3)
[0076] Where I is the identity matrix, e θG is the UCC factor, θ is a parameter, and G is the anti-Hermitian excitation operator.
[0077] As mentioned above, in quantum computing related technologies, a large number of matrix multiplications are needed to simulate the UCC factor. The number of matrix multiplications is approximately In the embodiment of the present application, by performing a polynomial expansion of the UCC factor, the matrix multiplication required can be reduced to a constant order of magnitude, i.e., 2 times, thereby significantly reducing the computational complexity of quantum simulation.
[0078] S302: Obtain a wave function for characterizing the quantum state of the object.
[0079] The wave function obtained in step S302 is also called the initial wave function. The initial wave function represents a quantum state of the object and can be determined based on the specific object. For example, if the object is a chemical molecule, the initial quantum state can be represented by a simple Hartree-Fock state in the chemical field, which is generally a vector with only one element being 1, such as [1,0,0,0].
[0080] A quantum state can be understood as the state of an object in a quantum system, which can be represented as various linear combinations of basis states. For example, for a quantum system with one quantum bit, all possible linear combinations of basis states include 0 and 1, while for a quantum system with three quantum bits, all possible linear combinations of basis states include 000, 001, 010, 011, 100, 101, 110, 111, a total of 8. Let these basis states be {φ i}, then the quantum state can be expressed as ∑ i c i φ i , where c i are the linear combination coefficients.
[0081] S303: Obtain N UCC factors for constructing a UCC quantum circuit.
[0082] The UCC quantum circuit is a special parameterized quantum circuit that can be used for quantum calculations of the chemical properties of molecular systems. Mathematically, it can be expressed as where θ i is a parameter, G i is the anti-Hermitian excitation operator, and ψ is the wave function. UCC quantum circuits can be used to simulate the quantum state of objects in chemical systems (such as chemical molecules), so the optimization of θ based on the variational principle is i The energy of the molecule or material system can be obtained, and the optimal θ i Later, other chemical properties can be further calculated.
[0083] Different UCC quantum circuits, or UCC circuits to be simulated, can be designed for different objects or different quantum computing requirements. These differ primarily in the number of quantum states, which is determined by the specific computational object or computational requirements. Quantum computations on these UCC quantum circuits can determine the quantum state of the object after the computation.
[0084] As mentioned above, the UCC quantum circuit can be viewed as the multiplication of multiple UCC factors, so N>1. The N UCC factors are obtained by traversing all single excitation and double excitation operators, specifically by traversing the single excitation and double excitation operators of G and the i, j, k and l indicators in the expression below, and obtaining a total of N 4 The wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit, specifically the probability of the quantum state of the object appearing at a specific time and space.
[0085] In a possible implementation, when the object is a chemical molecule, G can be expressed as follows:
[0086] Single excitation form;
[0087] Double excitation form;
[0088] in, is the operator that generates a particle at the i-th quantum bit, also called the generation operator, a j It is the operator that annihilates a particle at the j-th quantum bit, also recorded as the annihilation operator. Both the generation operator and the annihilation operator are operators acting on quantum states or configurations.
[0089] For example, as shown in Figure 4, numbers 0-7 represent 8 spin orbits, each of which can be represented by a quantum bit. The spin orbit where the arrow is located represents the spin orbit including the particle, and the direction of the arrow indicates the spin direction of the particle. After the indicated operation, a particle is generated on the first and fifth spin orbits respectively, annihilating the particles originally on the third and seventh spin orbits, thereby changing the quantum state of these eight spin orbits from the situation on the left side of Figure 4 to the situation on the right side of Figure 4. If the wave function is represented by the above-mentioned basis state, the quantum state of the situation on the left side of Figure 4 (also known as the basis state combination) is 00110011, and the quantum state of the situation on the right side of Figure 4 (also known as the basis state combination) is 01100110.
[0090] Through single-excitation or double-excitation forms of G, targeted adjustments to the quantum state of chemical molecules can be achieved, thereby improving the quantum computing accuracy of the UCC quantum circuit.
[0091] It should be noted that the embodiment of the present application does not limit G to the above-mentioned single excitation form or double excitation form. G can also be a more complex representation, such as There are more forms of expression such as the three-excitation form.
[0092] S304: Performing quantum simulation on the UCC quantum circuit according to the wave function and the N UCC factors to obtain a result wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial.
[0093] As mentioned earlier, in the form of a polynomial, the operator G is converted from the exponential part where the UCC factor was originally located to the linear and quadratic terms of the polynomial. In operations based on polynomials and wave functions, the matrix multiplication required is reduced to a constant order of magnitude, that is, 2 times.
[0094] In one possible implementation, the operation of each UCC factor in the form of the polynomial with the wave function is performed by the following formula: θG ψ=ψ+(1-cosθ)G 2 ψ+sinθGψ (4)
[0095] where ψ is the wave function.
[0096] Let i be an integer increasing from 1, and i≤N-1, and operate the wave function with a UCC factor (for example, the i-th UCC factor among N UCC factors) to obtain a new wave function, which can be recorded as the wave function corresponding to the i+1th UCC factor. Combined with the above formula (4), the wave function ψi of the i+1th UCC factor is +1 Expressed as:
[0097] Among them, ψ i is the wave function of the ith UCC factor, is the i-th UCC factor.
[0098] The wave function corresponding to the i+1th UCC factor continues to be operated with the i+1th UCC factor, and so on. After the wave function corresponding to the Nth UCC factor is operated with the last (i.e., Nth) UCC factor, the obtained wave function is recorded as the result wave function, which can be used to characterize the quantum simulation results of the UCC quantum circuit.
[0099] Therefore, in one possible implementation, the quantum simulation is performed as follows:
[0100] in, is the i-th UCC factor, ψ is the wave function, and the ψ obtained by operating on the i-th UCC factor is used to operate on the i+1-th UCC factor, i≤N-1.
[0101] More specifically, it can be expressed as:
[0102] Among them, ψ i+1 is the wave function of the i+1th UCC factor, ψ i is the wave function of the i+1th UCC factor. The resulting wave function is used to represent the quantum state of the object simulated by the UCC quantum circuit, that is, the quantum simulation result. For example, when the object corresponding to the UCC quantum circuit is a hydrogen molecule, the resulting wave function can represent the quantum state of the hydrogen molecule after the quantum calculation of the UCC quantum circuit.
[0103] Through efficient quantum simulation, the optimal parameter θ for the UCC quantum circuit can be quickly adjusted based on quantum simulation. i , the parameter θ i It is used to represent the parameter value in the i-th UCC factor. Different UCC factors may have different parameter values, or all or part of the UCC factors may have the same parameter value.
[0104] It can be seen from this that in order to reduce the computational complexity of quantum simulation, a polynomial can be obtained by converting the UCC factors in exponential form. Through the above conversion, the anti-Hermitian excitation operator G in the exponential part of the UCC factors is converted into the linear and quadratic terms of G in the polynomial. According to the UCC quantum circuit to be simulated, the wave function used to represent the quantum state of the object corresponding to the circuit and the N UCC factors representing the circuit are determined. When performing quantum simulation for the circuit based on the wave function and UCC factors, each UCC factor is operated on the wave function in the form of the aforementioned polynomial, and the resulting wave function is finally obtained after quantum simulation. Since the UCC factors are converted from exponential form to the linear and quadratic terms of G through polynomial conversion, the computational complexity of the wave function and UCC factors in quantum simulation is significantly reduced. Quantum simulation can be performed without decomposing the UCC factors through quantum gates. The efficiency of quantum simulation is effectively improved, and the effect of quickly and conveniently determining the quantum state of the object corresponding to the UCC quantum circuit is achieved.
[0105] The objects corresponding to the UCC quantum circuit may involve different fields, such as physics, chemistry, etc., which is not limited in the embodiments of the present application.
[0106] In one possible implementation, when the object is a chemical molecule, the method further includes: determining the molecular energy of the chemical molecule based on the quantum state of the electrons in the chemical molecule represented by the result wave function. The state of the molecule depends on the wave function of the molecule, so the wave function determines the energy of the molecule. The wave function is represented as a vector V, and the A energy operator of the molecule is represented as a sparse matrix A. The molecular energy can be represented as V T AV, V T is the transformed rank matrix of V.
[0107] The different quantum states represented by the resulting wave functions can be used to determine the molecular energy of the chemical molecule, and based on this, other chemical properties of the chemical molecule can be further calculated. This effectively applies the embodiments of the present application to quantum simulations in the field of chemistry, improving the efficiency and practicality of quantum simulations in this field.
[0108] When the object corresponding to the aforementioned UCC quantum circuit is a chemical molecule, the embodiment of the present application provides a method for representing the wave function in the configuration space, which significantly reduces the storage pressure of the wave function on the server.
[0109] When the object is a chemical molecule, the wave function is determined in the following manner: S11: determining the molecular orbital corresponding to the chemical molecule and the position combination of the positions that the electrons of the molecule can occupy in the molecular orbital; S11: generating the wave function represented in the configuration space based on the molecular orbital and the position combination.
[0110] First, the quantum theory knowledge involved in this embodiment is explained:
[0111] Molecular orbital: A tool for describing the electronic state in a molecular system, namely the electron wave function. Unless otherwise specified, it refers to the spatial orbital.
[0112] Space orbitals and spin orbitals: Concepts in molecular orbitals. A space orbital can accommodate two electrons with opposite spins. If a space orbital is artificially divided into two, each of which can accommodate one electron, these orbitals are called spin orbitals.
[0113] Full qubit space: the space composed of all basis states of all qubits in the system. If the number of qubits is N, then all basis states are 2 N The size of the full quantum bit space is 2 N .
[0114] Configuration space: The space describing the ground state of a chemical quantum system is smaller than the full qubit space. This is because electron conservation in chemical quantum systems means that some ground states in the full qubit space cannot occur in chemical systems and can be ignored.
[0115] Configuration: The possible filling forms of electrons in molecular orbitals. Consider a molecule with M electrons and N spatial molecular orbitals, where there are M / 2 spin-up and M / 2 spin-down electrons respectively. Taking the spin-up electron as an example, there are M / 2 electrons in the N / 2 spin orbitals. In which C represents the number of combinations. Considering the spin-down electrons, the total number of configurations is Each configuration can be represented by a quantum bit string such as 0101.
[0116] In the related technologies of quantum simulation, the wave function is stored in the full quantum bit space, which takes up a lot of memory. In the quantum simulation process of the UUC quantum circuit, the classical computer needs to store the state of the full quantum bit space, that is, 2×2 N floating point numbers (the extra multiplication by 2 is due to the coefficient c of each state i is a complex number). In the embodiment of the present application, by representing the quantum state of the chemical molecule corresponding to the UCC quantum circuit in the configuration space, the number of floating-point numbers that need to be stored can be reduced to Where M is the number of electrons and C represents the number of combinations.
[0117] The reason why the number of quantum states required to be stored can be greatly reduced is that the conservation of electrons in chemical quantum systems means that some ground states in the full quantum bit space cannot appear in the chemical system and can be ignored. Therefore, for quantum simulation in the field of chemistry, the possible configurations of the chemical molecule can be determined based on the possible filling forms of the electrons in the molecular orbitals of the chemical molecule corresponding to the UCC quantum circuit, thereby converting the wave function describing the possible filling forms of the electrons in the molecular orbitals in the chemical molecule from the full quantum bit space to represent it in the configuration space.
[0118] By increasing the speed of UCC circuit simulation, the embodiments of the present application can significantly accelerate the design and testing of quantum computational chemistry algorithms in academia and industry, thereby promoting the application of quantum computers and quantum algorithms.
[0119] Figure 5 shows the molecular orbitals of a hydrogen molecule. Molecular orbital theory is fundamental to understanding molecular systems. Molecular orbitals are generated from atomic orbitals, and each orbital can accommodate two electrons with opposite spins. Electrons are assigned to orbitals in order of energy, from lowest to highest.
[0120] A hydrogen molecule has two molecular orbitals, the first numbered 1 and 3, and the second numbered 0 and 2, each representing a spin orbital. The ground state of a hydrogen molecule contains one spin-up electron and one spin-down electron. The spin-up electron can occupy positions 0 and 1, while the spin-down electron can occupy positions 3 and 2. Under these constraints, all possible electron occupations, or all possible configurations, are possible. Figure 5 shows four possible configurations in the configuration space.
[0121] Therefore, the state of a hydrogen molecule can be accurately described in a 4-dimensional configuration space. In quantum computing, a qubit is generally used to represent a spin orbit, so the dimensionality of the entire qubit space is 16. However, this 16-dimensional vector actually has only four non-zero elements; the rest are all 0.
[0122] These four elements, ie, corresponding to the 0101, 1001, 0110 and 1010 elements of the configuration space (represented by the combination of base states, shown from left to right in FIG. 5 ), are not zero.
[0123] It can be seen from this that representing the wave function in the configuration space can effectively free up a large amount of storage space compared to representing the wave function in the full quantum bit space in related technologies. For example, in the above example, if the wave function is represented in the full quantum bit space, the server needs to store a 16-dimensional vector. If the wave function is represented in the configuration space, the server only needs to store a 4-dimensional vector.
[0124] Next, the improvement of the anti-Hermitian excitation operator G in the embodiment of the present application will be further described.
[0125] Because quantum states are represented in configuration space, various operators, such as G, must also be represented in configuration space to improve the efficiency of quantum computations in quantum simulations. While G has a simple matrix representation in full qubit space, it is represented as a more complex sparse matrix in configuration space. Representing quantum states in configuration space will not improve efficiency if G cannot be stored efficiently and its linear or quadratic terms cannot be multiplied with wave functions, such as Gψ.
[0126] In a possible implementation, performing an operation on each UCC factor in the form of the polynomial and the wave function in S303 includes:
[0127] S3031: Determine a first method for determining a result of an operation performed on a linear term of G in the polynomial and the wave function, and a second method for determining a result of an operation performed on a quadratic term of G and the wave function;
[0128] S3032: Obtaining the operation result of each UCC factor and the wave function according to the first operation result determination method and the second operation result determination method.
[0129] The first calculation result determination method and the second calculation result determination method are used to characterize the method by which the corresponding calculation result is obtained. The first calculation result determination method can be determined by the regularity during the calculation process between the linear term of G and the wave function, and the second calculation result determination method can be determined by the regularity during the calculation process between the quadratic term of G and the wave function. These regularities can be the regularity of change between the calculation result and the wave function, or the regularity of change between the intermediate calculation result and the wave function.
[0130] Through the laws represented by these calculation result determination methods, when the server processes the calculation of each UCC factor in the form of a polynomial with the wave function, it does not need to perform actual calculations, but directly derives the calculation results (i.e., new wave functions) based on the above laws. Therefore, it is no longer necessary to represent G in the UCC factor in the configuration space. Instead, in the calculation involving G and the wave function, the above two calculation result determination methods are called to directly determine the calculation results of the wave function with the linear term of G and the quadratic term of G, thereby quickly and conveniently obtaining the calculation results of the UCC factor and the wave function. Since this method does not require the server to maintain the configuration space used to represent G, it only needs to maintain the simple first calculation result determination method and the second calculation result determination method, which significantly saves the server's storage space and can effectively improve the calculation speed of the UCC factor with the wave function, i.e., e θGThe operation speed of ψ.
[0131] In one possible implementation, the first operation result determination method includes a rearrangement of the vector characteristics of the wave function and a phase transformation of the wave function; the second operation result determination method includes a phase transformation of the wave function.
[0132] When the server operates on UCC factors and wave functions, the result is a wave function corresponding to the next UCC factor, or a result wave function. The wave function primarily records the quantum state of the object corresponding to the UCC quantum circuit. The quantum state of any qubit can be represented by possible basis states and their coefficients.
[0133] Therefore, by observing the change in the quantum state of the wave function after each operation, the change pattern of the basis state and basis state coefficient (such as α, β, or the square of the modulus of α, β in the aforementioned definition of the quantum state) of each qubit described by the wave function before and after the operation can be determined. In the embodiment of the present application, the change pattern of the basis state of each qubit described by the wave function is recorded by vector feature rearrangement, and the change pattern of the basis state coefficient of each qubit described by the wave function is recorded by phase transformation.
[0134] Since the particle creation or annihilation guided by any G occurs in pairs, the vector characteristic rearrangement mainly identifies the rearrangement pattern of the basis state coefficients of each qubit in the wave function after the wave function is calculated with the corresponding UCC factor under the influence of the specific G operation. The basis state coefficients will also change regularly under the guidance of G, so the phase shift mainly represents the rearrangement pattern of the basis state coefficients of each qubit in the wave function after the wave function is calculated with the corresponding UCC factor under the influence of the specific G operation.
[0135] The server records these vector feature rearrangements and phase transformations associated with G and wave functions, and classifies and maintains them by performing operations on the linear term of G and the quadratic term of G. This allows the server to no longer store G in the form of a configuration space, but directly stores the vector feature rearrangements and phase transformations associated with G and wave functions, thereby providing result-oriented guidance on operations on UCC factors and wave functions, significantly improving the computational efficiency of this part of the operations in quantum simulation.
[0136] In order to clearly illustrate the above-mentioned vector feature rearrangement and phase transformation associated with G and wave function, a specific exemplary explanation is given below using G as a single excitation form.
[0137] In one possible implementation, when G is in a single excitation form, in the first calculation result determination method, the phase parameter used for the phase transformation is one of -1, 0, and 1; in the second calculation result determination method, the phase parameter used for the phase transformation is one of -1 and 0.
[0138] Assume that the single excitation form of operator G is as follows:
[0139] This section explains how to implement Gψ in configuration space, where i ≠ j. The implementation of the double excitation operator is similar and will not be repeated here.
[0140] When the UCC factor is used to perform operations on the wave function in the form of a polynomial, it is necessary to perform operations on the wave function and the linear term of G, as well as on the quadratic term of G. For example, in one possible implementation described above, the operation of the UCC factor in the form of a polynomial on the wave function can be expressed as: e θG ψ=ψ+(1-cosθ)G 2 ψ+sinθGψ, in this implementation, the operation of the above wave function with the first term of G and the operation of the wave function with the second term of G are: Gψ and G 2 ψ.
[0141] When the operator G is in the form of a single excitation, the ground states in the configuration space can be divided into four categories (as shown in the table below). G has different effects on these states.
[0142] According to the above rules, the implementation of Gψ is divided into two steps:
[0143] Step 1: swap the state where there is no particle at position i and there is a particle at position j with the state where there is a particle at position j and there is no particle at position i, i.e., perform a vector feature rearrangement on the ψ vector;
[0144] Step 2: According to the situations listed in the above table, multiply each element in the ψ vector by a phase to achieve phase transformation. The possible values of the phase parameter are -1, 0, and 1.
[0145] Implement G 2 The method of ψ is as follows: first, G 2 It can be expressed as:
[0146] The base states in the configuration space can be divided into two categories (as shown in the table below). G has different effects on these states.
[0147] Therefore, to achieve G 2ψ only requires one step, that is, multiplying each element in the ψ vector by a phase to achieve phase transformation. The possible values of the phase parameter are -1 and 0.
[0148] In summary, the realization of e θG The steps required for ψ are shown in Figure 6. The two matrix multiplications of the wave function with G are replaced by a vector feature rearrangement and a phase transformation (e.g., by multiplication of a phase parameter).
[0149] After obtaining the latest wave function in the operation, the server determines the corresponding first operation result determination method and second operation result determination method according to the i-th UCC factor corresponding to this operation. For example, when G in the i-th UCC factor is the aforementioned single excitation form, the first operation result determination method is the rearrangement of the eigenvector and the multiplication of the phase for the phase transformation, and the second operation result determination method is the multiplication of the phase for the phase transformation.
[0150] By sequentially executing the first two steps in the dotted box on the left side of Figure 6, the server can convert the operation result of the wave function and the linear term of G, and then multiply the operation result with sinθ to obtain the operation result of sinθGψ.
[0151] By executing the first step in the dotted box on the right side of Figure 6, the server can convert the operation result of the wave function and the quadratic term of G, and then multiply the operation result by (1-cosθ) to obtain (1-cosθ)G 2 The result of the operation of ψ.
[0152] Therefore, for the operation between the wave function and the UCC factor, only the matrix addition operation remains, and the server can quickly obtain the final operation result, that is, the new wave function (for example, the wave function used for operation with the i+1th UCC factor, or the result wave function).
[0153] The quantum simulation solution proposed in the embodiment of the present application can significantly improve the quantum simulation speed of UCC quantum circuits and can be applied to quantum simulation of larger-scale UCC quantum circuits.
[0154] The following table shows the actual time used to simulate the hydrogen chain system using the single double excitation coupled cluster (UCCSD) under the STO-3G basis set. The software involved in the comparison includes the quantum simulation scheme of this application, and some related technologies for quantum simulation, such as Qiskit-Nature, PennyLane, Tequila, and MindQuantum. In addition to this scheme, the calculation speed of other related technologies is roughly on the same order of magnitude, while MindQuantum is relatively fast. The quantum simulation scheme of this application is more than 1000 times faster than MindQuantum in the H8 and H10 systems. On the other hand, the maximum system that can be simulated by other related technologies is basically 20 qubits, while the quantum simulation scheme of this application can complete the quantum simulation of a large quantum system of 32 qubits within an acceptable time, which is a task that all previous related technologies have been unable to accomplish.
[0155] FIG7 shows another application example of the embodiment of the present application, namely the potential energy surface for hydrogen molecules, using a large basis set of cc-pVTZ, and a system size of 56 qubits. The results calculated after quantum simulation using the embodiment of the present application are highly consistent with the exact solution. Moreover, as can be seen from the above table, other related technologies are completely unable to simulate such a large system. However, since the number of electrons in this system is small, the number of configurations is correspondingly small, so the embodiment of the present application can efficiently complete the quantum simulation.
[0156] It can be seen that the calculation results of the quantum simulation achieved by the embodiment of the present application are highly consistent with the exact solution. The calculation result corresponding to the embodiment of the present application is UCCSD (TenCirChem), and the exact solution is FCI (exact).
[0157] The English interpretations in Figure 7 are as follows:
[0158] Energy: molecular energy;
[0159] Hartree: unit of energy;
[0160] Error: error;
[0161] Bond length: bond length; A with a circle on it: bond length unit, 100pm, angstrom;
[0162] Hartree-Fock: Approximate solution of molecular energy by classical calculation;
[0163] FCI (exact): Exact solution of molecular energy by classical calculation;
[0164] IBM Nature 2017: IBM's quantum computing results published in Nature in 2017, https: / / www.nature.com / articles / nature23879;
[0165] UCCSD (TenCirChem): molecular energy obtained using classical simulations of the examples of this application;
[0166] UCCSD Error: The error in the molecular energy obtained using the classical simulation of the embodiment of this application.
[0167] Based on the embodiments corresponding to the aforementioned Figures 1 to 7 , Figure 8 is a device structure diagram of a quantum circuit simulation device provided in an embodiment of the present application. The quantum circuit simulation device 800 includes an acquisition unit 801, a determination unit 802, and a simulation unit 803:
[0168] The acquisition unit 801 is configured to acquire a polynomial obtained by transforming the UCC factor, wherein the exponential part of the UCC factor includes the anti-Hermitian excitation operator G, and the polynomial includes a linear term and a quadratic term of G;
[0169] The determining unit 802 is configured to obtain N UCC factors corresponding to the UCC quantum circuit to be simulated, and obtain a wave function, wherein the wave function is used to characterize the quantum state of the object corresponding to the UCC quantum circuit, and N>1;
[0170] The simulation unit 803 is configured to perform quantum simulation on the UCC quantum circuit according to the wave function and the N UCC factors to obtain a resulting wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial, and the resulting wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit.
[0171] In a possible implementation, the polynomial is specifically: θG =I+(1-cosθ)G 2 +sinθG
[0172] Where I is the identity matrix, e θG is the UCC factor, θ is a parameter, and G is the anti-Hermitian excitation operator;
[0173] The operation of each UCC factor in the form of the polynomial with the wave function is performed by the following formula: θG ψ=ψ+(1-cosθ)G 2 ψ+sinθGψ
[0174] where ψ is the wave function.
[0175] In a possible implementation, when the object is a chemical molecule, G includes the following representation:
[0176] Single excitation form;
[0177] Double excitation form;
[0178] Where a is a quantum bit, is the operator that generates a particle at the ith qubit, a j is the operator that annihilates a particle at the jth quantum bit.
[0179] In one possible implementation, the determination unit is further configured to determine, when the object is a chemical molecule, a molecular orbital corresponding to the chemical molecule and a position combination of positions that the electrons of the molecule can occupy in the molecular orbital; and generate the wave function represented in the configuration space based on the molecular orbital and the position combination.
[0180] In a possible implementation, the simulation unit is further configured to:
[0181] Determine a first method for determining the result of an operation between the linear term of G in the polynomial and the wave function, and a second method for determining the result of an operation between the quadratic term of G and the wave function; obtain the result of an operation between each UCC factor and the wave function according to the first method for determining the result of an operation and the second method for determining the result of an operation.
[0182] In one possible implementation, the first operation result determination method includes a rearrangement of the vector characteristics of the wave function and a phase transformation of the wave function; the second operation result determination method includes a phase transformation of the wave function.
[0183] In one possible implementation, when G is in a single excitation form, in the first calculation result determination method, the phase parameter used for the phase transformation is one of -1, 0, and 1; in the second calculation result determination method, the phase parameter used for the phase transformation is one of -1 and 0.
[0184] In one possible implementation, the quantum simulation is performed by:
[0185] in, is the i-th UCC factor, ψ is the wave function, and the ψ obtained by operating on the i-th UCC factor is used to operate on the i+1-th UCC factor, i≤N-1.
[0186] In a possible implementation manner, the determination unit is further configured to, when the object is a chemical molecule, determine the molecular energy of the chemical molecule according to the quantum state of electrons in the chemical molecule represented by the result wave function.
[0187] It can be seen from this that in order to reduce the computational complexity of quantum simulation, a polynomial can be obtained by converting the UCC factor in exponential form. Through the above conversion, the anti-Hermitian excitation operator G in the exponential part of the UCC factor is converted into the linear and quadratic terms of G in the polynomial. According to the UCC quantum circuit to be simulated, the wave function used to represent the quantum state of the object corresponding to the circuit and the N UCC factors representing the circuit are determined. When performing quantum simulation for the circuit based on the wave function and UCC factors, each UCC factor is operated on the wave function in the form of the aforementioned polynomial, and the resulting wave function is finally obtained after quantum simulation. Since G is converted from the exponential part to the linear and quadratic terms through polynomial conversion, the computational complexity of the wave function and UCC factor in quantum simulation is significantly reduced. Quantum simulation can be performed without the need to decompose the UCC factor through quantum gates. The efficiency of quantum simulation is effectively improved, and the effect of quickly and conveniently determining the quantum state of the object corresponding to the UCC quantum circuit is achieved.
[0188] The present application also provides a computer device, which is the aforementioned computer device and may include a terminal device or a server. The aforementioned quantum circuit simulation device may be configured in the computer device. The computer device is described below with reference to the accompanying drawings.
[0189] If the computer device is a terminal device, as shown in FIG9 , an embodiment of the present application provides a terminal device, taking a mobile phone as an example:
[0190] FIG9 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to FIG9 , the mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will appreciate that the mobile phone structure shown in FIG9 does not limit the mobile phone and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0191] The following is a detailed introduction to the various components of the mobile phone in conjunction with Figure 9:
[0192] The RF circuit 1410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1480 for processing. In addition, the designed uplink data is sent to the base station.
[0193] Memory 1420 can be used to store software programs and modules. Processor 1480 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1420. Memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0194] The input unit 1430 may be configured to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .
[0195] The display unit 1440 may be configured to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441 .
[0196] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
[0197] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.
[0198] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1470, providing users with wireless broadband Internet access.
[0199] The processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.
[0200] The mobile phone also includes a power supply 1490 (such as a battery) for supplying power to various components.
[0201] In the embodiment of the present application, the processor 1480 included in the terminal device also has the following functions:
[0202] Obtain a polynomial obtained by converting the UCC factor, wherein the exponential part of the UCC factor includes an anti-Hermitian excitation operator G, and the polynomial includes a linear term and a quadratic term of G; obtain N UCC factors corresponding to the UCC quantum circuit to be simulated; obtain a wave function, wherein the wave function is used to characterize the N quantum states of the object, N is an integer and N>1; perform quantum simulation on the UCC quantum circuit according to the wave function and the N UCC factors, and during the quantum simulation, operate each UCC factor with the wave function in the form of the polynomial; obtain a result wave function after the quantum simulation, and the result wave function is used to simulate the quantum state corresponding to the object passing through the UCC quantum circuit.
[0203] If the computer device is a server, an embodiment of the present application also provides a server, as shown in Figure 10, which is a structural diagram of a server 1500 provided in an embodiment of the present application. The server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be temporary storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.
[0204] The server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0205] The steps executed by the server in the above embodiment may be based on the server structure shown in FIG10 .
[0206] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0207] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.
[0208] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0209] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0210] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Moreover, based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A quantum circuit simulation method, applied to a computer device, comprising: Obtaining a polynomial obtained by transforming a unitary coupled cluster UCC, wherein the exponential part of the UCC factor includes an anti-Hermitian excitation operator G, and the polynomial includes a first-order term and a second-order term of G; Obtain N UCC factors for constructing a UCC quantum circuit, where N is an integer and N>1; Acquiring a wave function, wherein the wave function is used to characterize a quantum state of an object; According to the wave function and the N UCC factors, the UCC quantum circuit is quantum simulated to obtain a result wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial, and the result wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit.
2. The method according to claim 1, wherein: The polynomial is specifically: θG =I+(1-cosθ)G 2 +sinθG Where I is the identity matrix, e θG is the UCC factor, θ is a parameter, and G is the anti-Hermitian excitation operator; The operation of each UCC factor in the form of the polynomial with the wave function is performed by the following formula: e θG ψ=ψ+(1-cosθ)G 2 ψ+sinθGψ where ψ is the wave function.
3. The method according to claim 1 or 2, wherein: When the object is a chemical molecule, the anti-Hermitian excitation operator G includes the following representations: Single excitation form; Double excitation form; Where a is a quantum bit, is the operator that generates a particle at the ith qubit, a j is the operator that annihilates a particle at the jth qubit.
4. The method according to any one of claims 1 to 3, wherein: When the object is a chemical molecule, the wave function is determined as follows: Determining a molecular orbital corresponding to the chemical molecule and a position combination of positions that the electrons of the molecule can occupy in the molecular orbital; The wave function represented in the configuration space is generated according to the molecular orbital and the position combination.
5. The method according to any one of claims 1 to 4, wherein: The step of operating each UCC factor in the form of the polynomial with the wave function comprises: Determine a first method for determining a result of a first operation performed on a first-order term of G in the polynomial and the wave function, and a second method for determining a result of a second operation performed on a second-order term of G and the wave function; The operation result of each UCC factor and the wave function is obtained according to the first operation result determination method and the second operation result determination method.
6. The method according to claim 5, wherein: The first operation result determining method includes a rearrangement of the vector characteristics of the wave function and a phase transformation of the wave function; the second operation result determining method includes a phase transformation of the wave function.
7. The method according to claim 6, wherein: When G is in single excitation form, in the first calculation result determination method, the phase parameter used for phase transformation is one of -1, 0, and 1, and in the second calculation result determination method, the phase parameter used for phase transformation is one of -1 and 0.
8. The method according to any one of claims 1 to 7, wherein: The quantum simulation is performed by: in, is the i-th UCC factor, ψ is the wave function, and the new ψ obtained by operating ψ with the i-th UCC factor is used to operate with the i+1-th UCC factor, i≤N-1.
9. The method according to any one of claims 1 to 7, wherein: When the object is a chemical molecule, the method further comprises: The molecular energy of the chemical molecule is determined according to the quantum state of the electrons in the chemical molecule represented by the result wave function.
10. A quantum circuit simulation device, comprising an acquisition unit, a determination unit and a simulation unit: The acquisition unit is configured to acquire a polynomial obtained by factoring a unitary coupled cluster UCC, wherein the exponential part of the UCC factor includes an anti-Hermitian excitation operator G, and the polynomial includes a first-order term and a second-order term of G; The determining unit is configured to obtain N UCC factors for constructing a UCC quantum circuit, where N is an integer and N>1, and obtain a wave function, wherein: The wave function is used to characterize the quantum state of the object corresponding to the UCC quantum circuit; The simulation unit is configured to perform quantum simulation on the UCC quantum circuit according to the wave function and the N UCC factors to obtain a result wave function, wherein the quantum simulation is used to operate each UCC factor with the wave function in the form of the polynomial, and the result wave function is used to characterize the quantum state of the object simulated by the UCC quantum circuit.
11. The device according to claim 10, wherein: The determination unit is also configured to determine, when the object is a chemical molecule, a molecular orbital corresponding to the chemical molecule and a position combination of positions that the electrons of the molecule can occupy in the molecular orbital; and generate the wave function represented in the configuration space according to the molecular orbital and the position combination.
12. The device according to claim 10 or 11, wherein: The simulation unit is further configured as: Determine a first method for determining a result of a first operation performed on a first-order term of G in the polynomial and the wave function, and a second method for determining a result of a second operation performed on a second-order term of G and the wave function; The operation result of each UCC factor and the wave function is obtained according to the first operation result determination method and the second operation result determination method.
13. A computer device, comprising a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is configured to execute the method according to any one of claims 1 to 9 according to the instructions in the program code.
14. A computer-readable storage medium, the computer-readable storage medium being used to store a computer program, the computer program being used to execute the method according to any one of claims 1 to 9.
15. A computer program product comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 9.
