Method and device for generating parameterized quantum circuit, terminal equipment and storage medium
By constructing and optimizing parameterized quantum circuits, the problems of low flexibility, scalability and accuracy of traditional quantum circuits when measuring the ground state energy of molecules are solved, and more efficient and accurate quantum circuit measurement is achieved.
Patent Information
- Application Number
- CN202411489281.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional quantum circuits have problems such as flexibility, poor scalability and low measurement accuracy when measuring the ground state energy of molecules.
By determining the Hamiltonian and Unitary Operators in the quantum environment of the parametric quantum circuit based on the molecular information of the molecule to be tested, a parameterized quantum circuit architecture is constructed, an initial parametric quantum circuit is generated, and parameters are iterated through the loss function to generate and use Parameterized quantum circuits for measuring the ground state energy of the molecule.
It improves the flexibility and scalability of quantum circuits and enhances the accuracy of molecular ground state energy measurement.
Smart Images

Figure CN119476513A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer application technology, and in particular, relates to a method, apparatus, terminal device and computer-readable storage medium for generating parameterized quantum circuits. Background Art
[0002] Molecular ground state energy is the energy that describes the most stable state of a molecule. In molecular physics, studying molecular ground state energy is of great significance for understanding molecular stability, chemical reactions, spectroscopy, and the formation and breaking of chemical bonds. At the same time, studying molecular ground state energy can also provide valuable information and solutions for new energy battery design, material science, drug design, environmental science and other fields.
[0003] With the continuous advancement of computer technology, the ground state energy of molecules can be measured using high-performance computers and quantum computing methods. However, traditional quantum circuits still have problems such as poor flexibility and scalability, and low accuracy in measuring the ground state energy of molecules. Summary of the invention
[0004] The purpose of the present application is to provide a method, apparatus, terminal device and computer-readable storage medium for generating parameterized quantum circuits, which can solve the problems in the related art of using traditional quantum circuits to measure the ground state energy of molecules, and the poor flexibility and scalability and low accuracy of molecular ground state energy measurement caused by the fact that traditional quantum circuits are not controlled by adjustable parameters.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a parameterized quantum circuit, comprising:
[0006] According to the molecular information of the molecule to be measured, the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates, the HF input quantum state and the electronic Hamiltonian of the molecule to be measured are determined; according to the Hamiltonian and the unitary operator, the parameterized quantum circuit architecture is determined; according to the parameterized quantum circuit architecture, an initial parameterized quantum circuit is generated; according to the HF input quantum state, the electronic Hamiltonian and the unitary operator, a loss function is constructed; according to the initial parameterized quantum circuit and the loss function, the parameterized quantum circuit is generated, and the parameterized quantum circuit is used to measure the molecular ground state energy.
[0007] In a possible implementation manner of the first aspect, determining the parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator includes:
[0008] Substituting the Hamiltonian into the unitary operator;
[0009] Decomposing and deriving the unitary operator substituted into the Hamiltonian to determine various quantum gates, wherein the quantum gates include quantum gates of various rotation angles and a controlled NOT gate;
[0010] The parameterized quantum circuit architecture is determined according to each of the quantum gates.
[0011] Optionally, in another possible implementation manner of the first aspect, constructing a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator includes:
[0012] generating a trial wave function according to the HF input quantum state and the unitary operator;
[0013] The loss function is constructed according to the trial wave function and the electronic Hamiltonian.
[0014] Optionally, in another possible implementation manner of the first aspect, constructing the loss function according to the trial wave function and the electronic Hamiltonian includes:
[0015] The loss function is constructed according to the energy expectation value of the trial wave function with respect to the electronic Hamiltonian.
[0016] Optionally, in another possible implementation manner of the first aspect, generating the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function includes:
[0017] The parameters in the initial parameterized quantum circuit are iteratively optimized by using the loss function to generate the parameterized quantum circuit.
[0018] Optionally, in another possible implementation manner of the first aspect, iteratively optimizing the parameters in the initial parameterized quantum circuit by using the loss function to generate the parameterized quantum circuit includes:
[0019] When the value of the loss function is calculated to be the minimum, the corresponding updated initial parameterized quantum circuit;
[0020] Calculating the theoretical ground state energy of the molecule to be measured by using the updated initial parameterized quantum circuit;
[0021] The parameterized quantum circuit is generated according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured.
[0022] Optionally, in another possible implementation of the first aspect, generating the parameterized quantum circuit according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured includes:
[0023] If the difference between the theoretical ground state energy and the actual ground state energy is less than a preset energy difference threshold, determining the updated initial parameterized quantum circuit as the parameterized quantum circuit;
[0024] If the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the updated initial parameterized quantum circuit is retrained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the initial parameterized quantum circuit after training and updating is determined as the parameterized quantum circuit.
[0025] In a second aspect, the present application also provides a device for generating a parameterized quantum circuit, comprising: a first determination module, used to determine the Hamiltonian, HF input quantum state and electronic Hamiltonian of the molecule to be measured in the quantum environment in which the parameterized quantum circuit operates according to the molecular information of the molecule to be measured; a second determination module, used to determine the parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator; a first generation module, used to generate an initial parameterized quantum circuit according to the parameterized quantum circuit architecture; a construction module, used to construct a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator; a second generation module, used to generate the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function, and the parameterized quantum circuit is used to measure the molecular ground state energy.
[0026] In a possible implementation manner of the second aspect, the second determining module includes:
[0027] A substitution unit, used for substituting the Hamiltonian into the unitary operator;
[0028] A derivation unit, configured to decompose and derive the unitary operator substituted into the Hamiltonian to determine various quantum gates, wherein the quantum gates include quantum gates of various rotation angles and a controlled NOT gate;
[0029] The first determining unit is used to determine the parameterized quantum circuit architecture according to each of the quantum gates.
[0030] Optionally, in another possible implementation manner of the second aspect, the building module includes:
[0031] A first generating unit, configured to generate a trial wave function according to the HF input quantum state and the unitary operator;
[0032] A construction unit is used to construct the loss function according to the trial wave function and the electronic Hamiltonian.
[0033] Optionally, in another possible implementation manner of the second aspect, the construction unit is specifically used to:
[0034] The loss function is constructed according to the energy expectation value of the trial wave function with respect to the electronic Hamiltonian.
[0035] Optionally, in another possible implementation of the second aspect, the second generating module includes:
[0036] The second generating unit is used to iteratively optimize the parameters in the initial parameterized quantum circuit through the loss function to generate the parameterized quantum circuit.
[0037] Optionally, in another possible implementation manner of the second aspect, the second generating unit is specifically configured to:
[0038] When the value of the loss function is calculated to be the minimum, the corresponding updated initial parameterized quantum circuit;
[0039] Calculating the theoretical ground state energy of the molecule to be measured by using the updated initial parameterized quantum circuit;
[0040] The parameterized quantum circuit is generated according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured.
[0041] Optionally, in another possible implementation manner of the second aspect, the second generating unit is further configured to:
[0042] If the difference between the theoretical ground state energy and the actual ground state energy is less than a preset energy difference threshold, determining the updated initial parameterized quantum circuit as the parameterized quantum circuit;
[0043] If the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the updated initial parameterized quantum circuit is retrained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the initial parameterized quantum circuit after training and updating is determined as the parameterized quantum circuit.
[0044] In a third aspect, the present application further provides a terminal device. The terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for implementing any one of the implementation modes of the first aspect is implemented.
[0045] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of any one of the implementation modes of the first aspect is implemented.
[0046] In a fifth aspect, the present application further provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any one of the methods of the first aspect.
[0047] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by parameterizing the Hamiltonian and the unitary operator in the quantum environment in which the quantum circuit operates, a parameterized quantum circuit architecture is constructed to generate an initial parameterized quantum circuit, and then based on the constructed loss function and the initial parameterized quantum circuit, a parameterized quantum circuit for measuring the molecular ground state energy is generated, so that the quantum circuit can be controlled by adjustable parameters, thereby improving the flexibility and scalability of the quantum circuit and improving the accuracy of the molecular ground state energy measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 It is a flowchart of a method for generating a parameterized quantum circuit provided by an embodiment of the present application;
[0050] Figure 2 is a schematic diagram of a parameterized quantum circuit architecture provided by an embodiment of the present application;
[0051] Figure 3 is a flow chart of a method for generating a parameterized quantum circuit provided by another embodiment of the present application;
[0052] Figure 4 It is a schematic diagram of the structure of a device for generating a parameterized quantum circuit provided in an embodiment of the present application;
[0053] Figure 5 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0056] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in 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.
[0060] Molecular ground state energy is the energy that describes the most stable state of a molecule. In molecular physics, the study of molecular ground state energy is of great significance for understanding molecular stability, chemical reactions, spectroscopy, and the formation and breaking of chemical bonds. In addition, the study of molecular ground state energy can also provide valuable information and solutions for new energy battery design, material science, drug design, environmental science and other fields. With the continuous advancement of computer technology, modern computational chemistry has become one of the main tools for studying molecular ground state energy.
[0061] With the continuous advancement of computer technology, the ground state energy of molecules can be measured using high-performance computers and quantum computing methods. However, traditional quantum circuits still have problems such as poor flexibility and scalability, and low accuracy in measuring the ground state energy of molecules.
[0062] Based on this, the present application provides a method, apparatus, terminal device, and storage medium for generating parameterized quantum circuits. The parameterized quantum circuit is a quantum computing model based on a parameterized quantum rotation gate. Its implementation depends on some background technologies, among which the most important technologies include the parameterized construction of quantum gates. The parameterized construction of quantum gates is the core technology for implementing parameterized quantum circuits. It requires the selection of appropriate parameterized gates and parameterized functions to construct quantum circuits suitable for specific tasks. Unlike traditional quantum circuits, the gate operations in parameterized quantum circuits are controlled by adjustable parameters, so they have higher flexibility and scalability.
[0063] The following describes in detail the method, apparatus, terminal device, storage medium and computer program for generating parameterized quantum circuits provided by the present application with reference to the accompanying drawings.
[0064] Figure 1 A schematic flow chart of a method for generating a parameterized quantum circuit provided in an embodiment of the present application is shown.
[0065] Step 101, according to the molecular information of the molecule to be measured, determine the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates, the HF input quantum state and the electronic Hamiltonian of the molecule to be measured.
[0066] It should be noted that the method for generating a parameterized quantum circuit in the embodiment of the present application can be performed by the device for generating a parameterized quantum circuit in the embodiment of the present application. The device for generating a parameterized quantum circuit in the embodiment of the present application can be configured in any terminal device to perform the method for generating a parameterized quantum circuit in the embodiment of the present application.
[0067] First, the professional terms involved in this application are explained:
[0068] Geometric configuration: The geometric configuration of chemical molecules refers to the relative position relationship of atoms in a molecule. Their arrangement determines the shape, polarity and chemical properties of the molecule. Molecular geometric configuration can be obtained through experiments and calculations, and they also have an important influence on the rate and selectivity of chemical reactions. There are many types of molecular geometric configurations, the most common ones are linear, triangular, planar, tetrahedral, pentagonal bipyramidal, etc. These geometric shapes are determined by the chemical bond angles and bond lengths between atoms. In the geometric configuration of molecules, the bond angles and bond lengths between atoms are very important parameters, which directly determine the shape of the molecule. For example, the molecular geometric configuration of the hydrocarbon methane is tetrahedral because the carbon atom forms four equiangular chemical bonds with four hydrogen atoms, while in carbon dioxide, the chemical bond angles formed by the oxygen atom and two carbon atoms are right angles, making the molecule linear.
[0069] Basis set: In quantum chemistry, basis set refers to a set of mathematical functions used to describe molecular wave functions. These functions are generally composed of linear combinations of atomic orbitals, and are used to approximately represent the electronic wave functions in molecules. The choice of basis set has a great influence on the accuracy and efficiency of the calculation results. Basis sets can be divided into two categories: atomic orbital basis sets and molecular orbital basis sets. Atomic orbital basis sets are composed of linear combinations of orbitals of a single atom, and common ones include Slater basis sets and Gaussian basis sets. Molecular orbital basis sets are composed of linear combinations of orbitals of multiple atoms, and common ones include Rice-type orbitals (STO) and Gaussian orbitals. STO-3G is a commonly used STO-type basis set, where 3G represents that this basis set includes 3 Gaussian functions, that is, each orbital is represented by a linear combination of 3 basis functions. The choice of basis set should take into account the balance between accuracy and computational efficiency, and can generally be selected according to specific problems.
[0070] Multiplicity information: In quantum chemistry, multiplicity refers to the difference between the total number of unpaired electrons in a molecule or ion (also called the total angular momentum of the electron spin) and 1. When the total number of unpaired electrons is an even number, the multiplicity is 1, and the molecule or ion in this case is called a singlet state; when the total number of unpaired electrons is an odd number, the multiplicity is an integer greater than 1, and the molecule or ion in this case is called a multiplet. In quantum chemistry, multiplicity is an important feature for describing the ground state and excited state of a molecule or ion, because the properties and reaction mechanisms of molecules or ions usually depend on their multiplicity. In computational chemistry, multiplicity is usually defined as an input parameter.
[0071] Net charge number information: In quantum chemistry, the net charge number of a molecule refers to the difference between the total number of charged particles (i.e., electrons and ions) in the molecule and the total number of electrons in the molecule. If the number of positively charged ions in a molecule is greater than the number of negatively charged ions, then the molecule has a positive net charge number; conversely, if the number of negatively charged ions is greater than the number of positively charged ions, then the molecule has a negative net charge number. If the number of positively charged ions is equal to the number of negatively charged ions, then the molecule has a zero net charge number. The net charge number of a molecule can predict and explain the chemical properties and reactions of the molecule. For example, molecules with a positive net charge number will generally attract negatively charged ions and molecules, while molecules with a negative net charge number will attract positively charged ions and molecules. In addition, in computational chemistry, the net charge number of a molecule is an important parameter that describes the electronic state of a molecule.
[0072] Hamiltonian: In quantum mechanics, Hamiltonian is an operator that describes the energy of a quantum system. Hamiltonian can be used to describe the motion, interaction, and evolution of wave functions of a single particle or multiple particles. In a multi-particle system, Hamiltonian includes the sum of the kinetic energy operator and the potential energy operator of each particle. The kinetic energy operator describes the motion of the particle, while the potential energy operator describes the interaction of the particle and its potential energy in the external field. Therefore, Hamiltonian can be used to calculate the total energy of the particle. It can also be used to describe the time evolution of the system, that is, according to Hamiltonian, the wave function of the system at different time points can be calculated.
[0073] As a possible implementation of the present application, the molecular information of the molecule to be measured may include the geometric configuration, basis set, multiplicity and net charge number of the molecule to be measured, etc., and the monomer integral, double volume integral and Hamiltonian in the quantum environment where the parameterized quantum circuit runs of the molecule to be measured can be determined according to the molecular information, wherein the Hamiltonian in the quantum environment where the parameterized quantum circuit runs can be represented by H, which can be specifically represented by the following formula:
[0074]
[0075] Where n = 1, 2, 3, ..., N, N is the number of particles in the quantum system, which is related to the number of quantum bits to be used in the parameterized quantum circuit. In quantum mechanics, they represent the Pauli X operator, the Pauli Y operator, and the Pauli Z operator. is the direct product symbol in quantum computing, and I is the identity matrix. represents the energy of the motion of the entangled particles, is the energy generated by the motion of a single state instance, is a penalty term used to weaken the interference of noise in quantum devices on parameterized quantum circuits.
[0076] As a possible implementation of the present application, the HF input quantum state can be determined according to the molecular information of the molecule to be tested (such as the geometric configuration of the molecule, basis set, multiplicity, and net charge number of the molecule, etc.), that is, the molecular information is subjected to Hartree-Fock (HF) quantum state encoding calculation. The HF quantum state encoding method is a quantum chemical calculation method. In the HF calculation, the movement of electrons is described as a linear combination of single electron wave functions in a fixed molecular potential energy field. Each electron in the molecule is described as a spin orbit, where each spin orbit has a coefficient, and these coefficients can minimize the energy. The HF calculation can obtain the HF wave function, that is, the HF input quantum state, by solving the HF nonlinear equations. The wave function is the basis for describing the molecular electronic structure. The HF nonlinear equations can be expressed as:
[0077] H HF ψ i =∈ i ψ i
[0078] Among them, H HF is the HF Hamiltonian, ψ i is the molecular orbital wave function of the i-th electron in the molecule to be measured, that is, the HF input quantum state, which can be represented by |φ>, ∈ i is the molecular orbital energy of the i-th electron in the molecule to be measured. The Hamiltonian of the HF input quantum state |φ> can be written as follows:
[0079]
[0080] Where N is the number of electrons in the molecule to be measured, M is the number of atoms in the molecule to be measured, and Z A is the nuclear charge of the Ath atom, r iA is the distance between the ith electron and the Ath atom, r ij is the distance between the i-th and j-th electrons. J ij and K ij denote the Coulomb integral and the exchange integral respectively.
[0081] As a possible implementation of the present application, when quantum mechanics is used to solve chemical problems, Hamiltonian can be used to describe the chemical system involved in the chemical problem. The ground state and excited state of the system can be calculated based on Hamiltonian, and all physical properties of the quantum system can be further explored using this information. Hamiltonian is related to the total energy of the physical system, which can usually be expressed as the sum of kinetic energy and potential energy, that is, it can be expressed as:
[0082]
[0083] in, Indicates kinetic energy, Represents potential energy.
[0084] The electronic Hamiltonian is the Hamiltonian related to the motion electronic structure of the molecule to be measured. Based on the molecular information, the electronic Hamiltonian can be determined as:
[0085]
[0086] Among them, the formula uses atomic units, H e represents the electronic Hamiltonian, which contains N electrons and M nuclei, where x i is the position of the ith electron, R I is the position of the Ith nucleus.
[0087] Step 102: Determine a parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator.
[0088] In one possible implementation, the parameterized quantum circuit architecture can be determined by decomposing a unitary operator containing a Hamiltonian, wherein the unitary operator also includes adjustable parameters.
[0089] Furthermore, the unitary operator containing the Hamiltonian can be decomposed and derived to determine each quantum gate, and the parameterized quantum circuit architecture can be determined based on each quantum gate, thereby improving the accuracy of parameterized quantum circuit generation. That is, in a possible implementation of the embodiment of the present application, the above step 102 may include:
[0090] Step 1021, substituting the Hamiltonian into the unitary operator;
[0091] Step 1022, decomposing and deriving the unitary operator substituted into the Hamiltonian to determine various quantum gates, wherein the quantum gates include quantum gates of various rotation angles and a controlled NOT gate;
[0092] Step 1023: Determine the parameterized quantum circuit architecture according to each of the quantum gates.
[0093] As a possible implementation of the present application, the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates can be substituted into the unitary operator, and the unitary operator U(α) can be expressed as:
[0094]
[0095] Among them, ρ=1,2,3…,M, M is the number of system evolution steps, α is the parameter that needs to be updated in the parameterized quantum circuit, ρ represents the quantum circuit parameters about the ρth step of the evolution.
[0096] After substituting the Hamiltonian in the quantum environment where the parameterized quantum circuit runs into the unitary operator, the unitary operator can be expressed as:
[0097]
[0098] The unitary operator substituted into the Hamiltonian is decomposed and derived to determine each quantum gate, namely:
[0099]
[0100] According to the above derivation, we can determine that the quantum gates of the parameterized quantum circuit are: the rotation angle is 2α ρ R y (2α ρ ) door, rotation angle is -α ρ R z (-α ρ ), the rotation angle is 2α ρ R x (2α ρ ) gate and controlled NOT gate.
[0101] As a possible implementation method, a parameterized quantum circuit architecture can be determined based on different numbers of individual quantum gates.
[0102] As an example, Figure 2 As shown, a series of controllable NOT gates can be used to generate entangled states, and the number of evolution steps M=1 and the number of quantum bits N=4 are set, that is, one layer of quantum circuit and 4 quantum bits are used to determine the parameterized circuit architecture.
[0103] Step 103: generating an initial parameterized quantum circuit according to the parameterized quantum circuit architecture.
[0104] As a possible implementation method, an initial parameterized quantum circuit may be generated according to the molecular information of the molecule to be tested and the parameterized quantum circuit architecture, wherein the initial parameterized quantum circuit includes parameters to be trained.
[0105] Step 104, constructing a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator.
[0106] In a possible implementation, after the initial parameterized quantum circuit is generated, the loss function of the initial parameterized quantum circuit can be determined. The loss function is an algorithm that measures the degree of fit between the model and the data. The loss function of the initial parameterized quantum circuit includes parameters to be trained and can be generated based on the HF input quantum state, the electronic Hamiltonian and the unitary operator.
[0107] Furthermore, the output quantum state can be generated by inputting the quantum state and the unitary operator through HF, and the loss function can be constructed according to the output quantum state. That is, in a possible implementation of the embodiment of the present application, the above step 104 can include:
[0108] Step 1041, generating a trial wave function according to the HF input quantum state and the unitary operator;
[0109] Step 1042, constructing the loss function according to the trial wave function and the electronic Hamiltonian.
[0110] In one possible implementation, the unitary operator U(α) can be applied to the HF input quantum state to obtain the output quantum state, namely the trial wave function, and then the loss function is constructed based on the trial wave function and the electronic Hamiltonian.
[0111] Furthermore, a loss function may be constructed based on the expected value of the trial wave function and the electronic Hamiltonian. That is, in a possible implementation of the embodiment of the present application, the above steps of constructing the loss function based on the trial wave function and the electronic Hamiltonian may include:
[0112] The loss function is constructed according to the energy expectation value of the trial wave function with respect to the electronic Hamiltonian.
[0113] As a possible implementation of the present application, a loss function can be constructed based on the energy expectation value of the trial wave function with respect to the electron Hamiltonian, as shown below:
[0114]
[0115] Among them, α is the parameter to be trained, is the loss function, |ψ(α)> is the trial wave function, k=1,2,3,…,N is the number of intermediate states generated during the evolution process, c k is the number of intermediate states produced.
[0116] Step 105: generating the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function, wherein the parameterized quantum circuit is used to measure the molecular ground state energy.
[0117] As a possible implementation method, the parameters in the parameterized quantum circuit can be determined according to the loss function, and the determined parameters can be substituted into the initial parameterized quantum circuit to generate a parameterized quantum circuit for measuring the ground state energy of a molecule.
[0118] Furthermore, the initial parameterized quantum circuit can be iteratively optimized through the loss function to generate a parameterized quantum circuit, thereby improving the accuracy of the parameterized quantum circuit generation. That is, in a possible implementation of the embodiment of the present application, the above step 105 may include:
[0119] Step 1501: Iteratively optimize the parameters in the initial parameterized quantum circuit by using the loss function to generate the parameterized quantum circuit.
[0120] In a possible implementation, the initial parameterized quantum circuit can be iteratively optimized continuously in the process of making the loss function reach the target value, thereby generating a parameterized quantum circuit.
[0121] Furthermore, the theoretical ground state energy of the molecule to be tested can be determined according to the iteratively optimized initial parameterized quantum circuit, and a parameterized quantum circuit can be generated according to the theoretical ground state energy and the actual ground state energy, thereby further improving the accuracy of the generated parameterized quantum circuit. That is, in a possible implementation of the embodiment of the present application, the above-mentioned iterative optimization of the parameters in the initial parameterized quantum circuit by the loss function to generate the parameterized quantum circuit can include:
[0122] When the value of the loss function is calculated to be the minimum, the corresponding updated initial parameterized quantum circuit;
[0123] Calculating the theoretical ground state energy of the molecule to be measured by using the updated initial parameterized quantum circuit;
[0124] The parameterized quantum circuit is generated according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured.
[0125] The theoretical ground state energy is the molecular ground state energy of the molecule to be measured, which is calculated based on the initial parameterized quantum circuit.
[0126] In one possible implementation, the parameters corresponding to when the loss function reaches the minimum value can be substituted into the initial parameterized quantum circuit to generate the corresponding updated initial parameterized quantum circuit. The corresponding trial wave function is determined through the updated initial parameterized quantum circuit, thereby determining the theoretical ground state energy of the molecule to be tested. Based on the relationship between the theoretical ground state energy and the actual ground state energy of the molecule to be tested, it is determined whether to continue training the initial parameterized quantum circuit, thereby determining the final parameterized quantum circuit.
[0127] Furthermore, an energy difference threshold may be set to determine whether to continue training the updated initial parameterized quantum circuit, thereby further improving the accuracy of the generated parameterized quantum circuit. That is, in a possible implementation of the embodiment of the present application, the above-mentioned generation of the parameterized quantum circuit based on the theoretical ground state energy and the actual ground state energy of the molecule to be tested may include:
[0128] If the difference between the theoretical ground state energy and the actual ground state energy is less than a preset energy difference threshold, determining the updated initial parameterized quantum circuit as the parameterized quantum circuit;
[0129] If the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the updated initial parameterized quantum circuit is retrained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the initial parameterized quantum circuit after training and updating is determined as the parameterized quantum circuit.
[0130] As a possible implementation method, a preset energy difference threshold can be set to determine the relationship between the difference between the theoretical ground state energy and the actual ground state energy and the preset energy difference threshold. If it is less than the preset energy difference threshold, it can be explained that the updated initial parameterized quantum circuit can meet the requirements of molecular ground state energy measurement, and the updated initial parameterized quantum circuit is determined as the parameterized quantum circuit; if the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the generated quantum state can be re-substituted into the updated initial parameterized quantum circuit, and it is re-trained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the updated initial parameterized quantum circuit is determined as the parameterized quantum circuit.
[0131] As an example, the preset energy difference threshold may be e -6 (can be regarded as the smallest distance unit), when the difference between the theoretical ground state energy and the actual ground state energy is less than e -6 When the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to e -6 When the initial parameterized quantum circuit is updated, the training is performed again until the difference between the theoretical ground state energy and the actual ground state energy after the training is updated is less than e -6 .
[0132] It should be noted that, in actual use, the preset energy difference threshold can be determined according to actual usage requirements and application scenarios, and the embodiments of the present application do not limit this.
[0133] In a possible implementation, the process of a method for generating a parameterized quantum circuit provided by the present application can be as follows: Figure 3 As shown. Figure 3 First, according to the molecular information of the molecule to be measured, the Hamiltonian in the quantum environment where the parameterized quantum circuit operates, the HF input quantum state |φ> and the electronic Hamiltonian H of the molecule to be measured can be generated. e , then, a parameterized quantum circuit architecture is generated according to the Hamiltonian, thereby generating an initial parameterized quantum circuit. Then, the HF input quantum state |φ> is input into the initial parameterized quantum circuit to obtain the output quantum state |ψ>. Finally, according to the output quantum state |ψ> and the electronic Hamiltonian H e , construct a loss function, update the parameters by minimizing the loss function (for example, by gradient descent method), and substitute the parameters into the initial parameterized quantum circuit, and recalculate until a parameterized quantum circuit that meets the conditions for measuring the ground state energy of the molecule is generated.
[0134] Furthermore, a parameterized quantum circuit generated according to a method for generating a parameterized quantum circuit provided by the present application can also be used to determine the ground state energy of a lithium hydrogen new energy battery, so that a lithium hydrogen new energy battery energy determination method can be determined. The lithium hydrogen new energy battery is a new type of high energy density battery. Due to its high energy density, long life and environmental protection, it has become a research hotspot in the field of new energy batteries. In the research and development process of lithium hydrogen new energy batteries, the ground state energy determination is indispensable. The lithium hydrogen new energy battery energy determination method is mainly used to determine the ground state energy performance parameters of the lithium hydrogen new energy battery, so as to evaluate the performance of the lithium hydrogen new energy battery. The research and development and application of the lithium hydrogen new energy battery energy determination method can not only help researchers better understand the electrochemical properties of lithium hydrogen new energy batteries, but also provide reliable experimental data and guidance for the design and optimization of lithium hydrogen new energy batteries.
[0135] The following is a detailed description of the energy measurement method for lithium hydrogen new energy batteries:
[0136] Step S1, selecting appropriate measuring equipment: equipment that can accurately measure the energy of lithium hydrogen batteries can be selected, including ammeters, voltmeters, and resistance meters.
[0137] Step S2, establishing circuit connection: connecting devices such as an ammeter, a voltmeter and an ohmmeter to the lithium hydrogen battery so as to measure the current, voltage and internal resistance of the battery and obtain molecular information of the lithium hydrogen battery.
[0138] Step S3, measuring the battery current: the battery current is measured by an ammeter, and a series resistor may be added between the battery and the load to measure the current of the lithium hydrogen new energy battery.
[0139] Step S4, measuring the battery voltage: a voltmeter may be connected to the positive and negative electrodes of the battery to measure the battery voltage through the voltmeter.
[0140] Step S5, measuring the internal resistance of the battery: an ohmmeter may be connected to the positive and negative electrodes of the battery, and the current and voltage passing through the ohmmeter may be measured to measure the internal resistance of the battery.
[0141] Step S6, calculating energy: inputting the measured values of current, voltage and internal resistance of the lithium hydrogen new energy battery and the lithium hydrogen molecular structure information (geometric configuration, basis set, multiplicity and net charge number of the molecule and other information) into the above-mentioned parameterized quantum circuit for measuring the molecular ground state energy, and calculating the ground state energy of the lithium hydrogen battery by quantum computing.
[0142] Step S7, recording data: recording the measured current, voltage, internal resistance and ground state energy values, and performing data analysis and comparison to evaluate the performance and stability of the lithium hydrogen battery.
[0143] The method for generating a parameterized quantum circuit provided in an embodiment of the present application constructs a parameterized quantum circuit architecture by parameterizing the Hamiltonian and the unitary operator in the quantum environment in which the quantum circuit runs, generates an initial parameterized quantum circuit, and generates a parameterized quantum circuit for measuring the molecular ground state energy according to the constructed loss function and the initial parameterized quantum circuit, so that the quantum circuit can be controlled by adjustable parameters, thereby improving the flexibility and scalability of the quantum circuit and the accuracy of the molecular ground state energy measurement. A trial wave function is generated by inputting the quantum state and the unitary operator through HF, and the loss function is constructed according to the trial wave function and the electronic Hamiltonian. The parameters in the initial parameterized quantum circuit are iteratively optimized through the loss function, the relationship between the theoretical ground state energy and the actual ground state energy is judged, and the parameterized quantum circuit is determined, thereby improving the accuracy of the parameterized quantum circuit and further improving the accuracy of the molecular ground state energy measurement.
[0144] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0145] Corresponding to the method for generating parameterized quantum circuits described in the above embodiment, Figure 4 A structural block diagram of an apparatus for generating a parameterized quantum circuit provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0146] Reference Figure 4 , the device 40 comprises:
[0147] A first determination module 41 is used to determine the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates, the HF input quantum state and the electronic Hamiltonian of the molecule to be measured according to the molecular information of the molecule to be measured;
[0148] A second determination module 42 is used to determine a parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator;
[0149] A first generating module 43, configured to generate an initial parameterized quantum circuit according to the parameterized quantum circuit architecture;
[0150] A construction module 44, for constructing a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator;
[0151] The second generating module 45 is used to generate the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function, wherein the parameterized quantum circuit is used to measure the molecular ground state energy.
[0152] In actual use, the apparatus for generating a parameterized quantum circuit provided in the embodiment of the present application can be configured in any terminal device to execute the aforementioned method for generating a parameterized quantum circuit.
[0153] The device for generating a parameterized quantum circuit provided in the embodiment of the present application constructs a parameterized quantum circuit architecture by parameterizing the Hamiltonian and the unitary operator in the quantum environment in which the quantum circuit operates, generates an initial parameterized quantum circuit, and generates a parameterized quantum circuit for measuring the molecular ground state energy based on the constructed loss function and the initial parameterized quantum circuit, so that the quantum circuit can be controlled by adjustable parameters, thereby improving the flexibility and scalability of the quantum circuit and improving the accuracy of the molecular ground state energy measurement.
[0154] In a possible implementation form of the present application, the second determining module 42 includes:
[0155] A substitution unit, used for substituting the Hamiltonian into the unitary operator;
[0156] A derivation unit, configured to decompose and derive the unitary operator substituted into the Hamiltonian to determine various quantum gates, wherein the quantum gates include quantum gates of various rotation angles and a controlled NOT gate;
[0157] The first determining unit is used to determine the parameterized quantum circuit architecture according to each of the quantum gates.
[0158] Furthermore, in another possible implementation form of the present application, the building module 44 includes:
[0159] A first generating unit, configured to generate a trial wave function according to the HF input quantum state and the unitary operator;
[0160] A construction unit is used to construct the loss function according to the trial wave function and the electronic Hamiltonian.
[0161] Furthermore, in another possible implementation form of the present application, the above-mentioned construction unit is specifically used for:
[0162] The loss function is constructed according to the energy expectation value of the trial wave function with respect to the electronic Hamiltonian.
[0163] Furthermore, in another possible implementation form of the present application, the second generating module 45 includes:
[0164] The second generating unit is used to iteratively optimize the parameters in the initial parameterized quantum circuit through the loss function to generate the parameterized quantum circuit.
[0165] Furthermore, in another possible implementation form of the present application, the second generating unit is specifically used to:
[0166] When the value of the loss function is calculated to be the minimum, the corresponding updated initial parameterized quantum circuit;
[0167] Calculating the theoretical ground state energy of the molecule to be measured through the updated initial parameterized quantum circuit;
[0168] The parameterized quantum circuit is generated according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured.
[0169] Furthermore, in a possible implementation form of the present application, the second generating unit is further configured to:
[0170] If the difference between the theoretical ground state energy and the actual ground state energy is less than a preset energy difference threshold, determining the updated initial parameterized quantum circuit as the parameterized quantum circuit;
[0171] If the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the updated initial parameterized quantum circuit is retrained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the initial parameterized quantum circuit after training and updating is determined as the parameterized quantum circuit.
[0172] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0173] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0174] In order to implement the above embodiments, the present application also proposes a terminal device.
[0175] Figure 5 A schematic diagram of the structure of a terminal device according to an embodiment of the present application.
[0176] like Figure 5 As shown, the terminal device 200 includes:
[0177] A memory 210 and at least one processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the method for generating a parameterized quantum circuit described in the embodiment of the present application is implemented.
[0178] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0179] The terminal device 200 typically includes a variety of electronic device readable media, which can be any available media that can be accessed by the terminal device 200, including volatile and non-volatile media, removable and non-removable media.
[0180] The memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The terminal device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0181] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 270 generally perform the functions and / or methods of the embodiments described herein.
[0182] The terminal device 200 can also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), and can also communicate with one or more devices that enable users to interact with the terminal device 200, and / or communicate with any device that enables the terminal device 200 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be carried out through an input / output (I / O) interface 292. In addition, the terminal device 200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 293. As shown in the figure, the network adapter 293 communicates with other modules of the terminal device 200 through a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal device 200, including but not limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive, and data backup storage system, etc.
[0183] The processor 220 executes various functional applications and data processing by running the programs stored in the memory 210 .
[0184] It should be noted that the implementation process and technical principles of the terminal device of this embodiment refer to the aforementioned explanation of the method for generating parameterized quantum circuits in the embodiment of the present application, which will not be repeated here.
[0185] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0186] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0188] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0189] 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.
[0190] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or 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.
[0191] 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.
[0192] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for generating a parameterized quantum circuit, characterized in that: include: Determine the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates, the HF input quantum state, and the electronic Hamiltonian of the molecule to be measured according to the molecular information of the molecule to be measured; Determining a parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator; According to the parameterized quantum circuit architecture, generating an initial parameterized quantum circuit; constructing a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator; The parameterized quantum circuit is generated according to the initial parameterized quantum circuit and the loss function, and the parameterized quantum circuit is used to measure the molecular ground state energy.
2. The method according to claim 1, characterized in that Determining a parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator includes: Substituting the Hamiltonian into the unitary operator; Decomposing and deriving the unitary operator substituted into the Hamiltonian to determine various quantum gates, wherein the quantum gates include quantum gates of various rotation angles and a controlled NOT gate; The parameterized quantum circuit architecture is determined according to each of the quantum gates.
3. The method according to claim 1, characterized in that The constructing of a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator comprises: generating a trial wave function according to the HF input quantum state and the unitary operator; The loss function is constructed according to the trial wave function and the electronic Hamiltonian.
4. The method according to claim 3, characterized in that The step of constructing the loss function according to the trial wave function and the electronic Hamiltonian comprises: The loss function is constructed according to the energy expectation value of the trial wave function with respect to the electronic Hamiltonian.
5. The method according to claim 1, characterized in that The step of generating the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function comprises: The parameters in the initial parameterized quantum circuit are iteratively optimized by using the loss function to generate the parameterized quantum circuit.
6. The method according to claim 5, characterized in that The iterative optimization of the parameters in the initial parameterized quantum circuit by the loss function to generate the parameterized quantum circuit includes: When the value of the loss function is calculated to be the minimum, the corresponding updated initial parameterized quantum circuit; Calculating the theoretical ground state energy of the molecule to be measured by using the updated initial parameterized quantum circuit; The parameterized quantum circuit is generated according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured.
7. The method according to claim 6, characterized in that The generating the parameterized quantum circuit according to the theoretical ground state energy and the actual ground state energy of the molecule to be measured comprises: If the difference between the theoretical ground state energy and the actual ground state energy is less than a preset energy difference threshold, determining the updated initial parameterized quantum circuit as the parameterized quantum circuit; If the difference between the theoretical ground state energy and the actual ground state energy is greater than or equal to the preset energy difference threshold, the updated initial parameterized quantum circuit is retrained and updated until the difference between the theoretical ground state energy and the actual ground state energy after training and updating is less than the preset energy difference threshold, and the initial parameterized quantum circuit after training and updating is determined as the parameterized quantum circuit.
8. A device for generating a parameterized quantum circuit, characterized in that: include: A first determination module is used to determine the Hamiltonian in the quantum environment in which the parameterized quantum circuit operates, the HF input quantum state and the electronic Hamiltonian of the molecule to be measured according to the molecular information of the molecule to be measured; A second determination module is used to determine a parameterized quantum circuit architecture according to the Hamiltonian and the unitary operator; A first generating module, configured to generate an initial parameterized quantum circuit according to the parameterized quantum circuit architecture; A construction module, for constructing a loss function according to the HF input quantum state, the electronic Hamiltonian and the unitary operator; The second generating module is used to generate the parameterized quantum circuit according to the initial parameterized quantum circuit and the loss function, and the parameterized quantum circuit is used to measure the molecular ground state energy.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by an electronic device, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method and system for determining reactivity of material molecules based on quantum computing
CN120375988A
Non-linear data generation and processing method based on light quantum and light quantum computer
CN120893592A