Method for generating quantum circuit and related device
By screening the same method of irreducible representation of the excitation configuration, a shallower quantum circuit is generated, which solves the problem of excessive resource consumption in the VQE method, improves computing efficiency and meets the chemical accuracy requirements.
Patent Information
- Application Number
- CN201911119363.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-15
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2039-11-15
AI Technical Summary
In quantum chemistry simulation, the Variable Quantum Solving Eigenvalue Method (VQE) method increases the depth of quantum circuits and the number of excitation configurations, resulting in excessive resource consumption and low computational efficiency.
By determining the reference state and excitation configuration of the target molecule, the excitation configuration that is irreducible is selected to generate shallower quantum circuits, reduce the number of quantum gates and layers, and improve the calculation efficiency.
It effectively reduces the depth and resource consumption of quantum circuits, improves computing efficiency, and ensures that chemical accuracy meets preset needs.
Smart Images

Figure CN112819167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computers, and more specifically, to methods and related devices for generating quantum circuits. Background Art
[0002] Quantum computers are new computers based on quantum mechanics properties such as quantum superposition and quantum entanglement. Quantum computers can compress computing tasks that would take tens of thousands of years for classical computers into just a few hours or minutes. At the application level, quantum computers can be used in new material research and development, drug design, encryption systems, complex optimization scheduling and other fields. Currently, the world's top technology companies and countries such as China, the United States, the European Union, and the United Kingdom have invested heavily in the research of quantum computers.
[0003] Quantum chemistry is a discipline that studies chemical problems based on the principles of quantum mechanics. Quantum chemistry is a discipline that studies the chemical properties of molecules based on wave functions by solving the Schrödinger equation to obtain wave functions that describe the distribution of electrons in molecules. Quantum chemical simulation can simulate the process of solving the molecular ground state based on quantum computers or quantum computer simulators running on classical computers. Quantum chemical simulation may be the first application scenario to demonstrate the computing power of quantum computers.
[0004] The Variational Quantum Eigensolver (VQE) is a method for implementing quantum chemistry simulation to solve the ground state. VQE can combine the advantages of quantum computers and classical computers. Quantum computers implement the preparation and measurement of trial states (ansatz) based on quantum circuits. The classical computer sums the energy values corresponding to the trial state measurements, updates the parameters using an optimization algorithm, and feeds the updated parameters back to the quantum computer, and repeats this cycle until the energy converges. The depth of the quantum circuit is proportional to the number of excited configurations. The more excited configurations there are, the deeper the quantum circuit is, the more quantum gates are required, and the greater the consumption of resources. Summary of the invention
[0005] The present application provides a method and related equipment for generating quantum circuits, which can reduce the depth of the generated quantum circuits, reduce the number of quantum gates and layers, improve computing efficiency, and reduce resource consumption.
[0006] In the first aspect, the embodiment of the present application provides a method for generating a quantum circuit, including: determining a reference state of a target molecule and N excitation configurations corresponding to the reference state, where N is a positive integer greater than or equal to 1; determining M excitation configurations from the N excitation configurations according to the properties of the reference state and the properties of the N excitation configurations, where M is a positive integer greater than or equal to 1 and less than or equal to N; and generating a first quantum circuit according to the M excitation configurations. The above technical solution can reduce the number of excitation configurations used to generate the first quantum circuit, thereby reducing the depth of the quantum circuit, reducing the number of quantum gates and layers, improving computing efficiency, and reducing resource consumption.
[0007] In combination with the first aspect, in a possible implementation of the first aspect, M excitation configurations are determined from the N excitation configurations based on properties of the reference state and properties of the N excitation configurations, including: determining an irreducible representation of the reference state and an irreducible representation of each of the N excitation configurations; determining the M excitation configurations from the N excitation configurations based on the irreducible representation of the reference state and the irreducible representation of each of the N excitation configurations, wherein the irreducible representation of each of the M excitation configurations is the same as the irreducible representation of the reference state.
[0008] In combination with the first aspect, in a possible implementation of the first aspect, the determining of the irreducible representation of the reference state and the irreducible representation of each of the N excited configurations includes: determining the irreducible representation of the reference state according to the group table and the molecular orbital information of the reference state of the target molecule; determining the irreducible representation of each of the N excited configurations according to the group table and the molecular orbital information of each of the N excited configurations. Using the group table to determine the irreducible representation of the excited configuration and the reference state is time-saving and simple to implement.
[0009] In combination with the first aspect, in a possible implementation of the first aspect, generating a first quantum circuit according to the M excitation configurations includes: determining the energy of the reference state and the energy of each excitation configuration in the M excitation configurations after the reference state is corrected; respectively obtaining the difference between the energy of each excitation configuration in the M excitation configurations after the reference state is corrected and the energy of the reference state, so as to obtain M energy differences corresponding to the M excitation configurations; sorting the M excitation configurations according to the order of the absolute values of the M energy differences from large to small to obtain the sorted M excitation configurations; and sorting the M excitation configurations according to the M energy differences and the energy of the first excitation configuration. A preset energy value is provided, and T excitation configurations are determined from the sorted M excitation configurations, wherein the T excitation configurations are respectively from the 1st excitation configuration to the Tth excitation configuration among the sorted M excitation configurations, and the absolute value of the energy difference corresponding to each excitation configuration among the T excitation configurations is greater than or equal to the first preset energy value, and the absolute value of the energy difference corresponding to the T+1th excitation configuration to the Mth excitation configuration among the sorted M excitation configurations is less than the first preset energy value, and T is a positive integer greater than or equal to 1 and less than M; and the first quantum circuit is generated according to the T excitation configurations.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, the M excitation configurations are determined from the N excitation configurations based on the properties of the reference state and the properties of the N excitation configurations, including: determining the energy of the reference state and the energy of each of the N excitation configurations after correction of the reference state; respectively obtaining the difference between the energy of each of the N excitation configurations after correction of the reference state and the energy of the reference state to obtain N energy differences corresponding to the N excitation configurations; and determining the M excitation configurations from the N excitation configurations based on the N energy differences and a first preset energy value, wherein the absolute value of the energy difference corresponding to each of the M excitation configurations is greater than or equal to the first preset energy value.
[0011] In combination with the first aspect, in a possible implementation of the first aspect, the M excitation configurations are determined from the N excitation configurations according to the N energy differences and a first preset energy value, including: sorting the N excitation configurations in descending order according to the absolute values of the N energy differences to obtain sorted N excitation configurations; determining the M excitation configurations from the sorted N excitation configurations according to the absolute values of the N energy differences and the first preset energy value, wherein the M excitation configurations are respectively the 1st excitation configuration to the Mth excitation configuration among the sorted N excitation configurations, and the absolute values of the energy differences corresponding to the M+1th excitation configuration to the Nth excitation configuration among the sorted N excitation configurations are less than the first preset energy value.
[0012] In combination with the first aspect, in a possible implementation of the first aspect, the method further includes: calculating the ground state energy value of the first molecule according to the first quantum circuit; determining that the difference between the ground state energy value of the first molecule and the ground state energy value of the reference molecule is greater than a second preset energy value; generating a second quantum circuit according to the M+1th to M+Kth excitation configurations among the M excitation configurations and the sorted N excitation configurations, wherein K is a positive integer greater than or equal to 1 and the sum of M and K is less than or equal to N. Based on the above technical solution, the determined quantum circuit can make the chemical accuracy of the UCCSD-VQE calculation result meet the preset requirements.
[0013] In a second aspect, an embodiment of the present application provides a computer device, which includes a module for implementing the first aspect or any possible implementation manner of the first aspect.
[0014] In a third aspect, an embodiment of the present application provides a computer device, which includes a unit for implementing the method of the first aspect or any possible implementation of the first aspect. The computer device can be a computer device or a component (such as a chip, circuit, etc.) for a computer device.
[0015] In a fourth aspect, an embodiment of the present application provides a computer device, comprising a transceiver and a processor. Optionally, the computer device also includes a memory. The processor is used to control the transceiver to send and receive signals, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device performs the method in any possible implementation of the method design of the first aspect above.
[0016] In a fifth aspect, an embodiment of the present application provides a computer system, which may include a quantum computer and a classical computer, or may include components for a quantum computer and components for a classical computer. The computer system may implement the method of the first aspect or any possible implementation of the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a chip, comprising: a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the method of the above-mentioned first aspect or any possible implementation method of the first aspect.
[0018] The seventh method, an embodiment of the present application provides a computer-readable medium, which stores a program code. When the computer program code runs on a computer, the computer executes the method of the first aspect above or any possible implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 Schematic diagram showing three different electronic configurations of a molecule.
[0020] Figure 2 It is a schematic flow chart of a calculation using the UCCSD-VQE method provided by an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of a group table.
[0022] Figure 4 It is a schematic flowchart of a method for generating a quantum circuit according to an embodiment of the present application.
[0023] Figure 5 It is a schematic flow chart of another method for generating a quantum circuit provided according to an embodiment of the present application.
[0024] Figure 6 It is a schematic flowchart of a method for generating a quantum circuit according to an embodiment of the present application.
[0025] Figure 7 It is a schematic structural block diagram of a computer device provided according to an embodiment of the present application.
[0026] Figure 8 It is a structural block diagram of a classic computer provided in an embodiment of the present application.
[0027] Fig. 9 It is a structural block diagram of a quantum computer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0029] The present application will present various aspects, embodiments or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0030] In addition, in the embodiments of the present application, words such as "exemplary" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0031] In the embodiments of the present application, "corresponding (corresponding, relevant)" and "corresponding (corresponding)" can sometimes be used interchangeably. It should be pointed out that when the distinction between them is not emphasized, the meanings they intend to express are consistent.
[0032] In the embodiments of the present application, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0033] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0034] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0035] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0036] In order to help those skilled in the art better understand the technical solution of the present application, some basic concepts involved in the present application are first briefly introduced.
[0037] Schrödinger equation
[0038] Schrödinger equation ( The Schrodinger wave equation, also known as the Schrodinger wave equation, is a basic equation in quantum mechanics proposed by Austrian physicist Erwin Schrodinger. It is also a basic assumption of quantum mechanics. Quantum chemistry is a discipline that applies the principles of quantum mechanics to study chemical problems, including molecular structure, interactions between molecules, collisions and chemical reactions. The most important problem in classical chemical calculations is to solve the ground state energy. In principle, computational chemistry is very simple, and its corresponding accurate Schrodinger equation can be written. However, in practice, due to the exponential growth of computing resources, the scale of molecules to be accurately solved is very small, so the multi-body Schrodinger equation is difficult to solve using classical computers. Molecular systems are essentially quantum systems, and it is more efficient to use quantum computers to simulate quantum systems. Based on the characteristics of quantum computers such as quantum superposition and quantum entanglement, the solution of molecular ground state problems can be accelerated, and the "exponential wall" problem in classical methods such as the full configuration interaction method can be resolved. At present, due to the scarcity of quantum resources, the industry focuses on using the variational quantum eigensolver (VQE) to solve the ground state wave function. For VQE, a good trial state can reduce the number of iterations and allow the wave function to quickly converge to the ideal unknown ground state wave function.
[0039] Trial State
[0040] Ansatz can also be called a hypothetical state. Ansatz is to make an assumption first, and then perform a series of calculations according to this assumption, and use the results to test whether the initial assumption is valid. When a problem is difficult to solve with a direct method, ansatz is often the starting point for solving the problem.
[0041] Wavefunction
[0042] By solving the Schrödinger equation, we can find the wave function Ψ that describes the motion state of electrons in molecules. Ψ is called a molecular orbital.
[0043] Molecular Orbital
[0044] Each molecular orbital describes the distribution of an electron in space, and its corresponding eigenvalue is the energy of the molecular orbital. The lower the energy, the more stable it is.
[0045] configuration
[0046] By solving the Schrödinger equation for molecules under a certain approximation, a series of molecular orbitals arranged from high to low energy can be solved for a specific molecule. Each orbital can accommodate up to two electrons, and the two electron spins must be different. Different arrangements of electrons in this series of molecular orbitals can form different configurations.
[0047] Ground State
[0048] In quantum mechanics, a system (such as an atom or a molecule) can be in a superposition of one or more of a series of quantum states, where the quantum state with the lowest energy is called the ground state.
[0049] Reference state
[0050] The configuration with the lowest energy and the most stable among all configurations can be called the reference state. In the molecular orbital corresponding to the reference state, all electrons are arranged in order starting from the orbit with the lowest energy. The reference state is not necessarily the ground state. Because when solving the Schrödinger equation, certain approximations are introduced. Therefore, the configuration with the lowest energy is not necessarily the true ground state. The true ground state needs to be described by multiple different configurations including the reference state.
[0051] single excitations
[0052] Compared to the reference state, one electron has a different orbital arrangement, which is equivalent to an electron in the reference state jumping to a higher energy orbit.
[0053] Double excitations:
[0054] Compared with the reference state, there are two electrons arranged in different orbits, which is equivalent to two electrons in the reference state jumping to orbits with higher energy.
[0055] Single excitation state
[0056] The configuration formed after the reference state undergoes single excitation is called a single excited state.
[0057] Double excitation state
[0058] The configuration formed after the reference state is double excitation is called double excited state.
[0059] Single excitation configuration and double excitation configuration can be collectively referred to as excited configuration.
[0060] Figure 1 The figure shows the three different electronic configurations of a molecule. Figure 1 As shown, Figure 1a, b and c in the figure are schematic diagrams of three different electronic configurations of beryllium hydride (BeH2) molecules. According to point group theory, BeH2 molecules have D2h symmetry. D2h symmetry has eight different irreducible representations, namely A g , B 1g , B 2g , B 3g , A u , B 1u , B 2u , B 3u The BeH2 molecule has a total of seven molecular orbitals under the sto3g basis set. Figure 1 Figures a, b and c show the molecular orbital diagrams of the reference state, a single excited configuration and a double excited configuration of the BeH2 molecule and the irreducible representations corresponding to each molecular orbital. Figure 1 The seven molecular orbitals shown are arranged from low to high energy, and the irreducible representations are A g , B 1u , A g , B 2u , B 3u , B 1u and A g For ease of description, the seven molecular orbitals are referred to as the first molecular orbital to the seventh molecular orbital in order of energy value from low to high. In other words, the energy value of the first molecular orbital is the lowest, and the energy value of the seventh molecular orbital is the highest.
[0061] Figure 1 a in the figure shows the electronic configuration of the reference state of the BeH2 molecule. The three molecular orbitals with the lowest energy (i.e., the first to third molecular orbitals) are doubly occupied (i.e., have two electrons), and the remaining four molecular orbitals are empty orbitals (no electrons).
[0062] Figure 1 Figure b shows the electronic configuration of the single excited state of the BeH2 molecule. It can be seen that an electron in the third orbit of the reference state jumps to the fourth orbit, thus forming the following Figure 1 The single excited configuration shown in b.
[0063] Figure 1 Figure c shows the electronic configuration of the double excited configuration of the BeH2 molecule. It can be seen that the two electrons in the third orbit of the reference state jump to the fourth orbit, thus forming Figure 1 The double excitation configuration shown in c.
[0064] Unitary Coupled Cluster of Single and Double excitations (UCCSD) algorithm
[0065] The UCCSD algorithm is an improvement on the traditional Couple Cluster (CC) algorithm to adapt to the unitary evolution of quantum computers. The Unitary Couple Cluster (UCC) algorithm is an improvement on the traditional CC algorithm, making it run on quantum computers. The UCCSD algorithm is a subclass of the UCC algorithm that considers single excited states and double excited states.
[0066] Figure 2 It is a schematic flow chart of a calculation using the UCCSD-VQE method provided by an embodiment of the present invention.
[0067] 201, selecting a configuration of a target molecule.
[0068] 202, using the selected configuration and parameters Generate parameterized subcircuits.
[0069] 203, applying the parameter-containing quantum circuit to the reference state to prepare a test state.
[0070] 204 , measuring the prepared trial state and transmitting the measurement data to a classical computer.
[0071] The measuring of the prepared trial state may include: measuring the expected value of each sub-operator of Hamiltonian on the trial state.
[0072] In quantum mechanics, the Hamiltonian is an observable that corresponds to the total energy of the system.
[0073] 205 , calculating the overall energy expectation value of the Hamiltonian operator according to the acquired measurement data.
[0074] 206 , determine the overall energy expectation value of the Hamiltonian operator. If converged, end the UCCSD-VQE calculation process. If not converged, execute step 206 .
[0075] The energy and energy expectation value referred to in the embodiments of the present application have the same meaning.
[0076] 207, Update parameters And the updated parameters Send to quantum computer
[0077] The classical computer can use optimization algorithms such as conjugate gradient, stochastic gradient, and limited memory BFGS (limited memory BFGS, L-BFGS) algorithm to optimize the parameters. Update and send the updated parameter θ to the quantum computer.
[0078] After receiving the updated parameters, the quantum computer Then, continue the above process until the overall energy expectation value of the Hamiltonian operator converges.
[0079] Step 202, step 203, and step 204 can be implemented by a quantum computer or a quantum computer simulator running in a classical computer, and steps 205 to 207 can be implemented by a classical computer. Step 201 can be implemented by a classical computer, or by a combination of a classical computer and a quantum computer.
[0080] Figure 2 The UCCSD-VQE method shown can be used to perform molecular simulations, material design, drug screening and other applications.
[0081] Quantum Circuits
[0082] Quantum circuits can also be called quantum circuits. Quantum circuits are circuits that operate quantum information storage units (such as quantum bits). Quantum circuits can be composed of quantum information storage units, circuits (also called timelines), and various quantum gates (also called logic gates). Figure 2 The number of configurations determined in step 201 in the UCCSD-VQE method shown is proportional to the quantum circuit depth, the number of quantum gates and the number of layers.
[0083] Point Group
[0084] Point groups are a collection of symmetry operations that describe the symmetry of an object. These operations (such as rotation and reflection) move the object around a fixed center, leaving the object unchanged. There are 32 point groups, each with a corresponding symbol (such as Cn, Cnv, Dn, Dnh, where n is a positive integer).
[0085] Irreducible Representation
[0086] For a representation of a group, if all its matrices can be transformed into diagonal square matrices of the same form by means of a similarity transformation, then the representation is reducible, otherwise it is irreducible. Each point group consists of group elements of several irreducible representations. In this application, each configuration corresponds to only one irreducible representation, while different configurations may correspond to the same irreducible representation. The irreducible representation of a configuration can be determined using a group table.
[0087] Group table
[0088] A table of all possible products of all elements in a group.
[0089] Figure 3 This is a schematic diagram of a group table.
[0090] Use Figure 3 The group table shown and each one can be determined as Figure 1 Irreducible representations of the three configurations shown.
[0091] For example, Figure 1 In the reference state of the BeH2 molecule shown in a, the first orbital, the second orbital, and the third orbital all include two electrons. Therefore, according to the molecular orbital information (i.e., the electron configuration) of the reference state of the BeH2 molecule, it can be determined that the irreducible representation corresponding to the reference state of the BeH2 molecule is: (A g ·A g )·(B 1u ·B 1u )·(A g ·A g ). refer to Figure 3 The group table shown, A g ·A g The result is A g , B 1u ·B 1u The result is A g Therefore, the reference state of the BeH2 molecule can be expressed as A g ·A g ·A g . Due to A g ·A g The result is A g , so A g ·A g ·A g It can be expressed as A g ·A g . A g ·A g The result is A g , so the irreducible representation of the reference state of the BeH2 molecule can be A g .
[0092] Similarly, using Figure 3 The group table shown and Figure 1 The molecular orbital information of the single excited configuration of the BeH2 molecule shown in b can also be obtained as follows Figure 1 The irreducible representation of the single excited configuration of the BeH2 molecule shown in b in the figure is B. 2u . Using Figure 3The group table shown and Figure 1 The molecular orbital information of the double excited configuration of the BeH2 molecule shown in c can also be obtained as follows Figure 1 The irreducible representation of the double excitation configuration of the BeH2 molecule shown in c in the figure is A. g .
[0093] The embodiment of the present application provides a method for generating a quantum circuit. According to the method provided in the embodiment of the present application, the depth of the quantum circuit can be reduced, the number of quantum gates and the number of layers can be reduced, the computing efficiency can be improved, and the resource consumption can be reduced.
[0094] The following describes how to generate quantum circuits using BeH2 as an example.
[0095] Figure 4 It is a schematic flow chart of a method for generating a quantum circuit according to an embodiment of the present application.
[0096] 401, determine a reference state of the BeH2 molecule and N excited configurations corresponding to the reference state.
[0097] The BeH2 molecule contains 6 electrons. The molecular orbitals of the BeH2 molecule contain 7 orbitals, of which 3 orbitals are occupied orbitals (i.e., they have electrons) and 4 orbitals are empty orbitals (i.e., they do not have electrons). Therefore, there are 12 single excitation configurations of the BeH2 molecule and 78 double excitation configurations. Therefore, there are 90 excitation configurations of the BeH2 molecule. In other words, the value of N is 90.
[0098] At 402, an irreducible representation of a reference state of the BeH2 molecule and an irreducible representation of each of the 90 excited configurations are determined.
[0099] The determination method of the irreducible representation of the reference state and the irreducible representation of the configuration of the BeH2 molecule can be referred to the above embodiment, and for the sake of brevity, it will not be repeated here.
[0100] 403 , according to the irreducible representation of the reference state of the BeH 2 molecule and the irreducible representation of each of the 90 excited configurations, determine an excited configuration identical to the irreducible representation of the reference state of the BeH 2 molecule from the 90 excited configurations.
[0101] Also Figure 1 As shown in the figure, the excited configurations of the two BeH2 molecules are taken as an example. Figure 1 The irreducible representation of the single excited configuration of the BeH2 molecule shown in b is B 2u ,like Figure 1 The irreducible representation of the double excited configuration of the BeH2 molecule shown in c in A gIt can be seen that the irreducible representation of the single excitation configuration is different from the irreducible representation of the reference state of the BeH2 molecule, and the irreducible representation of the double excitation configuration is the same as the irreducible representation of the reference state of the BeH2 molecule.
[0102] Finally, only 23 of the 90 excited configurations have irreducible representations that are identical to the irreducible representation of the reference state of the BeH2 molecule.
[0103] 404 , generating a first quantum circuit using the 23 excited configurations.
[0104] The specific implementation method of generating quantum circuits using excited configurations is the same as the current specific implementation method of generating quantum circuits using excited configurations. For the sake of brevity, it will not be described in detail here.
[0105] Steps 401 to 403 may be implemented by a classical computer or a component (such as a chip or circuit) in a classical computer. Step 404 may be implemented by a quantum computer or a quantum computer simulator running in a classical computer.
[0106] Figure 4 The method shown can screen out irreducible excited configurations with the same representation from multiple excited configurations corresponding to the target molecule (i.e., BeH2 molecule). The screened excited configurations are used to generate the first quantum circuit. This can reduce the number of excited configurations used to generate the first quantum circuit, thereby reducing the depth of the quantum circuit, reducing the number of quantum gates and layers, improving computing efficiency, and reducing resource consumption. For ease of description, Figure 4 The method shown is called the symmetry reduction method. Table 1 shows the number of quantum gates (i.e., single-bit gates and two-bit gates) and simulation time when the target molecule is BeH2 molecule without and with the symmetry reduction method.
[0107] Table 1
[0108]
[0109] It can be seen that when using Figure 4 The symmetry reduction method shown can significantly reduce the number of quantum gates used and the simulation time.
[0110] Table 2 shows that the target molecule is helium hydride ion (HeH + ) without using the symmetry reduction method and with the symmetry reduction method, the number of quantum gates (i.e., single-bit gates and two-bit gates) determined.
[0111] Table 2
[0112]
[0113] Table 3 shows the number of quantum gates (i.e., single-bit gates and two-bit gates) determined without and with the symmetry reduction method when the target molecule is a water (H2O) molecule.
[0114] Table 3
[0115]
[0116] Figure 5 It is a schematic flow chart of another method for generating a quantum circuit provided according to an embodiment of the present application.
[0117] 501, determine a reference state of the BeH2 molecule and N excited configurations corresponding to the reference state.
[0118] The BeH2 molecule contains 6 electrons. The molecular orbitals of the BeH2 molecule contain 7 orbitals, of which 3 orbitals are occupied orbitals (i.e., they have electrons) and 4 orbitals are empty orbitals (i.e., they do not have electrons). Therefore, there are 12 single excitation configurations of the BeH2 molecule and 78 double excitation configurations. Therefore, there are 90 excitation configurations of the BeH2 molecule. In other words, the value of N is 90.
[0119] 502, determine the energy of the reference state of the BeH2 molecule and the energy of each of the 90 excited configurations corrected with respect to the reference state.
[0120] The reference state of the BeH2 molecule has a corresponding initialization parameter. Using this initialization parameter and the reference state of the BeH2 molecule, the converged energy obtained by running UCCSD-VQE is the energy of the reference state of the BeH2 molecule.
[0121] Similarly, each of the 90 excited configurations has a corresponding initialization parameter. Using an excited configuration and the initialization parameter corresponding to the excited configuration, the converged energy obtained by running UCCSD-VQE is the energy of the excited configuration corrected to the reference state.
[0122] 503 , respectively obtain the difference between the energy of each of the 90 excited configurations corrected with respect to the reference state and the energy of the reference state of the BeH 2 molecule to obtain 90 energy differences.
[0123] For example, suppose E n represents the energy of the nth excited configuration among the 90 excited configurations after correction to the reference state, E R represents the energy of the reference state, n is a positive integer greater than or equal to 1 and less than or equal to 90, then the energy difference corresponding to the nth excited configuration is E n -E R .
[0124] 504 , determining M excitation configurations from the 90 excitation configurations according to the 90 energy differences and a first preset energy value, wherein the absolute values of the energy differences corresponding to the M excitation configurations are greater than or equal to the first preset energy value.
[0125] For the convenience of description, the excitation configuration corresponding to the energy difference being greater than the first preset energy value is referred to as the first target excitation configuration below.
[0126] Optionally, in some embodiments, determining M excitation configurations from the 90 excitation configurations according to the 90 energy differences and the first preset energy value includes: determining in sequence whether each energy difference in the 90 energy differences is greater than the first preset energy value, and if the energy difference is greater than the first preset energy value, the excitation configuration corresponding to the energy difference is the first target excitation configuration. Through the above process, M target excitation configurations can be determined from the 90 excitation configurations.
[0127] Optionally, in other embodiments, the determining of M excitation configurations from the 90 excitation configurations according to the 90 energy differences and the first preset energy value comprises: sorting the 90 excitation configurations according to the absolute values of the 90 energy differences from large to small to obtain the sorted 90 excitation configurations. The absolute value of the energy difference corresponding to the first excitation configuration among the sorted 90 excitation configurations is the largest, and the absolute value of the energy difference corresponding to the 90th excitation configuration is the smallest. The M excitation configurations are determined from the sorted 90 excitation configurations according to the 90 energy differences and the first preset energy, wherein the M excitation configurations are respectively the first excitation configuration to the Mth excitation configuration among the sorted 90 excitation configurations, and the energy difference corresponding to the M+1th excitation configuration to the 90th excitation configuration among the sorted 90 excitation configurations is less than the first preset energy value. In other words, a reference energy difference can be determined from the 90 energy differences, and the absolute value of the reference energy difference is greater than or equal to the first preset energy value. The absolute value of the energy difference whose absolute value is less than the absolute value of the reference energy difference among the 90 energy differences is less than the first preset energy value. The excitation configuration corresponding to the reference energy difference is the Mth excitation configuration among the sorted 90 excitation configurations. The excitation configurations ranked greater than the Mth excitation configuration are all first target excitation configurations.
[0128] For example, the absolute value of the energy difference corresponding to the 23rd excitation configuration among the 90 excitation configurations after sorting is greater than the first preset energy value, and the absolute value of the energy difference corresponding to the 24th excitation configuration is less than the first preset energy value. This means that the absolute value of the energy difference corresponding to any one of the 1st to 23rd excitation configurations among the 90 excitation configurations after sorting is greater than or equal to the first preset energy value, and the absolute value of the energy difference corresponding to any one of the 24th to 90th excitation configurations is less than the first preset energy value. In other words, in this case, 23 excitation configurations can be determined from the 90 excitation configurations. For ease of description, it is assumed that M is equal to 23 below.
[0129] 505 , generating a first quantum circuit using the 23 excited configurations.
[0130] The specific implementation method of generating quantum circuits using excited configurations is the same as the current specific implementation method of generating quantum circuits using excited configurations. For the sake of brevity, it will not be described in detail here.
[0131] Steps 501, 503 and 504 can be implemented by a classical computer. Step 505 can be implemented by a quantum computer. Step 502 can be implemented by a combination of a classical computer and a quantum computer. As described above, the energy of the reference state after the correction of the excited configuration to the reference state and the energy of the reference state are realized by running UCCSD-VQE. Figure 2 As shown, some operations in UCCSD-VQE are implemented by quantum computers, and some operations are implemented by classical computers.
[0132] Through the above technical solution, the number of excited configurations used to determine the quantum circuit can be reduced, thereby reducing the depth of the quantum circuit, reducing the number of quantum gates and layers, improving computing efficiency, and reducing resource consumption.
[0133] Optionally, in some embodiments, the first quantum circuit may be directly used as the quantum circuit ultimately used for UCCSD-VQE calculation. For ease of description, the quantum circuit ultimately used for UCCSD-VQE calculation is referred to as the target quantum circuit below.
[0134] Optionally, in other embodiments, UCCSD-VQE calculation can be performed based on the first quantum circuit to obtain the first molecular ground state energy value; determine whether the difference between the first molecular ground state energy value and the reference molecular ground state energy value is greater than the second preset energy value. If the difference between the first molecular ground state energy value and the reference molecular ground state energy value is not greater than the second preset energy value, it means that the chemical accuracy of the final result obtained by performing UCCSD-VQE calculation based on the first quantum circuit meets the preset requirements. In this case, the first quantum circuit is the target quantum circuit. If the difference between the first molecular ground state energy value and the reference molecular ground state energy value is greater than the second preset energy value, it means that the chemical accuracy of the final result obtained by performing UCCSD-VQE calculation based on the first quantum circuit cannot meet the preset requirements. In this case, K excitation configurations can continue to be selected from the sorted 90 excitation configurations. K is a preset value, for example, K can be a number greater than or equal to 1, and the sum of K and M is less than or equal to 90. The K excitation configurations are the K excitation configurations in the 90 excitation configurations except the 23 excitation configurations used to generate the first quantum circuit. In other words, the K excitation configurations are the K excitation configurations in the 24th to 90th excitation configurations in the sorted 90 excitation configurations. The K excitation configurations may be the top-ranked K excitation configurations in the 67 excitation configurations (i.e., the 24th to 90th excitation configurations in the sorted 90 excitation configurations). In this case, the second quantum circuit may be determined using the 23 excitation configurations and the K excitation configurations.
[0135] For example, assume that the value of K is 2. In this case, the second quantum circuit can be determined based on the first to the 25th excitation configurations among the ranked 90 excitation configurations.
[0136] After determining the second quantum circuit, it is also possible to continue to determine whether the chemical accuracy of the final result obtained by performing UCCSD-VQE calculations based on the second quantum circuit meets the preset requirements. For example, the UCCSD-VQE calculation can be performed based on the second quantum circuit to obtain the second molecular ground state energy value; determine whether the difference between the second molecular ground state energy value and the reference molecular ground state energy value is greater than the second preset energy value. If the difference between the second molecular ground state energy value and the reference molecular ground state energy value is not greater than the second preset energy value, it means that the chemical accuracy of the final result obtained by performing UCCSD-VQE calculations based on the second quantum circuit meets the preset requirements. In this case, the second quantum circuit is the target quantum circuit. If the difference between the second molecular ground state energy value and the reference molecular ground state energy value is greater than the second preset energy value, it means that the chemical accuracy of the final result obtained by performing UCCSD-VQE calculations based on the second quantum circuit cannot meet the preset requirements. For ease of description, the difference between the first molecular ground state energy value and the reference molecular ground state energy value may be referred to as the first reference energy difference, and the difference between the second molecular ground state energy value and the reference molecular ground state energy value may be referred to as the second reference energy difference. If the first reference energy difference is less than the second reference energy difference, it means that too many excitation configurations are used to determine the second quantum circuit. In this case, the third quantum circuit can be determined using more excitation configurations than those used to determine the first quantum circuit and less than those used to determine the second quantum circuit. For example, the third quantum circuit can be determined based on the 1st to 24th excitation configurations among the 90 excitation configurations ranked, and whether the third quantum circuit can be used as the target quantum circuit can be determined based on the reference molecule ground state energy value. If the first reference energy difference is greater than the second reference energy difference, it means that more excitation configurations can be used to determine the quantum circuit. In this case, the fourth quantum circuit can be determined using more excitation configurations than those used to determine the second quantum circuit. For example, the fourth quantum circuit can be determined based on the 1st to 28th excitation configurations among the 90 excitation configurations, and whether the third quantum circuit can be used as the target quantum circuit can be determined based on the reference molecule ground state energy value.
[0137] Through the above technical solution, the depth of the quantum circuit can be reduced while ensuring that the accuracy of the final result meets the requirements. Figure 5 The method shown for determining the excited configuration of a quantum circuit by selecting according to the energy difference is called the energy ranking optimization method.
[0138] Optionally, in some embodiments, the symmetry reduction method and the energy sorting optimization method may be combined to determine the quantum circuit.
[0139] Take the BeH2 molecule as an example. In some embodiments, the symmetry reduction method can be used first, and then the energy sorting optimization method can be used to determine the quantum circuit. For example, 23 excitation configurations can be determined from 90 excitation configurations, and the irreducible representation of each of the 23 excitation configurations is the same as the irreducible representation of the reference state of the BeH2 molecule. Then determine the energy of the reference state of the BeH2 molecule and the energy of each of the 23 excitation configurations after correction to the reference state. The difference between the energy of each of the 23 excitation configurations after correction to the reference state and the energy of the reference state of the BeH2 molecule is obtained respectively to obtain 23 energy differences. According to the 23 energy differences and the first preset energy value, the excitation configuration whose corresponding energy difference is greater than or equal to the first preset energy value is determined from the 23 excitation configurations. Similarly, the 23 excitation configurations can be sorted using the absolute value of the 23 energy differences to obtain the 23 sorted excitation configurations, wherein the absolute value of the energy difference corresponding to the first excitation configuration among the 23 sorted excitation configurations is the largest, and the absolute value of the energy difference corresponding to the 23rd excitation configuration is the smallest. Assume that the energy difference corresponding to the first 15 excitation configurations among the 23 sorted excitation configurations is greater than or equal to the first preset threshold. In this case, the quantum circuit can be determined based on the first to fifteenth excitation configurations after the sorting. If the accuracy of the quantum circuit determined based on the first 15 excitation configurations does not meet the preset requirements, one or more excitation configurations ranked high can be selected from the 16th to 23rd excitation configurations, and a new quantum circuit can be determined based on the one or more excitation configurations and the first 15 excitation configurations.
[0140] In some embodiments, the quantum circuit can be determined by first using the energy ranking optimization method and then using the symmetry reduction method. For example, assume that 23 excitation configurations are determined using the energy ranking optimization method. Then determine from the 23 excitation configurations an excitation configuration whose irreducible representation is the same as the irreducible representation of the reference state of the BeH2 molecule. Assuming that the irreducible representation of 10 of the 23 excitation configurations is the same as the irreducible representation of the BeH2 molecule, then the 10 excitation configurations can be used to determine the quantum circuit. If the accuracy of the quantum circuit determined according to the 10 excitation configurations does not meet the preset requirements, one or more excitation configurations ranked high can be selected from the 24th to 90th excitation configurations, and then the excitation configuration that is the same as the irreducible representation of the reference state of the BeH2 molecule can be selected from the one or more excitation configurations. Assuming that one or more excitation configurations include an excitation configuration that is the same as the irreducible representation of the reference state of the BeH2 molecule, then the new quantum circuit can be determined based on the 1 excitation configuration and the 10 excitation configurations.
[0141] Figure 6It is a schematic flowchart of a method for generating a quantum circuit according to an embodiment of the present application.
[0142] 601 , determining a reference state of a target molecule and N excitation configurations corresponding to the reference state, where N is a positive integer greater than or equal to 1.
[0143] The target molecule may refer to a molecule, such as a BeH2 molecule, a H2O molecule, or an ion, such as a HeH + .
[0144] 602, determining M excitation configurations from the N excitation configurations according to the properties of the reference state and the properties of the N excitation configurations, where M is a positive integer greater than or equal to 1 and less than or equal to N.
[0145] 603. Generate a first quantum circuit according to the M excitation configurations.
[0146] Optionally, in some embodiments, the property of the reference state may refer to an irreducible representation of the reference state, and the property of the excited configuration may refer to an irreducible representation of the excited configuration. In this case, determining M excited configurations from the N excited configurations according to the property of the reference state and the property of the N excited configurations may include: determining an irreducible representation of the reference state and an irreducible representation of each of the N excited configurations; determining the M excited configurations from the N excited configurations according to the irreducible representation of the reference state and the irreducible representation of each of the N excited configurations, wherein the irreducible representation of each of the M excited configurations is the same as the irreducible representation of the reference state.
[0147] The method for determining the irreducible representation of the reference state and the method for determining the irreducible representation of the excited configuration can refer to the description in the above embodiments, and for the sake of brevity, they will not be repeated here.
[0148] Optionally, in some embodiments, the determination of the irreducible representation of the reference state and the irreducible representation of each of the N excited configurations includes: determining the irreducible representation of the reference state according to the group table and the molecular orbital information of the reference state of the target molecule; determining the irreducible representation of each of the N excited configurations according to the group table and the molecular orbital information of each of the N excited configurations. Using the group table, the irreducible representation of the excited configuration and the reference state can be quickly determined. For example, the irreducible representation of the reference state of the BeH2 molecule can be obtained by five table lookups. Using the group table to determine the irreducible representation of the excited configuration and the reference state is time-saving and simple to implement.
[0149] Optionally, in some embodiments, the method may further include: generating a first quantum circuit according to the M excitation configurations, including: determining the energy of the reference state and the energy of each excitation configuration in the M excitation configurations after correction to the reference state; respectively obtaining the difference between the energy of each excitation configuration in the M excitation configurations after correction to the reference state and the energy of the reference state, so as to obtain M energy differences corresponding to the M excitation configurations; sorting the M excitation configurations according to the absolute values of the M energy differences from large to small, so as to obtain the sorted M excitation configurations; and sorting the M excitation configurations according to the M energy differences. and a first preset energy value, and determining T excitation configurations from the sorted M excitation configurations, wherein the T excitation configurations are respectively the 1st excitation configuration to the Tth excitation configuration among the sorted M excitation configurations, the energy difference corresponding to each excitation configuration among the T excitation configurations is greater than or equal to the first preset energy value, the energy difference corresponding to the T+1th excitation configuration to the Mth excitation configuration among the sorted M excitation configurations is less than the first preset energy value, and T is a positive integer greater than or equal to 1 and less than M; and generating the first quantum circuit according to the T excitation configurations. In other words, the above technical solution is to first use the symmetry reduction method to screen out M excitation configurations whose irreducible representations are the same as the reference state, and then use the energy sorting optimization method for the M excitation configurations to determine the T excitation configurations that are ultimately used to determine the first quantum circuit.
[0150] Optionally, in some embodiments, the property of the reference state refers to the energy of the reference state, and the property of the excited configuration refers to the energy of the excited configuration corrected to the reference state. In this case, the determination of M excited configurations from the N excited configurations based on the property of the reference state and the property of the N excited configurations includes: determining the energy of the reference state and the energy of each excited configuration in the N excited configurations corrected to the reference state; respectively obtaining the difference between the energy of each excited configuration in the N excited configurations corrected to the reference state and the energy of the reference state to obtain N energy differences corresponding to the N excited configurations; determining the M excited configurations from the N excited configurations based on the N energy differences and a first preset energy value, wherein the absolute value of the energy difference corresponding to each excited configuration in the M excited configurations is greater than or equal to the first preset energy value.
[0151] Optionally, in some embodiments, the M excitation configurations are determined from the N excitation configurations according to the N energy differences and the first preset energy value, including: sorting the N excitation configurations in descending order according to the absolute values of the N energy differences to obtain sorted N excitation configurations; determining the M excitation configurations from the sorted N excitation configurations according to the N energy differences and the first preset energy value, wherein the M excitation configurations are respectively the 1st excitation configuration to the Mth excitation configuration among the sorted N excitation configurations, and the absolute values of the energy differences corresponding to the M+1th excitation configuration to the Nth excitation configuration among the sorted N excitation configurations are less than the first preset energy value.
[0152] Optionally, in other embodiments, the absolute value of each of the N energy differences can be compared with the first preset energy value in turn; if the absolute value of an energy difference is greater than or equal to the first preset energy value, the excitation configuration corresponding to the energy difference belongs to the M excitation configurations; if the absolute value of an energy difference is less than the first preset energy value, the excitation configuration corresponding to the energy difference does not belong to the M excitation configurations.
[0153] Optionally, in some embodiments, the method may further include: calculating the ground state energy value of the first molecule according to the first quantum circuit; determining that the difference between the ground state energy value of the first molecule and the ground state energy value of the reference molecule is greater than a second preset energy value; generating a second quantum circuit according to the M excitation configurations and the M+1th excitation configuration to the M+Kth excitation configuration in the sorted N excitation configurations, wherein K is a positive integer greater than or equal to 1 and the sum of M and K is less than or equal to N. If the difference between the ground state energy value of the second molecule determined according to the second quantum circuit and the ground state energy value of the reference molecule is still greater than the second preset energy value, the excitation configuration used to determine the quantum link may continue to be determined according to the sorted N excitation configurations. Based on the above technical solution, the determined quantum circuit can make the chemical accuracy of the UCCSD-VQE calculation result meet the preset requirements.
[0154] Figures 4 to 6 The method described in the figure "generating a first quantum circuit according to 23 (or M) excitation configurations" can be understood as "generating a first quantum circuit according to 23 (or M) excitation configurations and parameters Generate parameterized quantum circuits". In other words, Figures 4 to 6 The method shown is Figure 2 There are several different implementations of step 201 and step 202 in the method shown. After the first quantum circuit is determined, you can continue to follow Figure 2 The process shown in the figure continues to be calculated according to the UCCSD-VQE method. For specific implementation methods, please refer to Figure 2 , for the sake of brevity, I will not go into details here.
[0155] Figure 7 1 is a schematic structural block diagram of a computer device according to an embodiment of the present application. Figure 7 The computer device 700 shown may include a first processing module 701 , a second processing module 702 and a third processing module 703 .
[0156] The first processing module 701 is used to determine a reference state of a target molecule and N excitation configurations corresponding to the reference state, where N is a positive integer greater than or equal to 1.
[0157] The second processing module 702 is used to determine M excitation configurations from the N excitation configurations according to the properties of the reference state and the properties of the N excitation configurations, where M is a positive integer greater than or equal to 1 and less than or equal to N.
[0158] The third processing module 703 is used to generate a first quantum circuit according to the M excitation configurations.
[0159] The specific functions and beneficial effects of the first processing module 701, the second processing module 702 and the third processing module 703 can be found in the description of the above method embodiment, and for the sake of brevity, they will not be repeated here.
[0160] The first processing module 701 , the second processing module 702 , and the third processing module 703 may be implemented by a processor.
[0161] Optionally, in some embodiments, the computer device 700 may be a classical computer. In this case, the second processing module 702 may perform UCCSD-VQE calculations in conjunction with a quantum computer to determine the energy of the reference state and the energy of each of the N excited configurations after correction of the reference state. For example, the second processing module 702 may be used to send the reference state and the N excited configurations determined by the first processing module 701 to the quantum computer. The quantum computer may be used to prepare a trial state and perform a trial state measurement based on the received excited configuration or reference state, and send the measurement data to the second processing module 702. The second processing module 702 calculates the energy of the corresponding excited configuration or reference state based on the received measurement data.
[0162] Optionally, in other embodiments, the computer device 700 can be understood as a computer system composed of a classical computer and a quantum computer. The first processing module 701 and the third processing module 703 can be processors in a classical computer. The second processing module 702 can be further divided into a first processing submodule and a second processing submodule, the first processing submodule can be a processor in a quantum computer, and the second processing submodule can be a processor in a classical computer. The first processing submodule can be used to prepare a trial state and measure the trial state, and send the measurement data to the second processing submodule. The second processing submodule can calculate energy based on the received measurement data.
[0163] Figure 8 is a block diagram of a classical computer provided in an embodiment of the present application. Figure 8 The illustrated classical computer 800 includes a processor 801 and a memory 802. The processor 801 and the memory 802 communicate with each other through an internal connection path to transfer control and / or data signals. The memory 802 is used to store a computer program, and the processor 801 is used to call and run the computer program from the memory 802, so that the classical computer 800 executes the various steps executed by the classical computer device in the above-mentioned embodiment.
[0164] The processor 801 and the memory 802 can be combined into a processing device, and the processor 801 is used to execute the program code stored in the memory 802 to implement the functions of the classical computer in the above method embodiment. In specific implementation, the memory 802 can also be integrated into the processor 801, or independent of the processor 801.
[0165] The classical computer 800 may also include a transceiver 803. The transceiver 803 is used to communicate with the quantum computer. Specifically, the transceiver 803 may be used to obtain measurement data obtained by the quantum computer when measuring the test state. The transceiver 803 may also transmit the updated parameters The transceiver 803 can communicate with the quantum computer via wired or wireless communication, which is not limited in this embodiment of the present application.
[0166] Those skilled in the art will appreciate that, in addition to Figure 8 In addition to the processor 801, memory 802, and transceiver 803 shown, the classical computer 800 may also include other components not shown in the figure. Figure 8 The devices shown in the figure, such as input and output devices, power supply, antenna, etc.
[0167] It should be understood that the classical computer 800 may correspond to the classical computer in the method according to the embodiment of the present application, and the classical computer 800 may also be a chip or component applied to the classical computer. In addition, each module in the classical computer 800 implements the corresponding process in the above method embodiment. Specifically, the memory 802 is used to store program code, so that when the processor 801 executes the program code, it controls the processor 801 to execute the steps executed by the classical computer in the method. The specific process of each unit executing the above corresponding steps has been described in detail in the method, and for the sake of brevity, it is not repeated here.
[0168] Fig. 9 is a block diagram of a quantum computer provided in an embodiment of the present application. Fig. 9 The quantum computer 900 shown includes a quantum processor 901 and a peripheral controller 902. The classical computer controls the peripheral control device to generate control signals such as microwaves or lasers to operate on the quantum processor to implement quantum gate operations and measurements on the quantum processor, so that the quantum computer 900 executes the various steps executed by the quantum computer in the above embodiments.
[0169] The embodiment of the present application also provides a computer system, which can be composed of the above-mentioned quantum computer and classical computer. The computer system can implement the corresponding process in the above-mentioned method embodiment.
[0170] The embodiment of the present application also provides a chip, the chip includes a logic circuit, the logic circuit is used to couple with an input / output interface, and transmit data through the input / output interface to implement the corresponding process in the above method embodiment. The chip in the embodiment of the present application can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, or other integrated chips.
[0171] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0172] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor to be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0173] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0174] According to the method provided in the embodiment of the present application, the present application also provides a computer program product, which includes: a computer program code, when the computer program code is run on a computer, the computer executes Figures 4 to 6 A method according to any one of the embodiments shown.
[0175] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable medium, which stores a program code, and when the program code is run on a computer, the computer executes Figures 4 to 6 A method according to any one of the embodiments shown.
[0176] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0177] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0178] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0180] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0181] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0182] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for generating a quantum circuit, characterized in that: include: Determining a reference state of the target molecule and N excited configurations corresponding to the reference state, where N is a positive integer greater than or equal to 1; Determining M excited configurations from the N excited configurations according to the properties of the reference state and the properties of the N excited configurations, wherein M is a positive integer greater than or equal to 1 and less than or equal to N; According to the M excitation configurations, a first quantum circuit is generated, wherein In the case where the property of the reference state is an irreducible representation of the reference state and the property of the excited configuration is an irreducible representation of the excited configuration, the irreducible representations of the M excited configurations are the same as the irreducible representation of the reference state; or, When the attribute of the reference state is the energy of the reference state and the attribute of the excited configuration is the energy of the excited configuration corrected with respect to the reference state, an absolute value of the difference between the energy of each excited configuration in the M excited configurations corrected with respect to the reference state and the energy of the reference state is greater than or equal to a first preset energy value.
2. The method according to claim 1, characterized in that Determining M excited configurations from the N excited configurations according to the properties of the reference state and the properties of the N excited configurations comprises: determining an irreducible representation of the reference state and an irreducible representation of each of the N excited configurations; The M excitation configurations are determined from the N excitation configurations according to the irreducible representation of the reference state and the irreducible representation of each of the N excitation configurations, wherein the irreducible representation of each of the M excitation configurations is the same as the irreducible representation of the reference state.
3. The method according to claim 2, characterized in that The determining of the irreducible representation of the reference state and the irreducible representation of each of the N excited configurations comprises: Determining an irreducible representation of the reference state according to the group table and the molecular orbital information of the reference state of the target molecule; An irreducible representation of each of the N excitation configurations is determined according to the group table and the molecular orbital information of each of the N excitation configurations.
4. The method according to claim 2 or 3, characterized in that Generating a first quantum circuit according to the M excitation configurations includes: Determining the energy of the reference state and the energy of each of the M excited configurations after correction of the reference state; Respectively obtaining the difference between the energy of each of the M excited configurations after correction of the reference state and the energy of the reference state, so as to obtain M energy differences corresponding to the M excited configurations; Sorting the M excitation configurations according to the absolute values of the M energy differences from large to small to obtain sorted M excitation configurations; Determine T excitation configurations from the sorted M excitation configurations according to the M energy differences and the first preset energy value, wherein the T excitation configurations are respectively from the 1st excitation configuration to the Tth excitation configuration among the sorted M excitation configurations, the absolute value of the energy difference corresponding to each excitation configuration among the T excitation configurations is greater than or equal to the first preset energy value, the absolute value of the energy difference corresponding to the T+1th excitation configuration to the Mth excitation configuration among the sorted M excitation configurations is less than the first preset energy value, and T is a positive integer greater than or equal to 1 and less than M; The first quantum circuit is generated according to the T excitation configurations.
5. The method according to claim 1, characterized in that The determining M excitation configurations from the N excitation configurations according to the properties of the reference state and the properties of the N excitation configurations comprises: Determining the energy of the reference state and the energy of each of the N excited configurations after correction of the reference state; Respectively obtaining the difference between the energy of each excited configuration in the N excited configurations after correction of the reference state and the energy of the reference state, so as to obtain N energy differences corresponding to the N excited configurations; The M excitation configurations are determined from the N excitation configurations according to the N energy differences and the first preset energy value, wherein an absolute value of the energy difference corresponding to each excitation configuration in the M excitation configurations is greater than or equal to the first preset energy value.
6. The method according to claim 5, characterized in that The determining the M excitation configurations from the N excitation configurations according to the N energy differences and the first preset energy value comprises: Sorting the N excited configurations according to the absolute values of the N energy differences from large to small to obtain sorted N excited configurations; The M excitation configurations are determined from the sorted N excitation configurations according to the absolute values of the N energy differences and the first preset energy value, wherein the M excitation configurations are respectively from the 1st excitation configuration to the Mth excitation configuration among the sorted N excitation configurations, and the absolute values of the energy differences corresponding to the M+1th excitation configuration to the Nth excitation configuration among the sorted N excitation configurations are less than the first preset energy value.
7. The method according to claim 6, characterized in that The method further comprises: Calculating a ground state energy value of a first molecule according to the first quantum circuit; Determining that a difference between the first molecular ground state energy value and the reference molecular ground state energy value is greater than a second preset energy value; A second quantum circuit is generated according to the M excitation configurations and the M+1th excitation configuration to the M+Kth excitation configuration among the sorted N excitation configurations, wherein K is a positive integer greater than or equal to 1 and the sum of M and K is less than or equal to N.
8. A computer device, characterized in that: include: A first processing module, used to determine a reference state of a target molecule and N excitation configurations corresponding to the reference state, where N is a positive integer greater than or equal to 1; A second processing module, configured to determine M excited configurations from the N excited configurations according to the properties of the reference state and the properties of the N excited configurations, wherein M is a positive integer greater than or equal to 1 and less than or equal to N; The third processing module is used to generate a first quantum circuit according to the M excitation configurations, wherein In the case where the property of the reference state is an irreducible representation of the reference state and the property of the excited configuration is an irreducible representation of the excited configuration, the irreducible representations of the M excited configurations are the same as the irreducible representation of the reference state; or, When the attribute of the reference state is the energy of the reference state and the attribute of the excited configuration is the energy of the excited configuration corrected with respect to the reference state, an absolute value of the difference between the energy of each excited configuration in the M excited configurations corrected with respect to the reference state and the energy of the reference state is greater than or equal to a first preset energy value.
9. The computer device according to claim 8, characterized in that The second processing module is specifically used for: determining an irreducible representation of the reference state and an irreducible representation of each of the N excited configurations; The M excitation configurations are determined from the N excitation configurations according to the irreducible representation of the reference state and the irreducible representation of each of the N excitation configurations, wherein the irreducible representation of each of the M excitation configurations is the same as the irreducible representation of the reference state.
10. The computer device according to claim 8, wherein: The second processing module is specifically used for: Determining an irreducible representation of the reference state according to the group table and the molecular orbital information of the reference state of the target molecule; An irreducible representation of each of the N excitation configurations is determined according to the group table and the molecular orbital information of each of the N excitation configurations.
11. The computer device according to claim 9 or 10, characterized in that The third processing module is specifically used for: Determining the energy of the reference state and the energy of each of the M excited configurations after correction of the reference state; Respectively obtaining the difference between the energy of each of the M excited configurations after correction of the reference state and the energy of the reference state, so as to obtain M energy differences corresponding to the M excited configurations; Sorting the M excitation configurations according to the absolute values of the M energy differences from large to small to obtain sorted M excitation configurations; Determine T excitation configurations from the sorted M excitation configurations according to the M energy differences and the first preset energy value, wherein the T excitation configurations are respectively from the 1st excitation configuration to the Tth excitation configuration among the sorted M excitation configurations, the absolute value of the energy difference corresponding to each excitation configuration among the T excitation configurations is greater than or equal to the first preset energy value, the absolute value of the energy difference corresponding to the T+1th excitation configuration to the Mth excitation configuration among the sorted M excitation configurations is less than the first preset energy value, and T is a positive integer greater than or equal to 1 and less than M; The first quantum circuit is generated according to the T excitation configurations.
12. The computer device of claim 8, wherein: The second processing module is specifically used to: determine the energy of the reference state and the energy of each of the N excited configurations after correction of the reference state; Respectively obtaining the difference between the energy of each excited configuration in the N excited configurations after correction of the reference state and the energy of the reference state, so as to obtain N energy differences corresponding to the N excited configurations; The M excitation configurations are determined from the N excitation configurations according to the N energy differences and the first preset energy value, wherein an absolute value of the energy difference corresponding to each excitation configuration in the M excitation configurations is greater than or equal to the first preset energy value.
13. The computer device of claim 12, wherein: The second processing module is specifically used to: sort the N excitation configurations according to the absolute values of the N energy differences from large to small, to obtain sorted N excitation configurations; The M excitation configurations are determined from the sorted N excitation configurations according to the absolute values of the N energy differences and the first preset energy value, wherein the M excitation configurations are respectively from the 1st excitation configuration to the Mth excitation configuration among the sorted N excitation configurations, and the absolute values of the energy differences corresponding to the M+1th excitation configuration to the Nth excitation configuration among the sorted N excitation configurations are less than the first preset energy value.
14. The computer device of claim 13, wherein: The third processing module is further used for: Calculating a ground state energy value of a first molecule according to the first quantum circuit; Determining that a difference between the first molecular ground state energy value and the reference molecular ground state energy value is greater than a second preset energy value; A second quantum circuit is generated according to the M excitation configurations and the M+1th excitation configuration to the M+Kth excitation configuration among the sorted N excitation configurations, wherein K is a positive integer greater than or equal to 1 and the sum of M and K is less than or equal to N.
15. A chip, characterized in that: include: A logic circuit, wherein the logic circuit is used to be coupled to an input / output interface and transmit data through the input / output interface to execute the method according to any one of claims 1 to 7.
16. A computer readable medium, characterized in that The computer-readable medium stores a program code, and when the computer program code is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
