Quantum chemistry Hamiltonian rapid generation method and device based on stability sub-table
Through a method based on stable subtables, the fermion Hamiltonian is converted into a bosonic Hamiltonian representation, which solves the problems of low computational efficiency and high memory usage in existing technologies, improves the Hamiltonian generation speed and reduces memory usage, and is suitable for quantum chemical calculations of complex molecules.
Patent Information
- Application Number
- CN202510963649.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-09-09
AI Technical Summary
Existing technologies have problems with low computational efficiency, excessive memory usage, and limited scalability when converting fermion Hamiltonians into bosonic forms that can be processed by quantum bits. These problems are particularly inadequate when processing complex molecules and cannot meet actual needs.
A method based on stable subtables is used to transform the single-electron integral terms and the two-electron integral terms of the fermionic Hamiltonian into the bosonic Hamiltonian representation. Then, through the simplified processing of the Pauli check matrix and the coefficient vector, the Hamiltonian is generated using the stable subtable form, including symmetry partitioning, sparsity screening and Pauli check matrix merging.
It significantly improves the speed of Hamiltonian generation, reduces memory usage, and supports quantum chemical calculations of larger molecules. The computing speed is increased by a hundred times and the memory usage is reduced by 90%, making it suitable for more complex quantum chemical calculations.
Smart Images

Figure CN120611804A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum computing, and in particular to a method and device for rapidly generating a quantum chemical Hamiltonian based on a stable subtable. Background Art
[0002] One of the core challenges of quantum computing in the field of chemical simulation is to efficiently convert the fermion Hamiltonian into a bosonic form that can be processed by quantum bits. Among the related technologies, it mainly relies on classical methods such as Jordan-Wigner (JW), Bravyi-Kitaev (BK) and parity transformation (such as Qiskit, OpenFermion and other software implementations). Taking the JW transformation as an example, it realizes the mapping of fermion annihilation operators and production operators through the product of chained Z operators, and finally generates a bosonic Hamiltonian composed of Pauli matrices (X, Y, Z). This type of method performs well in small molecules (such as hydrogen), but its efficiency drops sharply when facing complex molecules. The main problems are as follows:
[0003] 1. Low computational efficiency: The reliance on symbolic operations or complex matrix multiplication to process Pauli terms causes the generation time to grow exponentially with the number of terms. For example, generating the Hamiltonian for the benzene molecule (STO-3G basis set, 72 total orbitals) takes 1-2 days, which is not practical.
[0004] 2. Excessive memory usage: Traditional Pauli term storage uses high-dimensional tensors or dictionaries. When processing large molecules, the memory usage exceeds the capacity of a single machine.
[0005] 3. Limited scalability: two-electron integral matrix g pqrs The fourth power complexity of leads to an explosion in the number of terms, and existing methods cannot effectively merge sparse terms or eliminate low-contribution terms. Summary of the Invention
[0006] The purpose of this application is to provide a method and device for quickly generating quantum chemical Hamiltonians based on stable subtables, aiming to increase the generation speed of Hamiltonians that can be used for quantum chemical calculations for macromolecules.
[0007] A first aspect of the present application provides a method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable, the method comprising:
[0008] Get the single electron integral term of the target fermion Hamiltonian Double electron integral term and the nuclear energy term h nuc , and store the nuclear energy term, where h pq is the single electron integral, g pqrs is the double electron integral, p, q, r, s represent the electron orbits, is the production operator, a is the annihilation operator;
[0009] Based on quantum chemical symmetry, equal di-electron integrals are divided into the same calculation object class, and the di-electron integral terms corresponding to the di-electron integrals whose absolute values are less than the threshold are deleted;
[0010] Converting the single-electron integral term and the two-electron integral term into a bosonic Hamiltonian representation, wherein the bosonic Hamiltonian representation includes a Pauli product term or a sum of multiple Pauli product terms, where the Pauli product term is the product of a Pauli coefficient and a Pauli term, and the Pauli term is a tensor product of Pauli operators;
[0011] Filling the stable subform table based on all Pauli terms, obtaining a Pauli check matrix in which each row vector is used to represent a Pauli term, and recording the Pauli coefficients of the Pauli terms corresponding to the row vector to obtain a coefficient vector;
[0012] Merge the same row vectors in the Pauli check matrix, add the Pauli coefficients corresponding to the merged row vectors, and delete the row vectors with a Pauli coefficient of 0;
[0013] A Pauli check matrix and a coefficient vector are stored to represent a Hamiltonian for quantum chemical calculation based on the Pauli check matrix, the coefficient vector, and the nuclear energy term.
[0014] Optionally, dividing equal two-electron integrals into the same calculation object class based on quantum chemical symmetry includes:
[0015] Determination of g in the two-electron integral based on quantum chemical symmetry pqrs =g pqrs =g pqsr =g pqsr , and g in the double electron integral pqrs 、g pqrs 、g pqsr and g pqsr Classify into the same computing object class.
[0016] Optionally, the threshold is 10 -6 Ha.
[0017] Optionally, converting the single-electron integral term and the two-electron integral term into a Bosonic Hamiltonian representation includes:
[0018] Determine the mapping relationship between annihilation operator and production operator into Pauli operator representation based on JW transformation;
[0019] Converting the single electron integral term into a bosonic Hamiltonian representation based on the mapping relationship;
[0020] Based on the mapping relationship, the di-electron integral term is converted into a bosonic Hamiltonian representation.
[0021] Optionally, converting the single-electron integral term into a bosonic Hamiltonian representation based on the mapping relationship includes:
[0022] Based on a preset mapping relationship table of single-electron integral terms into bosonic Hamiltonian representations, the single-electron integral terms are replaced with corresponding bosonic Hamiltonian representations;
[0023] The preset mapping relationship table is obtained based on the following steps:
[0024] Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator is replaced by the annihilation operator of the single-electron integral term, and based on the mapping relationship, the Pauli operator representation corresponding to the generation operator is replaced by the generation operator of the single-electron integral term to obtain a first expression; the first expression is expanded to a univariate polynomial form of the Pauli term to obtain a bosonic Hamiltonian representation corresponding to the single-electron integral term, and the mapping relationship from the single-electron integral term to the corresponding bosonic Hamiltonian representation is stored to obtain a preset mapping relationship table.
[0025] Optionally, converting the two-electron integral term into a bosonic Hamiltonian representation based on the mapping relationship includes:
[0026] Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator is used to replace the annihilation operator of the di-electron integral term; based on the mapping relationship, the Pauli operator representation corresponding to the generation operator is used to replace the generation operator of the di-electron integral term, to obtain a second expression;
[0027] Expanding the second expression into a univariate polynomial form of the Pauli term, we obtain the Bosonic Hamiltonian representation corresponding to the two-electron integral term.
[0028] Optionally, the elements of the Pauli check matrix are 0 or 1, and the Pauli check matrix includes a left matrix and a right matrix, and the row vectors of the same row of the left matrix and the right matrix are used to represent a corresponding Pauli term, and two elements belonging to the same row and located in the same order of the left matrix and the right matrix are used to represent the Pauli operators of corresponding order in the corresponding Pauli term, wherein the elements corresponding to the identity operator located in the left matrix and the right matrix are both 0, σ x The Pauli operator corresponds to the elements of the left and right matrices are 1 and 0, respectively, σ y The elements of the left and right matrices corresponding to the Pauli operator are both 1, σ z The Pauli operator corresponds to elements 0 and 1 in the left and right matrices respectively.
[0029] Optionally, merging identical row vectors in the Pauli check matrix includes:
[0030] Treating each row of the Pauli check matrix as a binary number, and converting the binary number into a number with a base higher than binary;
[0031] The converted base numbers are sorted so that the same base numbers are adjacent, and the adjacent same base numbers are merged to achieve merging of the same row vectors of the Pauli check matrix.
[0032] In a second aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0033] According to a third aspect of the present application, an electronic device is provided, comprising:
[0034] a memory having a computer program stored thereon;
[0035] A processor is used to execute the computer program in the memory to implement the steps of any one of the methods in the first aspect.
[0036] Through the above technical solution, the di-electron integrals of the target fermion Hamiltonian are classified, which can improve the efficiency of subsequent computational operations. By eliminating electron integral terms with coefficients whose absolute values are less than a threshold, the number of computational terms can be reduced while ensuring accuracy. The single-electron and di-electron integral terms are then converted into a bosonic Hamiltonian form represented by Pauli terms. A table of stable subforms is further populated to obtain a Pauli check matrix representing the Pauli terms. Identical row vectors are merged, and row vectors with coefficients of 0 are deleted to further reduce the electron integral terms, simplifying the electron integral terms and, in turn, the Hamiltonian. This improves the Hamiltonian's conversion efficiency. The Pauli check matrix can be stored in a hash table, reducing memory usage. By storing the optimized Pauli check matrix, coefficient vectors, and nuclear energy terms, these data can be retrieved for subsequent quantum chemical calculations. This improves the computational efficiency of the optimized Hamiltonian during quantum chemical calculations.
[0037] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the present application but do not constitute a limitation of the present application. In the accompanying drawings:
[0039] Figure 1 The present invention is a flowchart of a method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable according to an exemplary embodiment.
[0040] Figure 2 is another flow chart of a method for quickly generating a quantum chemical Hamiltonian based on a stable subtable according to an exemplary embodiment.
[0041] Figure 3 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0042] The following describes the specific embodiments of the present application in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present application and are not intended to limit the present application.
[0043] While qubits themselves are bosonic, the microscopic particles of the physical world are primarily fermions. To translate many physical problems involving microscopic processes into a form that can be described by a quantum computer, we need to convert the fermionic Hamiltonian, which is expressed in fermions, into a bosonic Hamiltonian, or, in other words, into a qubit Hamiltonian. This conversion can be accomplished through Jordan-Wigner (JW), parity, or Bravyi-Kitaev (BK) transformations.
[0044] However, in practice, it has been found that when the number of terms in the initial Hamiltonian is large, this conversion process becomes extremely slow. For example, for the benzene molecule, using Qiskit software on a single machine to generate the Hamiltonian for the simple basis set STO-3G can take one to two days, or even longer. This is because polynomials of the Pauli matrices X, Y, and Z are generated during this process, and operations and simplifications on these matrix polynomials are often performed through complex matrix products or symbolic operations, which are quite slow.
[0045] Considering that the product of X, Y, and Z is closed when the coefficients are ignored, the stabilizer formalism and its tableau representation have been proposed. Further considering the possible coefficients ±1 and ±i in the product, a complete tableau representation has been proposed. Because the (complete) tableau representation of the stabilizer formalism involves only simple operations on classical bits, the computational speed is greatly improved. Based on this, the stabilizer tableau is being considered to speed up the conversion from the fermionic Hamiltonian to the bosonic Hamiltonian and improve the computational efficiency of related quantum chemistry calculations.
[0046] In the context of quantum mechanics or quantum information theory, an operator P satisfies:
[0047] P|ψ>=|ψ> (1)
[0048] The operator P is called a stabilizer with |ψ> as its eigenstate and the corresponding eigenvalue +1.
[0049] On n quantum bits, the Pauli group is defined as:
[0050]
[0051] P n is closed under multiplication (except for phase), and thus forms a group.
[0052] Suppose we take P n A subgroup G of , if for any g∈G it satisfies g|ψ>=|ψ>, such G is called a "stabilizer group".
[0053] To describe a group, we usually only need to give its set of generators. For a system of n qubits, the number of generators of a stable subgroup determines the strength of its constraints and the dimension of the corresponding stable substate. Here, the generators are a set of commutative Pauli operators, also known as Pauli operators, through their generation operations, the entire stable subgroup G can be constructed. That is,
[0054] G= <g1,g2,…,g r > (3)
[0055] It means that G is composed of generators g1, g2, ..., g r The subgroup generated by all possible products.
[0056] When the number of generators is equal to n, a certain state is stabilized, and when the number of generators is less than n, a subspace V is stabilized.
[0057] Let's take a simple example of two bits (n=2). Suppose we take a stable subgroup G consisting of two commutative generators:
[0058]
[0059] Both operators belong to P 2 , and they are commutative, so they can be diagonalized simultaneously (or decomposed into common eigenstates simultaneously). For g1 and g2, the +1 subspace has only one dimension (ignoring the overall phase), and the corresponding state is This is one of the famous Bell states.
[0060] In the stable subformat, the Pauli operator can usually be represented by a Boolean matrix (or bit matrix). For a Pauli operator on n qubits (such as X, Y, Z), we can map it to a bit string (bit string) of length 2n:
[0061] r(P)=(x1,x2,…,x n |z1,z2,…,z n ) (4)
[0062] Among them, the X bit on the left corresponds to the X operation of the quantum bit (1 is activated, 0 is inactivated), the Z bit on the right corresponds to the Z operation, and the Y operation activates both the X and Z bits at the same time. This representation can convert the multiplication and commutativity of the Pauli operator into Boolean operations, and the complexity is reduced from O(2 n ) is reduced to O(n).
[0063] The rules are as follows:
[0064] 1. If the i-th position is Z, then z i is 1 if the value is set, otherwise it is 0.
[0065] 2. If the i-th position is X, then x i is 1 if the value is set, otherwise it is 0.
[0066] 3. If the i-th position is Y, then z i and x i are all 1, otherwise they are all 0.
[0067] Thus, a Pauli term can be represented by a binary vector of length (2n) (or longer by one bit, including phase information). Using bitwise operations, Pauli operator multiplication, commutation relations, and simplifications can be performed quickly within the Boolean domain. When there are a large number of Pauli terms (for example, in Hamiltonian expansions), using a binary table format can significantly reduce memory usage and speed up merging and multiplication operations.
[0068] Stacking the above Boolean vectors into a table form and using continuous vertical lines to separate the X and Z parts gives the following stable subtable:
[0069]
[0070] The fermion Hamiltonian in a chemical system can be written as the Fermi creation and annihilation operator 、a linear or bilinear combination, when we use transformations (such as JW transformation, BK transformation, Parity transformation, etc.) to map these operators to a series of Pauli operators, a Bosonic Hamiltonian H consisting of Pauli terms and Pauli coefficients will be generated. q :
[0071] Hq =∑ i c i P i (6)
[0072] Among them, c i represents the Pauli coefficient of the i-th term, P i represents the i-th Pauli term.
[0073] Because the tabular form is defined on the Pauli string, we can define the matrix form of the Pauli sum (hereinafter referred to as the Pauli matrix or Pauli check matrix) in the same way as the stable subtabular form:
[0074]
[0075] This Hamiltonian has great advantages in generation and is especially suitable for Hamiltonians with larger numbers of polynomials.
[0076] Take the Jordan-Wigner transform as an example:
[0077]
[0078] Now we can write:
[0079]
[0080] The leftmost column of this matrix contains the coefficients, or c-vectors. Since the tabular form allows for multiplication and addition of Pauli terms, the fermion Hamiltonian can be processed sequentially.
[0081] Fermion Hamiltonian H e The basic form is:
[0082]
[0083] Among them, h pq is the single electron integral, g pqrs is the double electron integral, p, q, r, s represent the electron orbits, is the generation operator, a is the annihilation operator, h nuc Represents nuclear energy.
[0084] Here, the number of "electron orbitals" represented by the indices p, q, r, and s is usually more than ten times that of electrons. Therefore, for a small molecular system, H e The number of terms is still very large. The general quantum chemistry software mainly gives h pq , g pqrs and h nuc, known as "one electron integrals (oei)", "two electron integrals (tei)" and "nuclear energy".
[0085] In conventional quantum computing software, Pauli operators are typically defined as separate objects because they perform computational operations, and their high-dimensional tensor products are stored as dictionaries of these separate objects. When applied to chemical systems, this definition is inadequate for Hamiltonian generation and merging for medium- to large-scale systems due to the rapid growth in the number of terms. This patent innovatively proposes a method for generating bosonic Hamiltonians using a stable subtable format, significantly improving generation speed. It can also be easily expanded to include computational power, laying the foundation for the development of quantum computing in chemical systems. Figure 1 is a flowchart of a method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable according to an exemplary embodiment. Figure 1 , the method comprising:
[0086] S101, obtain the single electron integral term of the target fermion Hamiltonian Double electron integral term and the nuclear energy term h nuc , and store the nuclear energy term, where h pq is the single electron integral, g pqrs is the double electron integral, p, q, r, s represent the electron orbits, is the production operator and a is the annihilation operator.
[0087] S102: Classify equal di-electron integrals into the same calculation object class based on quantum chemical symmetry, and delete di-electron integral items corresponding to di-electron integrals whose absolute values are smaller than a threshold.
[0088] S103, converting the single-electron integral term and the two-electron integral term into a bosonic Hamiltonian representation, where the bosonic Hamiltonian representation includes a Pauli product term or the sum of multiple Pauli product terms, where the Pauli product term is the product of a Pauli coefficient and a Pauli term, and where the Pauli term is a tensor product of Pauli operators.
[0089] S104 , filling a stable subform table based on all Pauli terms, obtaining a Pauli check matrix in which each row vector is used to represent a Pauli term, and recording the Pauli coefficients of the Pauli terms corresponding to the row vector to obtain a coefficient vector.
[0090] S105 , merging identical row vectors in the Pauli check matrix, adding the Pauli coefficients corresponding to the merged row vectors, and deleting row vectors whose Pauli coefficient is 0.
[0091] S106 , storing a Pauli check matrix and a coefficient vector to represent a Hamiltonian for quantum chemical calculation based on the Pauli check matrix, the coefficient vector, and the nuclear energy term.
[0092] In step S101, the target fermion Hamiltonian is the fermion Hamiltonian to be converted into a bosonic Hamiltonian. Various components thereof, including the single-electron integral term, the two-electron integral term, and the nuclear energy term, can be obtained based on the representation of the target fermion Hamiltonian. For example, this information can be obtained by reading an input file or directly inputting it.
[0093] In quantum chemistry calculations, the most computationally resource-intensive operation is g pqrs Matrix, the number of floating point numbers is the fourth power of the number of tracks n 4 After conversion to Pauli matrix form, the total number (Boolean form) is 16×2n×n 4 =32n 5 However, since (1) the matrix form of the product of the annihilation operator has the same terms, (2) g pqrs is a sparse matrix; (3) For the Hamiltonian, the terms with small coefficients have little contribution to energy and properties and can be ignored. In fact, it is about n 4.5 Based on this, we consider the following steps for optimization.
[0094] After step S101 is completed, step S102 can be executed. In step S102, the electron orbitals p, q, r, s, etc. are classified. Due to the symmetry in quantum chemistry, some di-electron integrals are equal. These equal di-electron integrals can be classified into the same calculation object class. In this way, di-electron integrals of the same calculation object class can be assigned values and other operations in subsequent calculations, which can speed up their calculation speed in the computer.
[0095] Optionally, in step S102, equal two-electron integrals are divided into the same calculation object class based on quantum chemical symmetry, including:
[0096] Determination of g in the two-electron integral based on quantum chemical symmetry pqrs =g qprs =h pqsr =g pqsr , and g in the double electron integral pqsr 、g pqsr 、g pqsr and g pqsr Classify into the same computing object class.
[0097] Among them, because in quantum chemistry g pqsr =g qprs =g pqsr=g qpsr And when any of the indices are equal, the number of matrix items can be significantly reduced, so classification can be performed. pqsr 、g qprs 、g pqsr and g qpsr Classifying them into the same computing object class can reduce the number of computing steps.
[0098] For the terms in the double-electron integral whose absolute value is less than the threshold, these double-electron integral terms can be deleted to reduce the final number of terms to O(n 4.5 For example, the threshold value can be 10 -6 Ha.
[0099] After step S102 is completed, step S103 may be executed. In step S103, the single-electron integral term and the double-electron integral term are transformed to conform to the Bosonic Hamiltonian representation, that is, to be represented by Pauli terms.
[0100] Optionally, in step S103, converting the single-electron integral term and the double-electron integral term into a Bosonic Hamiltonian representation includes:
[0101] S1031, determining a mapping relationship between the annihilation operator and the creation operator into a Pauli operator representation based on the JW transformation.
[0102] S1032: Convert the single-electron integral term into a bosonic Hamiltonian representation based on the mapping relationship.
[0103] S1033, based on the mapping relationship, convert the di-electron integral term into a bosonic Hamiltonian representation.
[0104] In step S1031, the annihilation operator is determined according to the JW transformation. The mapping relationship between the conversion of the generating operator a into the Pauli operator representation using the Pauli operator can be seen in the above formulas (9) and (10) for details.
[0105] After step S1031 is completed, step S1032 may be executed. In step S1032, the single electron integral term is converted into a bosonic Hamiltonian representation based on the mapping relationship, which may include:
[0106] Based on a preset mapping relationship table of single-electron integral terms into bosonic Hamiltonian representations, the single-electron integral terms are replaced with corresponding bosonic Hamiltonian representations;
[0107] The preset mapping relationship table is obtained based on the following steps:
[0108] Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator is replaced by the annihilation operator of the single-electron integral term, and based on the mapping relationship, the Pauli operator representation corresponding to the generation operator is replaced by the generation operator of the single-electron integral term to obtain a first expression; the first expression is expanded to a univariate polynomial form of the Pauli term to obtain a bosonic Hamiltonian representation corresponding to the single-electron integral term, and the mapping relationship from the single-electron integral term to the corresponding bosonic Hamiltonian representation is stored to obtain a preset mapping relationship table.
[0109] The single-electron integral term can be directly replaced with the corresponding bosonic Hamiltonian representation using the Pauli operator according to a preset mapping table. Because the single-electron integral term is relatively simple, this method can be used to obtain the bosonic Hamiltonian representation of the single-electron integral term, which can speed up the conversion compared to direct calculation.
[0110] To obtain the preset mapping relationship table, only one calculation needs to be performed in advance to determine the mapping relationship between each single-electron integral term and its bosonic Hamiltonian representation. Specifically, the mapping relationship in S1031 can be used to replace the annihilation operator and the production operator in the single-electron integral term to obtain the corresponding first expression. The first expression is then expanded and organized into a unary polynomial form of the Pauli term as shown in formula (6). That is, the Pauli term is weighted and summed using the corresponding Pauli coefficient to obtain the bosonic Hamiltonian representation corresponding to the single-electron integral term. This corresponding mapping relationship can then be stored in the preset mapping relationship table for subsequent calculations.
[0111] In step S1033, converting the two-electron integral term into a bosonic Hamiltonian representation based on the mapping relationship may include:
[0112] Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator replaces the annihilation operator of the di-electron integral term, and based on the mapping relationship, the Pauli operator representation corresponding to the generation operator replaces the generation operator of the di-electron integral term to obtain a second expression.
[0113] Expanding the second expression into a univariate polynomial form of the Pauli term, we obtain the Bosonic Hamiltonian representation corresponding to the two-electron integral term.
[0114] Because the two-electron integral term is relatively complex, a direct calculation method is used. Referring to the calculation process of obtaining the single-electron integral term to its corresponding bosonic Hamiltonian representation in step S1032, the annihilation operator and production operator in the two-electron integral term are replaced based on the mapping relationship in S1031 to obtain a second expression. The second expression is then expanded and organized into the form of a unary polynomial of the Pauli term as shown in formula (6). That is, the Pauli term is weighted and summed using the corresponding Pauli coefficient to obtain the bosonic Hamiltonian representation corresponding to the two-electron integral term.
[0115] After step S103 is completed, step S104 can be executed. In step S104, the stable subtable can be in the form shown in formula (5), which includes two parts separated by a vertical line. Each row in the stable subtable (5) corresponds to a Pauli term of a Bosonic Hamiltonian. The two numbers in the left X part and the right Z part of each row at the same position are used to represent the corresponding Pauli operator in the corresponding Pauli term, for example, x 13 and z 13 The third Pauli operator that can be used to represent the first Pauli term in the Bosonic Hamiltonian.
[0116] Specifically, the Pauli check matrix can be obtained by filling in the stable subtable in the form of formula (5). For each Pauli term in the Bosonic Hamiltonian representation of the single-electron integral term and the two-electron integral term, referring to the rule of formula (4), each Pauli operator in the Pauli term is represented by a 0-1 number in the corresponding stable subtable form to obtain the Pauli check matrix.
[0117] The elements of the Pauli check matrix are 0 or 1, and the Pauli check matrix includes a left matrix and a right matrix. The row vectors of the same row of the left matrix and the right matrix are used to represent a corresponding Pauli term. The two elements belonging to the same row and located in the same order of the left matrix and the right matrix are used to represent the Pauli operators of the corresponding order in the corresponding Pauli term. The elements corresponding to the identity operator located in the left matrix and the right matrix are both 0, σ x The Pauli operator corresponds to the elements of the left and right matrices are 1 and 0, respectively, σ y The elements of the left and right matrices corresponding to the Pauli operator are both 1, σ z The elements of the left and right matrices corresponding to the Pauli operator are 0 and 1. Referring to formula (5), the left matrix is the matrix composed of the elements on the left side of the vertical line, and the right matrix is the matrix composed of the elements on the right side of the vertical line.
[0118] In step S104, after obtaining the Pauli check matrix, for each row vector of the Pauli check matrix, the Pauli coefficient of the Pauli item corresponding to the row vector is recorded to obtain a coefficient vector as shown in formula (8).
[0119] After step S104 is completed, step S105 can be executed. In step S105, for the Pauli check matrix, the same row vectors can be regarded as the same Pauli items, and the same row vectors can be merged to simplify the Pauli check matrix. After the same row vectors are merged, the Pauli coefficients corresponding to these row vectors are added. After the addition, row vectors with a Pauli coefficient of 0 may appear, and the row vectors with a Pauli coefficient of 0 are deleted. For example, the bit string can be sorted and then merged in order, or a hash dictionary can be used to merge, and the operation complexity is no more than o(mlog(m)). The elements of the Pauli check matrix are all 0 or 1, and can be stored in a hash table, and the binary string in tabular form is used as the key to accumulate and record the coefficients.
[0120] Optionally, in step S105, merging identical row vectors in the Pauli check matrix includes:
[0121] S1051: Consider each row of the Pauli check matrix as a binary number, and convert the binary number into a number with a base higher than binary.
[0122] S1052 , sorting the converted base numbers so that the same base numbers are adjacent, and merging the adjacent same base numbers to achieve merging of the same row vectors of the Pauli check matrix.
[0123] In step S1051, since each element of the Pauli check matrix is 0 or 1, the 0-1 digital string formed by its row vector arranged in the original order can be regarded as a binary number. The binary number is converted into a high-base number, such as octal, decimal or hexadecimal, etc. This can reduce the space required for data storage and facilitate the sorting and classification of row vectors.
[0124] After step S1051 is completed, step S1052 can be executed. In step S1052, the converted base numbers are sorted. For example, after the row vectors are converted into decimal numbers, these decimal numbers can be sorted by size using sorting methods such as quick sort. In this way, the decimal numbers corresponding to the same row vectors will be arranged together to form an adjacent relationship, which is convenient for merging these decimal numbers to achieve the merging of the corresponding same row vectors.
[0125] After step S105 is completed, the process proceeds to step S106, where the simplified Pauli check matrix and coefficient vector are stored. If quantum chemical calculations using the Hamiltonian are required, the stored Pauli check matrix, coefficient vector, and nuclear energy term can be retrieved for quantum chemical calculations.
[0126] Through the above technical solution, the double-electron integrals of the target fermion Hamiltonian are classified, which can improve the efficiency of subsequent calculation operations. By eliminating the electron integral terms with coefficient absolute values less than a threshold, the number of calculation terms can be reduced while ensuring accuracy. The single-electron integral terms and the double-electron integral terms are then converted into a bosonic Hamiltonian form represented by Pauli terms. The stable subform table is further populated to obtain a Pauli check matrix representing the Pauli terms. The same row vectors are merged, and row vectors with coefficients of 0 are deleted to further reduce the electron integral terms, thereby simplifying the electron integral terms and, in turn, simplifying the Hamiltonian. By storing the optimized Pauli check matrix, coefficient vectors, and nuclear energy terms, these data can be quickly retrieved for subsequent quantum chemical calculations, and the computational efficiency of the optimized Hamiltonian will also be improved.
[0127] Taking the Hamiltonian transformation of benzene molecule (STO-3G basis set) as an example, referring to the above method, the electron integral matrix of the single / double electron integral term of benzene molecule is loaded, the non-zero terms are screened and the symmetry is classified. pqrs , expand into a Pauli string according to the JW rule, fill in the X / Z position in the table form, and record it through the coefficient vector c The final Hamiltonian is output using quick sort, coefficients are accumulated in a hash table, and small coefficients are removed. This process takes approximately 15 minutes (compared to 1-2 days with traditional methods), demonstrating that this method can accelerate Hamiltonian conversion. This advantage will be further demonstrated as molecules grow larger and basis sets expand. This technique will lay the foundation for future simulations of complex quantum many-body and chemical systems.
[0128] For the periodic boundary conditions of solid materials, auxiliary quantum bits are introduced to represent momentum space orbits, the generator is expanded to a cyclic Z product chain, and the dimension of the table form is increased to 2(n+k) (k is the number of auxiliary bits, representing the coordinates of the first Brillouin zone). Through bit operation optimization, the generation time remains O(n 5 ) complexity.
[0129] This method has the following advantages:
[0130] 1. Computational speed increased by a hundredfold: By replacing complex matrix multiplication with Boolean operations in the form of stable subtables, the time required to generate a benzene molecule is reduced from 1-2 days to 15 minutes, making it applicable to larger molecules (such as porphyrins and DNA fragments).
[0131] 2. Memory usage is reduced by 90%: The compact binary representation in tabular form (each item requires only 2n bits) significantly reduces storage requirements, and a single machine can handle 100+ quantum bit systems.
[0132] 3. High precision and scalability: The main contribution items are retained through sparsity screening, and the energy error is less than 10 -5 Ha; supports GPU parallel acceleration and can be extended to quantum many-body physics simulation.
[0133] 4. Compatible with existing frameworks: The generated table format can be directly imported into quantum computing platforms such as Qiskit and Cirq, seamlessly connecting to the variational quantum algorithm (VQE) to solve the ground state energy.
[0134] also, Figure 2 is another flow chart of a method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable according to an exemplary embodiment. Figure 2 The method is roughly the same as Figure 1 Same, so we can learn from Figure 1 To understand the method flow Figure 2 , Figure 2 Calculation can begin after inputting the single-electron integral, double-electron integral, and nuclear energy. The preprocessing steps for symmetry classification and sparsity screening can be found in step S102. Expanding the fermion operator product and converting it to a Pauli check matrix can be found in step S103. After converting the Pauli check matrix, the phase and Pauli coefficients can be recorded, although in some implementations, the phase can be omitted. After recording the phase and Pauli coefficients, a hash table can be used to store the Pauli terms, for example, by storing the Pauli check matrix in a hash table. Accumulating coefficients of identical terms and removing zero coefficient terms can be found in step S105 to merge and optimize the Pauli check matrix. After optimization, the Pauli check matrix can be saved and the coefficient vector output.
[0135] Figure 3 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 3 As shown, the electronic device 700 may include: a processor 701 , a memory 702 , and may further include one or more of a multimedia component 703 , an input / output (I / O) interface 704 , and a communication component 705 .
[0136] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned method for rapid generation of quantum chemical Hamiltonians based on stable subtables. The memory 702 is used to store various types of data to support the operation of the electronic device 700. For example, these data may include instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact information, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted via the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules. The aforementioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0137] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the aforementioned method for fast generation of quantum chemical Hamiltonians based on stable subtables.
[0138] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the aforementioned method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable. For example, the computer-readable storage medium may be the aforementioned memory 702 including the program instructions. The program instructions may be executed by the processor 701 of the electronic device 700 to perform the aforementioned method for rapidly generating a quantum chemical Hamiltonian based on a stable subtable.
[0139] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, various simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application.
[0140] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not further describe various possible combinations.
[0141] In addition, the various implementation methods of the present application may be arbitrarily combined, and as long as they do not violate the concept of the present application, they should also be regarded as the contents recorded in the present application.
Claims
1. A method for rapid generation of quantum chemical Hamiltonian based on stable subtable, characterized in that: The method comprises: Get the single electron integral term of the target fermion Hamiltonian Double electron integral term and the nuclear energy term h nuc , and store the nuclear energy term, where h pq is the single electron integral, g pqrs is the double electron integral, p, q, r, s represent the electron orbits, is the production operator, a is the annihilation operator; Based on quantum chemical symmetry, equal di-electron integrals are divided into the same calculation object class, and the di-electron integral terms corresponding to the di-electron integrals whose absolute values are less than the threshold are deleted; Converting the single-electron integral term and the two-electron integral term into a bosonic Hamiltonian representation, wherein the bosonic Hamiltonian representation includes a Pauli product term or a sum of multiple Pauli product terms, where the Pauli product term is the product of a Pauli coefficient and a Pauli term, and the Pauli term is a tensor product of Pauli operators; Filling the stable subform table based on all Pauli terms, obtaining a Pauli check matrix in which each row vector is used to represent a Pauli term, and recording the Pauli coefficients of the Pauli terms corresponding to the row vector to obtain a coefficient vector; Merge the same row vectors in the Pauli check matrix, add the Pauli coefficients corresponding to the merged row vectors, and delete the row vectors with a Pauli coefficient of 0; A Pauli check matrix and a coefficient vector are stored to represent a Hamiltonian for quantum chemical calculation based on the Pauli check matrix, the coefficient vector, and the nuclear energy term.
2. The method according to claim 1, characterized in that The method of dividing equal two-electron integrals into the same calculation object class based on quantum chemical symmetry includes: Determination of g in the two-electron integral based on quantum chemical symmetry pqrs =g pqrs =g pqsr =g pqsr , and g in the double electron integral pqrs 、g pqrs 、g pqsr and g pqsr Classify into the same computing object class.
3. The method according to claim 1, characterized in that The threshold is 10 -6 Ha.
4. The method according to claim 1, wherein The converting of the single-electron integral term and the two-electron integral term into a bosonic Hamiltonian representation includes: Determine the mapping relationship between annihilation operator and production operator into Pauli operator representation based on JW transformation; Converting the single electron integral term into a bosonic Hamiltonian representation based on the mapping relationship; Based on the mapping relationship, the di-electron integral term is converted into a bosonic Hamiltonian representation.
5. The method according to claim 4, characterized in that The converting of the single electron integral term into a bosonic Hamiltonian representation based on the mapping relationship includes: Based on a preset mapping relationship table of single-electron integral terms into bosonic Hamiltonian representations, the single-electron integral terms are replaced with corresponding bosonic Hamiltonian representations; The preset mapping relationship table is obtained based on the following steps: Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator is replaced by the annihilation operator of the single-electron integral term, and based on the mapping relationship, the Pauli operator representation corresponding to the generation operator is replaced by the generation operator of the single-electron integral term to obtain a first expression; the first expression is expanded to a univariate polynomial form of the Pauli term to obtain a bosonic Hamiltonian representation corresponding to the single-electron integral term, and the mapping relationship from the single-electron integral term to the corresponding bosonic Hamiltonian representation is stored to obtain a preset mapping relationship table.
6. The method according to claim 4, characterized in that Based on the mapping relationship, the two-electron integral term is converted into a bosonic Hamiltonian representation, including: Based on the mapping relationship, the Pauli operator representation corresponding to the annihilation operator is used to replace the annihilation operator of the di-electron integral term; based on the mapping relationship, the Pauli operator representation corresponding to the generation operator is used to replace the generation operator of the di-electron integral term, to obtain a second expression; Expanding the second expression into a univariate polynomial form of the Pauli term, we obtain the Bosonic Hamiltonian representation corresponding to the two-electron integral term.
7. The method according to claim 1, characterized in that The elements of the Pauli check matrix are 0 or 1, and the Pauli check matrix includes a left matrix and a right matrix. The row vectors of the same row of the left matrix and the right matrix are used to represent a corresponding Pauli term. The two elements belonging to the same row and located in the same order of the left matrix and the right matrix are used to represent the Pauli operators of the corresponding order in the corresponding Pauli term. The elements corresponding to the identity operator located in the left matrix and the right matrix are both 0, σ x The Pauli operator corresponds to the elements of the left and right matrices are 1 and 0, respectively, σ y The elements of the left and right matrices corresponding to the Pauli operator are both 1, σ z The Pauli operator corresponds to elements 0 and 1 in the left and right matrices respectively.
8. The method according to claim 1, characterized in that The merging of identical row vectors in the Pauli check matrix includes: Treating each row of the Pauli check matrix as a binary number, and converting the binary number into a number with a base higher than binary; The converted base numbers are sorted so that the same base numbers are adjacent, and the adjacent same base numbers are merged to achieve merging of the same row vectors of the Pauli check matrix.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Quantum mechanical model construction method and system based on GPU cluster and mode awareness
CN121211984A
Quantum measurement method and system for molecular orbital of material and electronic equipment
CN122117075A
