Fermi operator rarefaction method and quantum computing device

The quantum computing device converts the fermion operator string into a boson operator string and determines the mask information. Only non-zero elements are calculated, which solves the problem of low calculation efficiency of the fermion operator sparse matrix in the existing technology and achieves More efficient sparse matrix calculations.

CN118536612APending Publication Date: 2024-08-23HUAWEI TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202310187289.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology consumes a large amount of computing resources and storage resources when calculating the sparse matrix of fermion operators, and the calculation efficiency is low. Especially for fermion operator strings containing multiple fermion operators, the complexity of the existing algorithm is O( m*2n, resulting in long calculation time.

Method used

The fermion operator string of the target chemical molecule is converted into a boson operator string through a quantum computing device, and the sparse matrix is ​​determined based on the mask information of the boson operator. Only non-zero elements are calculated to avoid redundant calculations and improve Computational efficiency.

Benefits of technology

It significantly reduces the resource consumption and time of calculating sparse matrices, improves the calculation efficiency of sparse matrices, and achieves more efficient sparse matrix calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536612A
    Figure CN118536612A
Patent Text Reader

Abstract

The invention provides a Fermi operator rarefaction method and a quantum computing device. The method comprises the steps that the quantum computing device can determine a first Fermi operator string corresponding to a target chemical molecule according to molecular structure information of the target chemical molecule, then transform the first Fermi operator string to obtain a corresponding first Bose operator string, and then send the first Bose operator string to the target chemical molecule according to the molecular structure information of the target chemical molecule. Determining mask information corresponding to a plurality of first Bose sub-operators when the first Bose sub-operators with the numerical value of zero do not exist in the plurality of first Bose sub-operators contained in the first Bose sub-operator string, and determining a sparse matrix of the first Fermi sub-operator string according to the mask information corresponding to the plurality of first Bose sub-operators. Therefore, according to the method, the sparse matrix is calculated when the first Bose sub-operators with the numerical value being zero do not exist in the first Bose sub-operators, any redundant calculation can be avoided, consumed calculation resources and occupied storage resources are few, and therefore the calculation efficiency of the sparse matrix can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and in particular to a fermion operator sparsification method and a quantum computing device. Background Art

[0002] Quantum computing is a computing paradigm that uses the principles of quantum mechanics to use quantum bits as basic computing units to run quantum algorithms. Among them, due to quantum properties such as quantum state entanglement and quantum state superposition, quantum computers can have polynomial or even exponential efficiency improvements over classical computing in specific algorithms. In the Noisy Intermediate-Scale Quantum (NISQ) era, researchers designed various algorithms that can reflect quantum superiority, such as variational quantum algorithms, which are a hybrid of quantum and classical algorithms. For variational quantum algorithms, the quantum computer first runs a quantum circuit containing parameters to obtain a quantum state. After that, the quantum computer measures the quantum state to obtain classical physical quantities. Then, the classical computer optimizes the quantum circuit containing parameters based on the classical physical quantities to complete the operation of the variational quantum algorithm.

[0003] Using variational quantum algorithms, researchers have developed a variety of quantum computing application scenarios, such as the variational quantum eigensolver (VQE) algorithm for solving the ground state energy of chemical molecules, quantum machine learning algorithms for quantum artificial intelligence research, and quantum approximate optimization algorithms for solving combinatorial optimization problems. Among these algorithms, quantum chemical simulation using the VQE algorithm has the greatest development advantages and has been successfully applied to fields such as drug design, catalyst design, and energy material design. In the VQE algorithm, quantum bits are used to describe the occupied or unoccupied state of chemical molecular orbitals. The variational quantum circuit composed of parameterized quantum gates evolves the quantum initial state. After that, by measuring the evolved quantum mode, the expected value E of the chemical molecule Hamiltonian with respect to the quantum state can be calculated. Then, the parameters in the variational quantum circuit are continuously optimized through the classical optimizer to make the expected value E as low as possible and reach E0. At this time, E0 is the ground state energy of the chemical molecule. In order to solve the ground state energy of the chemical molecule, it is necessary to calculate the sparse matrices of multiple fermion operators in the unitary coupling cluster operator T contained in the expectation value E and the sparse matrices of multiple fermion operators in the Hamiltonian H contained in the expectation value E.

[0004] However, in the prior art, in the process of calculating sparse matrices, matrix direct product operations and matrix multiplication operations are required, which consumes more computing resources and storage resources, and the computing time consumed by the prior art is also longer, resulting in low computing efficiency of sparse matrices. For example, for a fermion operator string that occupies n bits and consists of m fermion operators, the algorithm complexity of converting the fermion operator string into a sparse matrix using the prior art is O(m*2 n ). Summary of the invention

[0005] The embodiments of the present application provide a fermion operator sparsification method and a quantum computing device to effectively improve the computational efficiency of sparse matrices.

[0006] In the first aspect, the embodiment of the present application provides a fermion operator sparsification method, which can be performed by a quantum computing device or a component (such as a chip system or circuit, etc.) that can support the quantum computing device to implement the functions required by the method. Optionally, taking the quantum computing device executing the fermion operator sparsification method as an example, in this method, the quantum computing device can first determine the first fermion operator string corresponding to the target chemical molecule according to the molecular structure information of the target chemical molecule, and then the quantum computing device can transform the first fermion operator string to obtain the corresponding first bosonic operator string, wherein the first bosonic operator string can contain multiple first bosonic operators, when there is no first bosonic operator with a value of zero among the multiple first bosonic operators, the quantum computing device can determine the mask information corresponding to the multiple first bosonic operators, and can determine the sparse matrix of the first fermion operator string according to the mask information corresponding to the multiple first bosonic operators, and optionally, the sparse matrix can be used to determine the ground state energy of the target chemical molecule.

[0007] In the above design, the quantum computing device starts to execute the process of calculating the sparse matrix of the first fermion operator string when the multiple first boson operators included in the first boson operator string meet certain conditions (there is no first boson operator with a value of zero among the multiple first boson operators). This ensures that the calculation of the sparse matrix only involves non-zero elements, helps to avoid any redundant calculations, and consumes less computing resources and occupies less storage resources, so that the sparse matrix can be obtained more efficiently, effectively improving the calculation efficiency of the sparse matrix.

[0008] In a possible design, the plurality of first boson operators may include a first target boson operator, a second target boson operator, a third target boson operator, a fourth target boson operator and a fifth target boson operator; each first boson operator corresponds to a quantum bit;

[0009] The first target boson operator or the second target boson operator is a first boson operator among multiple first boson operators, and multiple result values ​​generated by acting on multiple quantum states are all non-zero; the third target boson operator, the fourth target boson operator, or the fifth target boson operator is a first boson operator among multiple first boson operators, and at least one result value is zero among multiple result values ​​generated by acting on multiple quantum states; the first target boson operator, the second target boson operator, the third target boson operator, the fourth target boson operator, and the fifth target boson operator are different from each other;

[0010] The mask information includes at least one of the following: the number of at least one non-zero element included in the position mask, the mask array, or the sparse matrix;

[0011] The quantum computing device determines mask information corresponding to a plurality of first bosonic operators, including:

[0012] The quantum computing device may determine the number of at least one non-zero element included in the sparse matrix according to the number of the first target bosonic operator and the number of the second target bosonic operator; or

[0013] The quantum computing device may determine the mask array required for calculating the sparse matrix according to the quantum bits corresponding to the first target boson operator and the quantum bits corresponding to the second target boson operator; or

[0014] The quantum computing device may determine the position mask of the third target boson operator according to the quantum bit corresponding to the third target boson operator; or

[0015] The quantum computing device may determine the position mask of the fourth target boson operator according to the quantum bit corresponding to the fourth target boson operator; or

[0016] The quantum computing device can determine the position mask of the fifth target boson operator according to the quantum bit corresponding to the fifth target boson operator.

[0017] In the above design, the quantum computing device can timely and accurately calculate the mask information corresponding to the first bosonic operator string through multiple target bosonic operators contained in the first bosonic operator string, which helps the subsequent quantum computing device to effectively calculate the sparse matrix of the first fermion operator string based on the mask information.

[0018] In one possible design, the quantum computing device determines a sparse matrix of a first fermion operator string, including:

[0019] The quantum computing device may determine an integer sequence required for calculating the sparse matrix according to the number of at least one non-zero element contained in the sparse matrix, wherein the integer sequence includes at least one integer;

[0020] The quantum computing device may determine the horizontal coordinate and vertical coordinate of each non-zero element in the at least one non-zero element in the sparse matrix through the following steps: the quantum computing device may select a first integer in the integer sequence and may determine a binary array of the first integer; wherein the first integer corresponds to the first non-zero element, and the first non-zero element is any non-zero element in the at least one non-zero element contained in the sparse matrix; thereafter, the quantum computing device may determine the first numerical value required for calculating the horizontal and vertical coordinates of the first non-zero element in the sparse matrix according to the mask array and the binary array of the first integer; then, the quantum computing device may determine the vertical coordinate of the first non-zero element in the sparse matrix according to the first numerical value, the position mask of the third target boson operator and the position mask of the fourth target boson operator, and may determine the horizontal coordinate of the first non-zero element in the sparse matrix according to the first numerical value, the position mask of the third target boson operator and the position mask of the fifth target boson operator; finally, the quantum computing device may determine the sparse matrix according to the horizontal coordinate and vertical coordinate of each non-zero element in the at least one non-zero element in the sparse matrix.

[0021] In the above design, when the quantum computing device calculates the sparse matrix of the first fermion operator string, the number of loops (i.e., the number of first integers included in the integer sequence) is the number of all non-zero elements in the sparse matrix, so the quantum computing device can obtain all non-zero elements at one time, and it helps to avoid any redundant calculations in the process of calculating the sparse matrix, so that the numerical values ​​of all non-zero elements in the sparse matrix and the horizontal and vertical coordinates of all non-zero elements in the sparse matrix can be obtained more efficiently and directly.

[0022] In one possible design, the value of each non-zero element is determined by the quantum computing device based on a preset threshold;

[0023] Optionally, the implementation method of the quantum computing device to determine the value of each non-zero element is flexible and diverse, which can meet the needs of different application scenarios. For example, one possible implementation method is that when the number of 1s contained in the binary value is an odd number, the quantum computing device can determine the product value of the preset threshold and the first coefficient as the value of the first non-zero element. Another possible implementation method is that when the number of 1s contained in the binary value is an even number, the quantum computing device can determine the product value of the preset threshold and the second coefficient as the value of the first non-zero element. Among them, the binary value is obtained by the quantum computing device performing a bitwise AND operation on the first integer and the position mask of the second target boson operator, and the first coefficient is different from the second coefficient.

[0024] In one possible design, the method further includes:

[0025] When only the first target boson operator and the second target boson operator are retained in the first boson operator string, the quantum computing device can first concatenate the first target boson operator and the second target boson operator to obtain a third boson operator string, in which the first target boson operator and the second target boson operator respectively correspond to new quantum bits; thereafter, the quantum computing device can determine the position mask of the second target boson operator according to the new quantum bits corresponding to the second target boson operator.

[0026] In the above design, by calculating the position mask of the second target boson operator while retaining only the first target boson operator and the second target boson operator in the first boson operator string, the subsequent quantum computing device can effectively calculate the numerical value of each non-zero element.

[0027] In one possible design, the quantum computing device transforms the first fermion operator string to obtain the first bosonic operator string, including: the quantum computing device can map at least one fermion operator included in the first fermion operator string separately to obtain multiple second bosonic operator strings; wherein any second bosonic operator string contains multiple second bosonic operators; then, the quantum computing device can perform a product operation on the second bosonic operators belonging to the same quantum bit in the multiple second bosonic operator strings to obtain multiple first bosonic operators; then, the quantum computing device can splice the multiple first bosonic operators in sequence according to the quantum bits corresponding to the multiple first bosonic operators to obtain the first bosonic operator string.

[0028] In the above design, the quantum computing device can accurately obtain the first boson operator located at each quantum bit by directly multiplying at least one second boson operator located at each quantum bit in multiple second boson operator strings, and can accurately obtain the first boson operator string by splicing the first boson operators located at multiple quantum bits without generating temporary variables. The design only involves simple operator product operations and does not involve direct product operations or matrix product operations, so the computing resources consumed and the storage resources occupied are relatively small, which can help improve the computing efficiency of sparse matrices.

[0029] In one possible design, the quantum computing device performs a product operation on second boson operators belonging to the same quantum bit in multiple second boson operator strings to obtain multiple first boson operators, including:

[0030] The quantum computing device can select at least one second boson operator located at a first quantum bit from multiple second boson operator strings; then, the quantum computing device can perform a product operation on the at least one second boson operator located at the first quantum bit according to the extended Pauli operator multiplication table to obtain the first boson operator located at the first quantum bit.

[0031] In the above design, the quantum computing device can obtain the first boson operator promptly and accurately by performing a simple product operation on at least one second boson operator located at the same quantum bit position with the help of the extended Pauli operator multiplication table. In this way, the quantum computing device can obtain the first boson operator string without performing complex calculations, so the computing resources consumed and the storage resources occupied are relatively small.

[0032] In one possible design, the method further includes:

[0033] When there is a first boson operator with a value of zero among multiple first boson operators, the quantum computing device can directly determine that the sparse matrix is ​​a zero matrix without calculating mask information.

[0034] In the second aspect, the embodiment of the present application provides a possible quantum computing device, and the beneficial effects can be found in the description of the first aspect, which will not be repeated here. The quantum computing device has the function of implementing the behavior in the method example of the first aspect. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In a possible design, the quantum computing device includes an acquisition module and a processing module. The acquisition module is used to obtain the molecular structure information of the target chemical molecule. The processing module is used to determine the first fermion operator string corresponding to the target chemical molecule according to the molecular structure information of the target chemical molecule. The processing module is also used to transform the first fermion operator string to obtain a first bosonic operator string, wherein the first bosonic operator string contains multiple first bosonic operators. The processing module is also used to determine the mask information corresponding to the multiple first bosonic operators when there is no first bosonic operator with a value of zero among the multiple first bosonic operators. The processing module is further used to determine the sparse matrix of the first fermion operator string according to the mask information corresponding to the plurality of first bosonic operators, wherein the sparse matrix can be used to determine the ground state energy of the target chemical molecule. These modules can perform the corresponding functions in any possible design of the first aspect above, and refer to the detailed description in the method example for details, which will not be repeated here.

[0035] In a third aspect, an embodiment of the present application provides a possible quantum computing device, the quantum computing device comprising a communication interface and a processor. Optionally, the quantum computing device also comprises a memory. The memory is used to store computer programs or instructions, and the processor is coupled to the memory and the communication interface. When the processor executes the computer program or instruction, the quantum computing device executes the method in any possible design of the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes a method in any possible design of the first aspect above.

[0037] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computer, the computer executes a method in any possible design of the first aspect above.

[0038] In a sixth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory, and is used to read a computer program stored in the memory to execute a method in any possible design of the first aspect above.

[0039] In a seventh aspect, an embodiment of the present application further provides a chip system, which includes a processor for supporting a computer device to implement the method in any possible design of the first aspect. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data of the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0040] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A possible system architecture diagram provided by an embodiment of the present application is exemplarily shown;

[0042] Figure 2 A schematic diagram showing a process flow of a fermion operator sparsification method provided in an embodiment of the present application is exemplified;

[0043] Figure 3 An exemplary diagram of an orbital occupied by extranuclear electrons provided in an embodiment of the present application is shown;

[0044] Figure 4A schematic diagram showing a possible structure of a quantum computing device provided by an embodiment of the present application is exemplified;

[0045] Figure 5 A schematic diagram of the structure of a possible quantum computing device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION

[0046] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0047] Figure 1 A possible system architecture diagram applicable to the embodiment of the present application is exemplarily shown, and the system architecture may include a quantum computing device 100, and the quantum computing device 100 may include but is not limited to a configuration unit 101, a conversion unit 102, an evolution unit 103 or a measurement unit 104. Optionally, in one example, the quantum computing device 100 may be a quantum computing device, wherein the configuration unit 101, the conversion unit 102, the evolution unit 103 and the measurement unit 104 are all deployed on a quantum computing device (such as a quantum computer). Optionally, in another example, the quantum computing device 100 may be a combination of a classical computing device (such as an ordinary computer, such as a laptop or a desktop computer) and a quantum computing device, wherein the configuration unit 101 and the conversion unit 102 may be deployed on a classical computing device, and the evolution unit 103 and the measurement unit 104 may be deployed on a quantum computing device.

[0048] Among them, quantum computing devices are a type of physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store and process quantum information. For example, quantum computing devices can be used in the field of quantum chemistry to simulate chemical molecules or chemical reactions.

[0049] The configuration unit 101 is used to generate the Hamiltonian H of the given chemical molecule and the unitary coupling cluster operator T of the given chemical molecule according to the molecular structure information of the given chemical molecule.

[0050] For example, currently commonly used quantum circuits for calculating the ground state energy of chemical molecules include but are not limited to unitary coupled-cluster with singles and doubles (UCCSD) circuits or hardware efficient (Hardware Efficient) circuits. For example, taking the UCCSD circuit as an example, in the UCCSD circuit, the unitary coupled cluster wave function |Ψ UCC > is defined as:

[0051]

[0052] Among them, |Ψ HF> represents the Hartree-Fock ground state wave function, T represents the unitary coupled cluster operator under the UCCSD theory, represents the Hermitian conjugate of the unitary coupled cluster operator T.

[0053] The following is a brief introduction to the electronic structure of atoms, followed by an introduction to the meaning of the Hartree-Fock ground state wave function and the unitary coupling cluster operator T.

[0054] Optionally, an atom is composed of an atomic nucleus and extranuclear electrons, and the arrangement of extranuclear electrons has a very important influence on the chemical properties of the element. For a given chemical molecule, the occupation of electrons can be described by an extranuclear electron occupation diagram. For example, taking the chemical molecule LiH as an example, when processed by a quantum computing device, it can be described by 12 bits and 4 electrons. Among them, the 12 bits constitute 6 spatial orbits, and two of the 4 electrons have spins up and two have spins down, occupying different spin orbits.

[0055] Figure 3 An example of a schematic diagram of an extranuclear electron occupied orbit provided in an embodiment of the present application is shown as follows: Figure 3 As shown, 0-11 are used to represent 12 electron orbitals, and even numbers are used to mark spin-up orbitals, and odd numbers are used to mark spin-down orbitals. For example, taking the 4 electrons of LiH as an example, 2 of the 4 electrons occupy orbitals 0 and 2 with spins pointing up, and the other 2 electrons occupy orbitals 1 and 3 with spins pointing down.

[0056] In quantum mechanics, we can use fermion operators to annihilate operators a and to create operators To represent the annihilation and creation of particles (the creation operator and the annihilation operator are Hermitian conjugate to each other), for example, a2 represents the annihilation of an electron on spin orbit 2. Indicates that an electron is generated in spin orbital 4. According to the above description, we know that the Hartree-Fock state is the quantum state of the electron occupying the lowest orbit: |Ψ HF >=|111100000000>.

[0057] The unitary coupling cluster operator T is composed of operators of electron transitions between different orbitals. Under the UCCSD theory, T is composed of single electron excitation and double electron excitation, that is:

[0058]

[0059] in, It means that an electron is created in the unoccupied orbital p and an electron is annihilated in the occupied orbital q. It means that an electron is generated in the empty orbital p and the empty orbital q respectively, and an electron is annihilated in the occupied orbital r and the occupied orbital s respectively. The electron transitions between these different orbits are also called different configurations, θ q p is the coefficient of the single electron excited configuration, θ rs pq is the coefficient of the doubly excited configuration.

[0060] Through the above introduction, the quantum circuit required for calculating the ground state energy of chemical molecules can be constructed. In addition, the Hamiltonian H of the chemical molecule needs to be calculated, so as to calculate the ground state energy E of the chemical molecule through the unitary coupling cluster operator T of the chemical molecule and the Hamiltonian H of the chemical molecule. Among them, the ground state energy E of the chemical molecule satisfies the following form:

[0061]

[0062] Among them, the Hamiltonian H of the chemical molecule satisfies the following form:

[0063]

[0064] Among them, h q p represents the coefficient of the single electron excited configuration, h rs pq The coefficient representing the di-electron excited configuration, E q p The fermion operator representing the single electron excited configuration, E rs pq A fermion operator representing a dielectronic excited configuration.

[0065] The conversion unit 102 is used to convert the unitary coupled cluster operator T into the corresponding sparse matrix M T , convert the Hamiltonian H into the corresponding sparse matrix M H .

[0066] Evolution unit 103, used to transform the sparse matrix M T and the sparse matrix M H Act on the quantum state and evolve it to obtain the evolved quantum state.

[0067] The measuring unit 104 is used to test the evolved quantum state and generate a test result.

[0068] It should be noted that Figure 1 Only one possible system architecture is provided schematically, and the schematic system architecture is for more clearly illustrating the technical solution of the embodiment of the present application, and does not limit the system architecture of the fermion operator sparsification method provided in the present application. Figure 1 The form and quantity of each unit in the system architecture shown are only for example and do not constitute a limitation of the present application. Figure 1 The names of the various units in the system architecture shown are only examples. The names of the various units in the specific implementation may also be other names, and this application does not make specific limitations on this.

[0069] As described in the background art, the existing sparse matrix calculation method results in low sparse matrix calculation efficiency. In view of this, the present application provides a fermion operator sparse method to effectively improve the sparse matrix calculation efficiency.

[0070] The following is based on Figure 1 The system architecture shown provides a detailed introduction to the specific implementation of the fermion operator sparsification method in this application.

[0071] Figure 2 The following is a schematic diagram of a process flow of a fermion operator sparsification method provided in an embodiment of the present application. The method is applicable to a quantum computing device, such as Figure 1 The quantum computing device 100 is shown. The method flow can be executed by a quantum computing device or a component (such as a chip system or circuit, etc.) that can support the quantum computing device to implement the functions required by the method. In order to facilitate the introduction of the technical solution provided by the embodiment of the present application, the following is an example of a quantum computing device executing a fermion operator sparse method. Figure 2 As shown, the method includes:

[0072] Step 201: The quantum computing device determines a first fermion operator string corresponding to the target chemical molecule based on the molecular structure information of the target chemical molecule.

[0073] Optionally, the target chemical molecules are used to indicate chemical molecules for which a sparse matrix needs to be calculated, such as molecules contained in a certain catalyst, chemical molecules contained in a certain new energy material, or chemical molecules contained in a certain drug.

[0074] Optionally, when the user needs to calculate the ground state energy of a chemical molecule (i.e., the target chemical molecule), the sparse matrix corresponding to the target chemical molecule needs to be calculated first. Therefore, after the user submits the molecular structure information of the target chemical molecule to the quantum computing device through the client provided by the quantum computing device, the quantum computing device can generate the Hamiltonian and unitary coupling cluster operator corresponding to the target chemical molecule according to the molecular structure information of the target chemical molecule. Among them, the Hamiltonian contains at least one fermion operator string, the unitary coupling cluster operator contains at least one fermion operator string, and the first fermion operator string is any one of the at least one fermion operator string contained in the Hamiltonian and the at least one fermion operator string contained in the unitary coupling cluster operator.

[0075] For example, taking a chemical molecule (such as molecule a) as an example, the quantum computing device can generate the Hamiltonian H and unitary coupling cluster operator T corresponding to molecule a based on the molecular structure information of molecule a. Assume that the Hamiltonian H corresponding to molecule a contains two fermion operator strings, and assume that the unitary coupling cluster operator T corresponding to molecule a contains two fermion operator strings. Afterwards, the quantum computing device can arbitrarily select a fermion operator string from the four fermion operator strings (such as ) as the first fermion operator string.

[0076] Step 202: The quantum computing device transforms the first fermion operator string to obtain a first bosonic operator string.

[0077] Exemplarily, the first bosonic operator string may include multiple first bosonic operators.

[0078] Optionally, the quantum computing device may map at least one fermion operator contained in the first fermion operator string separately to obtain multiple second bosonic operator strings. Optionally, any second bosonic operator string may contain one or more second bosonic operators. Afterwards, the quantum computing device may perform a product operation on the second bosonic operators belonging to the same quantum bit in the multiple second bosonic operator strings to obtain multiple first bosonic operators. Optionally, each first bosonic operator corresponds to a quantum bit. Then, the quantum computing device may sequentially splice the multiple first bosonic operators according to the quantum bits corresponding to the multiple first bosonic operators to obtain the first bosonic operator string.

[0079] Optionally, the implementation process of a quantum computing device performing a product operation on second boson operators belonging to the same quantum bit position in multiple second boson operator strings is introduced below through the following possible implementation methods.

[0080] Implementation method 1: The quantum computing device directly selects at least one second boson operator located at the first quantum bit from multiple second boson operator strings. Afterwards, the quantum computing device directly performs a product operation on the at least one second boson operator located at the first quantum bit according to a preset extended Pauli operator multiplication table.

[0081] Exemplarily, take the first fermion operator string abc as an example, and assume that the second boson operator string corresponding to the fermion operator a contained in the first fermion operator string abc is a1a2a3, the second boson operator string corresponding to the fermion operator b is b1b2, and the second boson operator string corresponding to the fermion operator c is c1c2c3c4. Among them, the order of action of fermion operator a precedes the order of action of fermion operator b, and the order of action of fermion operator b precedes the order of action of fermion operator c. The quantum computing device directly selects the second boson operator b2, a2, and c2 located at the first quantum bit position (for example, the quantum bit position is 2) from the second boson operator strings a1a2a3, b1b2, and c1c2c3c4. Afterwards, the quantum computing device directly performs a product operation on the second Bosonic operator b2, a2, and c2 located at quantum bit position 2 according to the preset extended Pauli operator multiplication table, that is, b2*a2*c2.

[0082] Implementation method 2: The quantum computing device can select the second boson operators located at the first quantum bit in the multiple second boson operator strings in accordance with the order of action of the multiple fermion operators contained in the first fermion operator string, and obtain at least one second boson operator located at the first quantum bit. Each second boson operator corresponds to a selection order. Afterwards, the quantum computing device uses a preset extended Pauli operator multiplication table to perform product operations on the at least one second boson operator located at the first quantum bit in accordance with the selection order corresponding to the at least one second boson operator.

[0083] Exemplarily, continue to take the first fermion operator string as abc as an example, and assume that the second boson operator string corresponding to the fermion operator a contained in the first fermion operator string abc is a1a2a3, the second boson operator string corresponding to the fermion operator b is b1b2, and the second boson operator string corresponding to the fermion operator c is c1c2c3c4. Among them, the action order of fermion operator a precedes the action order of fermion operator b, and the action order of fermion operator b precedes the action order of fermion operator c. The quantum computing device can select the second boson operator a2 located at quantum bit position 2 in the second boson operator string a1a2a3, the second boson operator b2 located at quantum bit position 2 in the second boson operator string b1b2, and the second boson operator c2 located at quantum bit position 2 in the second boson operator string c1c2c3c4 in accordance with the action order of fermion operators a, b, and c.

[0084] The selection order of the second boson operator a2 is 1, the selection order of the second boson operator b2 is 2, and the selection order of the second boson operator c2 is 3. Afterwards, the quantum computing device can perform product operations on the second boson operators a2, b2, and c2 in sequence, i.e., a2*b2*c2, through a preset extended Pauli operator multiplication table according to the selection order of the second boson operators a2, b2, and c2.

[0085] Implementation method three: The quantum computing device uses a preset extended Pauli operator multiplication table to perform product operations on at least one second bosonic operator located at the first quantum bit in sequence according to the order of action of the fermion operators corresponding to the at least one second bosonic operator.

[0086] Optionally, an extended Pauli operator multiplication table can be created according to actual application requirements, wherein the extended Pauli operator multiplication table can assist the quantum computing device in obtaining the first boson operator string more efficiently. For example, the quantum computing device can perform a simple product operation on at least one second boson operator located at the same quantum bit according to the extended Pauli operator multiplication table, and obtain the operation result (such as the first boson operator) in a timely and accurate manner. Exemplarily, see Table 1, which is an extended Pauli operator multiplication table provided in an embodiment of the present application.

[0087] Table 1

[0088] <![CDATA[σ x ]]> <![CDATA[σ y ]]> <![CDATA[σ z ]]> <![CDATA[σ0]]> <![CDATA[σ1]]> <![CDATA[σ m ]]> <![CDATA[σ p ]]> I 0 <![CDATA[σ x ]]> I <![CDATA[iσ z ]]> <![CDATA[-iσ y ]]> <![CDATA[σ m ]]> <![CDATA[σ p ]]> <![CDATA[σ0]]> <![CDATA[σ1]]> <![CDATA[σ x ]]> 0 <![CDATA[σ y ]]> <![CDATA[-iσ z ]]> I <![CDATA[iσ x ]]> <![CDATA[iσ m ]]> <![CDATA[-iσ p ]]> <![CDATA[-iσ0]]> <![CDATA[iσ1]]> <![CDATA[σ y ]]> 0 <![CDATA[σ z ]]> <![CDATA[iσ y ]]> <![CDATA[-iσ x ]]> I <![CDATA[σ0]]> <![CDATA[-σ1]]> <![CDATA[-σ m ]]> <![CDATA[σ p ]]> <![CDATA[σ z ]]> 0 <![CDATA[σ0]]> <![CDATA[σ p ]]> <![CDATA[-iσ p ]]> <![CDATA[σ0]]> <![CDATA[σ0]]> 0 0 <![CDATA[σ p ]]> <![CDATA[σ0]]> 0 <![CDATA[σ1]]> <![CDATA[σ m ]]> <![CDATA[iσ m ]]> <![CDATA[-σ1]]> 0 <![CDATA[σ1]]> <![CDATA[σ m ]]> 0 <![CDATA[σ1]]> 0 <![CDATA[σ m ]]> <![CDATA[σ1]]> <![CDATA[-iσ1]]> <![CDATA[σ m ]]> <![CDATA[σ m ]]> 0 0 <![CDATA[σ1]]> <![CDATA[σ m ]]> 0 <![CDATA[σ p ]]> <![CDATA[σ0]]> <![CDATA[iσ0]]> <![CDATA[-σ p ]]> 0 <![CDATA[σ p ]]> <![CDATA[σ0]]> 0 <![CDATA[σ p ]]> 0 I <![CDATA[σ x ]]> <![CDATA[σ y ]]> <![CDATA[σ z ]]> <![CDATA[σ0]]> <![CDATA[σ1]]> <![CDATA[σ m ]]> <![CDATA[σ p ]]> I 0 0 0 0 0 0 0 0 0 0 0

[0089] It should be noted that Table 1 is only a simple example for the purpose of illustrating the technical solution in the embodiments of the present application, and does not constitute a limitation on the technical solution in the embodiments of the present application.

[0090] It should be understood that the above content is only an illustrative introduction to several possible ways for a quantum computing device to perform product operations on second boson operators belonging to the same quantum bit in multiple second boson operator strings. The quantum computing device can also perform product operations on second boson operators belonging to the same quantum bit in multiple second boson operator strings by adopting other methods, which will not be listed one by one in the embodiments of the present application.

[0091] For example, the first fermion operator string is For example, the first fermion operator string of the quantum computing device is determined as The corresponding implementation process of the first bosonic operator string is introduced.

[0092] Optionally, the quantum computing device may transform the first fermion operator string according to a set transformation algorithm (such as Jordan-Wigner transformation, Parity Encoding transformation or Bravyi-Kitaev transformation, etc.) By mapping each fermion operator contained in the equation, the second boson operator string corresponding to each fermion operator can be obtained. For example, taking the Jordan-Wigner transformation as an example, the Jordan-Wigner transformation satisfies the following form:

[0093]

[0094] The quantum computing device can use the above Jordan-Wigner transformation to transform the first fermion operator string Each contained fermion operator is mapped to the second bosonic operator string corresponding to the fermion operator.

[0095] For example, taking the first fermion operator string Taking the fermion operator a1 as an example, the quantum computing device can use the above Jordan-Wigner transformation to map the fermion operator a1 into the second bosonic operator string σ z σ p , that is, JW(a1)=σ z σ p Among them, the second bosonic operator string σ corresponding to the fermion operator a1 z σ p The second bosonic operator σ is included in z and the second bosonic operator σ p .

[0096] For example, taking the first fermion operator string Fermion operators included For example, a quantum computing device can use the above Jordan-Wigner transformation to transform the fermion operator Mapping to the second bosonic operator string σ z σ z σ z σ z σ m ,Right now Among them, the fermion operator The corresponding second bosonic operator string σ z σ z σ z σ z σ m There are 4 second bosonic operators σ in z and a second bosonic operator σ m . Optional, first fermion operator string The specific expressions of the second bosonic operator strings corresponding to the multiple fermion operators included can be found in Table 2.

[0097] Table 2

[0098]

[0099]

[0100] It should be noted that Table 2 is only a simple example for the purpose of illustrating the technical solution in the embodiments of the present application, and does not constitute a limitation on the technical solution in the embodiments of the present application.

[0101] Optionally, the quantum computing device determines the first fermion operator string After the second boson operator string corresponding to each fermion operator is included, the first fermion operator string can be By performing a product operation on the second boson operators belonging to the same or identical quantum bit in the second boson operator strings corresponding to the multiple fermion operators contained therein, the first boson operators located at the multiple quantum bits can be effectively obtained.

[0102] For example, taking the above implementation method 2 as an example, for at least one second boson operator located at each quantum bit, the quantum computing device generates a first fermion operator string according to the first fermion operator string. The order of action of the multiple fermion operators included selects at least one second bosonic operator located at the quantum bit in turn.

[0103] For example, taking the quantum bit number as 4, the quantum computing device uses the first fermion operator string The order of action of the multiple fermion operators contained in the equation is The corresponding second bosonic operator string σ z σ m The second bosonic operator σ at qubit 4 in m , the second bosonic operator string σ corresponding to the fermion operator a1 z σ p The second bosonic operator σ at qubit 4 in p , the second bosonic operator string σ corresponding to the fermion operator a2 z σ z σ p The second bosonic operator σ at qubit 4 in z , the second bosonic operator string σ corresponding to the fermion operator a3 z σ z σ z σ p The second bosonic operator σ at qubit 4 in z , the fermion operator The corresponding second bosonic operator string σ z σ z σ z σm The second bosonic operator σ at qubit 4 in z , the fermion operator The corresponding second bosonic operator string σ z σ z σ z σ z σ z σ m The second bosonic operator σ at qubit 4 in z Select the second bosonic operator σ m , σ p , σ z , σ z , σ z , σ z .

[0104] Among them, the second bosonic operator σ m The selection order is 1, the second bosonic operator σ p The selection order is 2, the second bosonic operator σ z The selection order is 3, the second bosonic operator σ z The selection order is 4, the second bosonic operator σ z The selection order is 5, the second bosonic operator σ z The selection order is 6. Then, the quantum computing device uses the extended Pauli operator multiplication table shown in Table 1 above and according to the second Bosonic operator σ m , σ p , σ z , σ z , σ z , σ z The corresponding selection order is to select the second bosonic operator σ m , σ p , σ z , σ z , σ z , σ z By performing a product operation, we can effectively obtain the first bosonic operator σ1, that is, σ m *σ p *σ z *σ z *σ z *σ z =σ1.

[0105] For another example, taking the quantum bit number as 2, the quantum computing device can be operated according to the fermion operator The order of action is to convert the second bosonic operator string σ corresponding to the fermion operator a3 into z σ z σ z σ pThe second bosonic operator σ at qubit position 2 p , the fermion operator The corresponding second bosonic operator string σ z σ z σ z σ m The second bosonic operator σ at qubit position 2 m , the fermion operator The corresponding second bosonic operator string σ z σ z σ z σ z σ z σ m The second bosonic operator σ at qubit position 2 z Select the second bosonic operator σ p , σ m , σ z .

[0106] Among them, the second bosonic operator σ p The selection order is 1, the second bosonic operator σ m The selection order is 2, the second bosonic operator σ z The selection order is 3. Then, the quantum computing device uses the extended Pauli operator multiplication table shown in Table 1 above and according to the second Bosonic operator σ p , σ m , σ z The corresponding selection order is to select the second bosonic operator σ p , σ m , σ z By performing a product operation, we can effectively obtain the first bosonic operator σ0, that is, σ p *σ m *σ z =σ0.

[0107] Based on the above content, taking the above implementation method 2 as an example, the quantum computing device connects the first fermion operator string By performing product operations on the second boson operators belonging to the same or identical quantum bit in the second boson operator strings corresponding to the multiple fermion operators included, the first boson operators located at multiple quantum bits as shown in Table 3 can be obtained promptly and effectively.

[0108] Table 3

[0109]

[0110] It should be noted that Table 3 is only a simple example for the purpose of illustrating the technical solution in the embodiments of the present application, and does not constitute a limitation on the technical solution in the embodiments of the present application.

[0111] Then, the quantum computing device can be operated according to multiple first bosonic operators (i.e., I, σ1, -σ p ,σ0,σ z , σ m ) The order of the size of the corresponding quantum bits is used to convert multiple first bosonic operators I, σ1, -σ p ,σ0,σ z , σ m After sequential concatenation, we can obtain the first Bosonic operator string S = Iσ1(-σ p )σ0σ z σ m .

[0112] Step 203: When there is no first bosonic operator with a value of zero among the multiple first bosonic operators, the quantum computing device determines mask information corresponding to the multiple first bosonic operators.

[0113] Optionally, when there is a first bosonic operator with a value of zero among the multiple first bosonic operators, the quantum computing device may determine that the sparse matrix of the first fermion operator string is a zero matrix.

[0114] For example, let the first bosonic operator string be σ m σ z 0σ1σ p For example, when the quantum computing device determines the first bosonic operator string σ m σ z 0σ1σ p When the number of first boson operators with a value of 0 in is greater than or equal to 1, it is determined that the first boson operator string σ m σ z 0σ1σ p When contains one or more 0s, the quantum computing device can determine the first bosonic operator string σ m σ z 0σ1σ p The corresponding sparse matrix of the first fermion operator string is a zero matrix.

[0115] Optionally, when there is no first bosonic operator with a value of zero among the multiple first bosonic operators, the quantum computing device can determine the mask information corresponding to the multiple first bosonic operators.

[0116] For example, the first bosonic operator string is Iσ1(-σ p )σ0σ z σ m For example, when the quantum computing device determines the first bosonic operator string Iσ1(-σ p )σ0σ z σ mWhen the number of first boson operators with a value of 0 in is equal to zero, it is determined that the first boson operator string Iσ1(-σ p )σ0σ z σ m When does not contain 0, the quantum computing device can determine multiple first bosonic operators I, σ1, -σ p ,σ0,σ z , σ m The corresponding mask information.

[0117] Exemplarily, the mask information may include, but is not limited to, a position mask, a mask array, or the number of at least one non-zero element contained in a sparse matrix.

[0118] Exemplarily, the following introduces the implementation process of a quantum computing device determining mask information corresponding to multiple first boson operators by taking the example that multiple first boson operators include a first target boson operator, a second target boson operator, a third target boson operator, a fourth target boson operator and a fifth target boson operator.

[0119] Among them, the first target boson operator or the second target boson operator is a first boson operator among multiple first boson operators, and multiple result values ​​generated by acting on multiple quantum states are all non-zero. The third target boson operator, the fourth target boson operator or the fifth target boson operator is a first boson operator among the multiple first boson operators, and at least one result value is zero among the multiple result values ​​generated by acting on multiple quantum states. The first target boson operator, the second target boson operator, the third target boson operator, the fourth target boson operator and the fifth target boson operator are different.

[0120] Exemplarily, the following takes a two-level quantum system as an example to briefly introduce the effects of fermion operators and bosonic operators on multiple quantum states.

[0121] Optionally, in a two-level quantum system, the quantum state includes a zero state and a one state. The symbol |0> can be used to represent the zero state, and the symbol |1> can be used to represent the one state. In linear algebra language, it can be represented by a vector, that is:

[0122]

[0123] Fermion operators are operators that describe the change in the number of particles in a quantum system. They mainly include the annihilation operator a and the production operator Its effect on quantum states (such as zero and one) is as follows:

[0124] a|0>=0,a|1>=|0>

[0125]

[0126] In addition, the fermion operators satisfy the anti-commutative relation:

[0127] {a i ,a j} = a i a j +a j a i =0

[0128]

[0129]

[0130] Since fermion operators cannot be directly simulated on quantum computing devices, the quantum computing device needs to first transform the fermion operators into bosonic operators through a set transformation algorithm (such as Jordan-Wigner transformation), and then perform quantum simulation through bosonic operators. x , σ y or z , its matrix form is:

[0131]

[0132] In the embodiment of the present application, the boson operator is extended, and the extended boson operator is as follows:

[0133]

[0134]

[0135] The effect of the extended bosonic operator on quantum states (such as zero and one) is as follows:

[0136] σ0|0>=|0>,σ0|1>=0

[0137] σ1|0>=0,σ1|1>=|1>

[0138] σ m |0>=|1>,σ m |1>=0

[0139] σ p |0>=0,σ p |1>=|0>

[0140] Optionally, when the mask information includes the number of at least one non-zero element, the quantum computing device can determine the number of at least one non-zero element contained in the sparse matrix based on the number of first target boson operators contained in the first boson operator string and the number of second target boson operators contained in the first boson operator string after determining that there is no first boson operator with a value of zero among the multiple first boson operators contained in the first boson operator string corresponding to the first fermion operator string (i.e., the number of 0s contained in the first boson operator string is 0).

[0141] When the mask information includes a mask array, the quantum computing device can determine the mask array required for calculating the sparse matrix based on the quantum bits corresponding to the first target boson operator and the quantum bits corresponding to the second target boson operator after determining that there is no first boson operator with a value of zero among the multiple first boson operators included in the first boson operator string corresponding to the first fermion operator string (that is, the number of 0s included in the first boson operator string is 0).

[0142] When the mask information includes a position mask, the quantum computing device can determine the position mask of the third target boson operator according to the quantum bit corresponding to the third target boson operator after determining that there is no first boson operator with a value of zero among the multiple first boson operators included in the first boson operator string corresponding to the first fermion operator string (that is, the number of 0s included in the first boson operator string is 0), and / or determine the position mask of the fourth target boson operator according to the quantum bit corresponding to the fourth target boson operator, and / or determine the position mask of the fifth target boson operator according to the quantum bit corresponding to the fifth target boson operator.

[0143] For example, take a two-level quantum system as an example, and take the first bosonic operator string as Iσ1(-σ p )σ0σ z σ m For example, since the first bosonic operator string Iσ1(-σ p )σ0σ z σ m The boson operator I in the zero state and the one state have a result value that is not 0. The first boson operator string Iσ1(-σ p )σ0σ z σ m The bosonic operator σ in z The result value of the operation on both the zero state and the one state is not 0, so the quantum computing device can choose the bosonic operator I as the first target bosonic operator, and the bosonic operator σ z As the second target boson operator, or, the quantum computing device can select the boson operator I as the second target boson operator, the boson operator σz As the first target bosonic operator.

[0144] Optionally, in a possible implementation, due to the first bosonic operator string Iσ1(-σ p )σ0σ z σ m The boson operator σ1 in the zero state and the one state respectively produces two result values, one of which is 0. For example, the result value of the boson operator σ1 acting on the zero state is 0, and the result value of the boson operator σ1 acting on the one state is |1>. The first boson operator string Iσ1(-σ p )σ0σ z σ m The bosonic operator σ in p There is a result value of 0 in the two result values ​​produced by acting on the zero state and the one state respectively. The first bosonic operator string Iσ1(-σ p )σ0σ z σ m The bosonic operator σ in p There is a result value of 0 in the two result values ​​produced by acting on the zero state and the one state respectively. The first bosonic operator string Iσ1(-σ p )σ0σ z σ m The bosonic operator σ in m Among the two result values ​​generated by acting on the zero state and the one state respectively, there is a result value of 0.

[0145] Therefore, the quantum computing device can choose the boson operator σ1 as the third target boson operator. p As the fourth target bosonic operator, the bosonic operator σ m As the fifth target boson operator, or the quantum computing device can select the boson operator σ1 as the fourth target boson operator, the boson operator σ p As the third target bosonic operator, the bosonic operator σ m As the fifth target boson operator, or the quantum computing device can select the boson operator σ1 as the fifth target boson operator, the boson operator σ p As the fourth target bosonic operator, the bosonic operator σ m As the third target boson operator, or the quantum computing device can select the boson operator σ1 as the third target boson operator, the boson operator σ p As the fifth target bosonic operator, the bosonic operator σ m As the fourth target boson operator, or the quantum computing device can select the boson operator σ1 as the fourth target boson operator, the boson operator σ pAs the fifth target bosonic operator, the bosonic operator σ m As the third target boson operator, or the quantum computing device can select the boson operator σ1 as the fifth target boson operator, the boson operator σ p As the third target bosonic operator, the bosonic operator σ m As the fourth target bosonic operator.

[0146] For example, the quantum computing device selects boson operator I as the first target boson operator, and the boson operator σ z Taking the second target boson operator as an example, in one example, when the quantum computing device determines the first boson operator string Iσ1(-σ p )σ0σ z σ m When the number of 0s contained in is 0, the quantum computing device can count the first target boson operator I and the second target boson operator σ z The total number n=2. Afterwards, the quantum computing device can calculate the number of non-zero elements included in the sparse matrix, that is, the number of non-zero elements included in the sparse matrix Q=2^(n=2)=4.

[0147] In another example, when the quantum computing device determines the first bosonic operator string Iσ1(-σ p )σ0σ z σ m When the number of 0s contained in is 0, the quantum computing device can obtain the quantum bit 5 of the first target boson operator I and the second target boson operator σ z The quantum computing device then calculates the quantum bit 1 of the first target boson operator I and the quantum bit 5 of the second target boson operator σ z The quantum bit of the sparse matrix is ​​set to 1, which determines the mask array A required for calculating the sparse matrix. power-array , that is, the mask array A power-array =[2 5 ,2 1 ].

[0148] In yet another example, the quantum computing device selects the boson operator σ1 as the third target boson operator. p As the fourth target bosonic operator, the bosonic operator σ m Taking the fifth target boson operator as an example, when the quantum computing device determines the first boson operator string Iσ1(-σ p )σ0σ z σ m When the number of 0s contained in is 0, the quantum computing device can obtain the quantum bit 4 of the third target bosonic operator σ1 and obtain the fourth target bosonic operator σ pThe qubit position 3, and the fifth target bosonic operator σ m The quantum bit is 0.

[0149] Afterwards, the quantum computing device can calculate the position mask mask1 of the third target boson operator σ1 according to the quantum bit 4 of the third target boson operator σ1, that is, the position mask mask1 = 2 4 , the quantum computing device can be based on the fourth target bosonic operator σ p The qubit position 3 calculates the fourth target bosonic operator σ p The location mask p , that is, position mask p =2 3 , the quantum computing device can be based on the fifth target bosonic operator σ m The qubit of the qubit is 0, and the fifth target bosonic operator σ is calculated. m The location mask m , that is, position mask m =2 0 .

[0150] Step 204: The quantum computing device determines the sparse matrix of the first fermion operator string according to the mask information corresponding to the plurality of first bosonic operators.

[0151] Exemplarily, the sparse matrix of the first fermion operator string can be used to determine the ground state energy of the target chemical molecule.

[0152] Optionally, after the quantum computing device determines the mask information corresponding to the multiple first bosonic operators, it can calculate the sparse matrix of the first fermion operator string according to the mask information corresponding to the multiple first bosonic operators.

[0153] Exemplarily, taking the case where the mask information includes a position mask, a mask array, and the number of at least one non-zero element contained in a sparse matrix, the quantum computing device may first determine the integer sequence required for calculating the sparse matrix according to the number of at least one non-zero element contained in the sparse matrix, wherein the integer sequence includes at least one integer. Afterwards, the quantum computing device may calculate the horizontal coordinate and the vertical coordinate of each non-zero element in the sparse matrix, and may calculate the value of each non-zero element. The value of each non-zero element is determined based on a preset threshold.

[0154] Then, the quantum computing device can determine the sparse matrix of the first fermion operator string according to the value of each non-zero element in the at least one non-zero element and the horizontal coordinate and vertical coordinate of each non-zero element in the sparse matrix. Optionally, after calculating the sparse matrix of the first fermion operator string, the quantum computing device can use the sparse matrix of the first fermion operator string to calculate the ground state energy of the target chemical molecule corresponding to the first fermion operator string.

[0155] Exemplarily, taking the first non-zero element as an example, where the first non-zero element is any one of at least one non-zero element, the implementation process of a quantum computing device determining the horizontal coordinate and vertical coordinate of the first non-zero element in a sparse matrix is ​​introduced.

[0156] Optionally, the quantum computing device may select a first integer from the integer sequence, and may convert the first integer into a corresponding binary array by binary conversion. The first integer corresponds to the first non-zero element. Afterwards, the quantum computing device may determine the first numerical value required for calculating the horizontal and vertical coordinates of the first non-zero element in the sparse matrix according to the mask array and the binary array of the first integer. Then, the quantum computing device may determine the vertical coordinate of the first non-zero element in the sparse matrix according to the first numerical value, the position mask of the third target boson operator, and the position mask of the fourth target boson operator, and may determine the horizontal coordinate of the first non-zero element in the sparse matrix according to the first numerical value, the position mask of the third target boson operator, and the position mask of the fifth target boson operator.

[0157] Based on the above content, the following continues to take the first non-zero element as an example to introduce the implementation process of the quantum computing device determining the numerical value of the first non-zero element through the following possible implementation methods.

[0158] Method 1: When the number of 1s in the binary value is an even number, the quantum computing device can perform a product operation on the preset threshold and the first coefficient to obtain a first product result value, and use the first product result value as the value of the first non-zero element.

[0159] Method 2: When the number of 1s in the binary value is an odd number, the quantum computing device can perform a product operation on the preset threshold and the second coefficient to obtain a second product result value, and use the second product result value as the value of the first non-zero element.

[0160] Optionally, the binary value is obtained by the quantum computing device performing a bitwise AND operation on the first integer and the position mask of the second target boson operator. Optionally, the first coefficient is different from the second coefficient.

[0161] Optionally, the quantum computing device may determine the position mask of the second target boson operator by the following steps: when only the first target boson operator and the second target boson operator are retained in the first boson operator string, the quantum computing device may concatenate the first target boson operator and the second target boson operator to obtain a third boson operator string. The first target boson operator and the second target boson operator correspond to new quantum bits in the third boson operator string, respectively. Then, the quantum computing device may determine the position mask of the second target boson operator according to the new quantum bits corresponding to the second target boson operator.

[0162] Exemplarily, the boson operator I is selected as the first target boson operator by the quantum computing device, and the boson operator σ z Taking the second target boson operator as an example, when the first boson operator string Iσ1(-σ p )σ0σ z σ m Only the first target boson operator I and the second target boson operator σ are retained in z When , the quantum computing device can combine the first target boson operator I with the second target boson operator σ z After splicing, we get the third bosonic operator string S'=Iσ z Among them, the first target boson operator I corresponds to a new quantum bit of 1 in the third boson operator string S', and the second target boson operator σ z The corresponding new quantum bit in the third bosonic operator string S' is 0. Then, the quantum computing device can calculate the quantum bit according to the second target bosonic operator σ z The qubit of the qubit is 0, and the second target bosonic operator σ is calculated. z The location mask z , that is, position mask z =2 0 .

[0163] For example, based on the above content, the following continues with the first bosonic operator string Iσ1(-σ p )σ0σ z σ m As an example, the quantum computing device is introduced based on the first bosonic operator string Iσ1(-σ p )σ0σ z σ m The mask information corresponding to the multiple first boson operators contained in , calculates the first fermion operator string The implementation process of sparse matrix.

[0164] Optionally, when the quantum computing device obtains the first bosonic operator string Iσ1(-σ p )σ0σz σ m After the mask information corresponding to the first bosonic operators contained in the quantum computing device is obtained, the quantum computing device can calculate the first fermion operator string by performing the following steps: The sparse matrix of .

[0165] Step a: The quantum computing device obtains the first integer i in sequence.

[0166] Wherein, the first integer i=range(Q). Optionally, when Q=4, the first integer i={0,1,2,3}, and each integer value in {0,1,2,3} corresponds to a non-zero element. The quantum computing device can sequentially obtain each integer value in {0,1,2,3} to calculate the horizontal and vertical coordinates of each non-zero element in the sparse matrix and the value of each non-zero element.

[0167] Step b: The quantum computing device assigns the first non-zero element an initial value data[i]=c. Exemplarily, the value (ie, the preset threshold) c can be set according to actual applications. For example, in one example, the value c=-1 is set.

[0168] Step c: The quantum computing device calculates the binary array b of the first integer i i , that is, b i =bin(i).

[0169] Step d: The quantum computing device generates a power-array and the binary array b i , calculate the first value d i , that is, d i =∑ j A power-array [j]b i [j].

[0170] Step e: The quantum computing device calculates the value of the first i , the position mask mask1 of the third target boson operator σ1 and the position mask mask2 of the fifth target boson operator σ m The location mask m , calculate the abscissa row[i] of the first non-zero element in the sparse matrix, that is, the abscissa row[i] = d i +mask1+mask m , and can be based on the first value d i , the position mask mask1 of the third target boson operator σ1 and the position mask mask2 of the fourth target boson operator σ p The location mask p , calculate the ordinate col[i] of the first non-zero element in the sparse matrix, that is, the ordinate col[i] = +mask1+maskp .

[0171] Step f: When Countone(i&mask z ) is an odd number, the quantum computing device calculates the value data[i]*=first coefficient of the first non-zero element. Exemplarily, the first coefficient can be set according to actual applications. For example, in one example, the first coefficient is set to -1. When Countone(i&mask z ) is an even number, the quantum computing device calculates the value data[i]* of the first non-zero element = the second coefficient. Exemplarily, the second coefficient can be set according to actual applications. For example, in one example, the second coefficient is set to 1.

[0172] It can be seen from the above steps a to f that the quantum computing device determines the first fermion operator string. In the process of calculating the sparse matrix, the number of loops or searches is the number of all non-zero elements in the sparse matrix. In this way, all non-zero elements can be obtained at one time. Since zero elements and any other temporary variables are not involved, it can be ensured that the quantum computing device does not generate any redundant calculations in the process of calculating the sparse matrix, and the consumed computing resources and occupied storage resources are also less, so that the values ​​of all non-zero elements in the sparse matrix and the horizontal and vertical coordinates of all non-zero elements in the sparse matrix can be obtained more efficiently and directly.

[0173] It should be noted that in the description of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there may be three relationships, for example, A and / or B, which can represent: the situation where A exists alone, A and B exist at the same time, and B exists alone, wherein A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are an "or" relationship. "At least one of the following (individuals)" or its similar expression refers to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. And, unless otherwise specified, the ordinal numbers such as "first", "second", and "third" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. In addition, the terms "including", "comprising", "having" and their variations appearing in the present application all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0174] In addition, it should be noted that each step involved in the above embodiments can be performed by a corresponding device, or by a chip, processor, or chip system in the device, and the embodiments of the present application do not limit them. The above embodiments are only described by taking the corresponding device as an example.

[0175] It should be noted that in the above embodiments, some steps can be selected for implementation, and the order of the steps in the diagram can be adjusted for implementation, and this application does not limit this. It should be understood that executing some steps in the diagram, adjusting the order of the steps, or combining them for specific implementation all fall within the scope of protection of this application.

[0176] It is understandable that, in order to implement the functions in the above embodiments, the various devices involved in the above embodiments include hardware structures and / or software modules corresponding to the execution of the various functions. It should be easily appreciated by those skilled in the art that, in combination with the units and method steps of the various examples described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0177] It should be noted that the "steps" in the embodiments of the present application are only for illustration, and are a method of expression used to better understand the embodiments, and do not constitute a substantial limitation on the execution of the scheme of the present application. For example, the "steps" can also be understood as "features". In addition, the steps do not constitute any limitation on the execution order of the scheme of the present application. Any changes in the order of steps, step merging, or step splitting made on this basis that do not affect the implementation of the overall scheme, and the resulting new technical solutions are also within the scope of the disclosure of the present application.

[0178] Based on the same concept, the present application also provides a possible quantum computing device, which is suitable for Figure 1 The quantum computing device is used to implement the fermion operator sparseness method provided in the above embodiment, or the module (such as a chip) of the quantum computing device is used to implement the fermion operator sparseness method provided in the above embodiment, so the beneficial effects of the above embodiment can also be achieved. In the embodiment of the present application, the quantum computing device can be as follows Figure 1 A quantum computing device 100 is shown.

[0179] See also Figure 4, the quantum computing device 400 includes an acquisition module 401 and a processing module 402. The acquisition module 401 is used to acquire the molecular structure information of the target chemical molecule. The processing module 402 is used to determine the first fermion operator string corresponding to the target chemical molecule according to the molecular structure information of the target chemical molecule. The processing module 402 is also used to transform the first fermion operator string to obtain a first bosonic operator string, wherein the first bosonic operator string contains multiple first bosonic operators. The processing module 402 is also used to determine the mask information corresponding to the multiple first bosonic operators when there is no first bosonic operator with a value of zero among the multiple first bosonic operators. The processing module 402 is also used to determine the sparse matrix of the first fermion operator string according to the mask information corresponding to the multiple first bosonic operators, wherein the sparse matrix can be used to determine the ground state energy of the target chemical molecule.

[0180] For a more detailed description of the acquisition module 401 and the processing module 402, reference may be made to the relevant description of the quantum computing device in the above method embodiment, which will not be repeated here.

[0181] It should be understood that the acquisition module 401 in the embodiment of the present application can be implemented by a communication interface or a communication interface related circuit component, and the processing module 402 can be implemented by a processor or a processor related circuit component.

[0182] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0183] 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 technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, or a server, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0184] Based on the same concept, the present application also provides a possible quantum computing device, which is suitable for Figure 1 The quantum computing device is used to implement the technical solutions involved in the quantum computing device in the above embodiments, and thus can also achieve the beneficial effects of the quantum computing device in the above method embodiments. Figure 5 , the quantum computing device 500 includes: a communication interface 501, a processor 502. Optionally, the quantum computing device 500 also includes a memory 503. The communication interface 501, the processor 502 and the memory 503 are interconnected. When the quantum computing device 500 is used to implement the technical solution involved in the quantum computing device provided in the above embodiment, the communication interface 501 can be used to implement the function of the above acquisition module 401, and the processor 502 is used to implement the function of the above processing module 402.

[0185] Optionally, the communication interface 501, the processor 502 and the memory 503 are interconnected via a bus 504. The bus 504 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0186] The communication interface 501 is used to receive and send data. For example, when the quantum computing device is Figure 1 The quantum computing device shown in FIG. 5 , the communication interface 501 can be implemented with Figure 1 The communication interface 501 can communicate with other devices outside the illustrated system architecture (such as a client device (such as a smart phone, a desktop computer or a laptop computer, etc.) equipped with a quantum computing device. Optionally, the communication interface 501 can be an input / output interface.

[0187] The functions of the processor 502 can refer to the description of the corresponding functions involved in the quantum computing device in the above embodiment, and will not be repeated here. Among them, the processor 502 can be a central processing unit (CPU), a network processor (NP) or a combination of CPU and NP, etc. The processor 502 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. When the processor 502 implements the above-mentioned functions, it can be implemented by hardware, and of course, it can also be implemented by executing the corresponding software through hardware.

[0188] The memory 503 is used to store program instructions, etc. Specifically, the program instructions may include program codes, which include computer operation instructions. The memory 503 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 502 executes the program instructions stored in the memory 503 to implement the above functions, thereby implementing the method steps required to be executed by the quantum computing device in the above embodiment.

[0189] Based on the same concept, an embodiment of the present application further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer executes the method provided in the above embodiment.

[0190] Based on the same concept, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computer, the computer executes the method provided in the above embodiment.

[0191] The storage medium may be any available medium that can be accessed by a computer. For example, but not limited to, a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0192] Based on the same concept, an embodiment of the present application further provides a chip, which is coupled to a memory, and is used to read a computer program stored in the memory to implement the method provided in the above embodiment.

[0193] Based on the same concept, the embodiment of the present application also provides a chip system, which includes a processor for supporting a computer device to implement the functions involved in the quantum computing device in the above embodiment. In a possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of chips, or it can include chips and other discrete devices.

[0194] In the method provided in the embodiment of the present application, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).

[0195] The steps of the method described in the embodiments of the present application can be directly embedded in the hardware, the software unit executed by the processor, or the combination of the two. The software unit can be stored in RAM, ROM, EEPROM, register, hard disk, removable disk, CD-ROM or other storage media of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC.

[0196] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0198] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A fermion operator sparsification method, characterized in that: include: Determining a first fermion operator string corresponding to the target chemical molecule according to the molecular structure information of the target chemical molecule; Transforming the first fermion operator string to obtain a first bosonic operator string, wherein the first bosonic operator string includes a plurality of first bosonic operators; When there is no first boson operator with a value of zero among the plurality of first boson operators, determining mask information corresponding to the plurality of first boson operators; According to the mask information corresponding to the multiple first bosonic operators, a sparse matrix of the first fermion operator string is determined, and the sparse matrix is ​​used to determine the ground state energy of the target chemical molecule.

2. The method according to claim 1, characterized in that The multiple first boson operators include a first target boson operator, a second target boson operator, a third target boson operator, a fourth target boson operator and a fifth target boson operator; each first boson operator corresponds to a quantum bit; wherein the first target boson operator or the second target boson operator is a first boson operator among the multiple first boson operators, and multiple result values ​​generated by acting on multiple quantum states are all non-zero; the third target boson operator, the fourth target boson operator, or the fifth target boson operator is a first boson operator among the multiple first boson operators, and at least one result value is zero among multiple result values ​​generated by acting on multiple quantum states; and the first target boson operator, the second target boson operator, the third target boson operator, the fourth target boson operator, and the fifth target boson operator are different from each other; The mask information includes at least one of the following: a position mask, a mask array, or a number of at least one non-zero element included in the sparse matrix; Determining mask information corresponding to the plurality of first boson operators includes: Determining the number of at least one non-zero element included in the sparse matrix according to the number of the first target boson operators and the number of the second target boson operators; or Determine a mask array required for calculating the sparse matrix according to the qubits corresponding to the first target boson operator and the qubits corresponding to the second target boson operator; or Determining a position mask of the third target boson operator according to the quantum bit corresponding to the third target boson operator; or Determining a position mask of the fourth target boson operator according to the quantum bit corresponding to the fourth target boson operator; or According to the quantum bit corresponding to the fifth target boson operator, a position mask of the fifth target boson operator is determined.

3. The method according to claim 2, characterized in that Determining a sparse matrix of the first fermion operator string includes: Determine, according to the number of at least one non-zero element contained in the sparse matrix, an integer sequence required for calculating the sparse matrix, wherein the integer sequence contains at least one integer; The horizontal coordinate and the vertical coordinate of each non-zero element in the at least one non-zero element in the sparse matrix are determined by the following steps: a first integer is selected from the integer sequence, and a binary array of the first integer is determined; wherein the first integer corresponds to a first non-zero element, and the first non-zero element is any non-zero element in the at least one non-zero element contained in the sparse matrix; according to the mask array and the binary array of the first integer, a first numerical value required for calculating the horizontal and vertical coordinates of the first non-zero element in the sparse matrix is ​​determined; according to the first numerical value, the position mask of the third target boson operator, and the position mask of the fourth target boson operator, the vertical coordinate of the first non-zero element in the sparse matrix is ​​determined; and according to the first numerical value, the position mask of the third target boson operator, and the position mask of the fifth target boson operator, the horizontal coordinate of the first non-zero element in the sparse matrix is ​​determined; The sparse matrix is ​​determined according to the abscissa and ordinate of each non-zero element of the at least one non-zero element in the sparse matrix.

4. The method according to claim 3, characterized in that The value of any non-zero element is determined based on a preset threshold; When the number of 1s in the binary value is an odd number, the product value of the preset threshold and the first coefficient is the value of the first non-zero element; or When the number of 1s in the binary value is an even number, the product value of the preset threshold and the second coefficient is the value of the first non-zero element; The binary value is obtained by performing a bitwise AND operation on the first integer and the position mask of the second target boson operator, and the first coefficient is different from the second coefficient.

5. The method according to claim 4, characterized in that The method further comprises: When only the first target boson operator and the second target boson operator are retained in the first boson operator string, the first target boson operator and the second target boson operator are concatenated to obtain a third boson operator string, wherein the first target boson operator and the second target boson operator respectively correspond to new quantum bits in the third boson operator string; According to the new quantum bit corresponding to the second target bosonic operator, a position mask of the second target bosonic operator is determined.

6. The method according to any one of claims 2 to 5, characterized in that: The first fermion operator string is transformed to obtain a first bosonic operator string, including: Mapping at least one fermion operator included in the first fermion operator string respectively to obtain a plurality of second bosonic operator strings; any second bosonic operator string contains a plurality of second bosonic operators; Performing a product operation on the second boson operators belonging to the same quantum bit in the plurality of second boson operator strings to obtain the plurality of first boson operators; According to the quantum bits corresponding to each of the multiple first bosonic operators, the multiple first bosonic operators are sequentially spliced ​​to obtain the first bosonic operator string.

7. The method according to claim 6, characterized in that The method of performing a product operation on the second boson operators belonging to the same quantum bit in the plurality of second boson operator strings to obtain the plurality of first boson operators comprises: Selecting at least one second boson operator located at the first quantum bit position from the plurality of second boson operator strings; According to the extended Pauli operator multiplication table, a product operation is performed on at least one second bosonic operator located at the first quantum bit to obtain a first bosonic operator located at the first quantum bit.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: When there is a first boson operator with a value of zero among the plurality of first boson operators, it is determined that the sparse matrix is ​​a zero matrix.

9. A quantum computing device, characterized in that: The method comprises modules for executing the method as claimed in any one of claims 1 to 8.

10. A quantum computing device, characterized in that: include: Communication interface, used to receive and send data; Memory for storing computer program instructions and data; A processor, configured to read computer program instructions and data in the memory so as to enable the quantum computing device to perform the operating steps of the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed by a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 8.

13. A chip, characterized in that: The chip is coupled to a memory, and the chip reads a computer program stored in the memory to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method, system and program product for mask-based compression of a sparse matrix

    CN109416702A

  • Efficient reduction of resources for the simulation of fermionic hamiltonians on quantum hardware

    CN109643326A

  • Fermionic simulation gates

    CN111480170A

  • Data processing method and related device

    CN112884153A

  • Fabrication of a quantum device

    CN113330572A