Hamiltonian simulation method and hamiltonian simulation device
By modeling condensed matter physics entities and using the stochastic linear combination unitary matrix algorithm to process Pauli decomposition forms, the problem of high circuit execution overhead in Hamiltonian simulation is solved, achieving more efficient Hamiltonian estimation and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH OF CHINA
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies using stochastic linear combination unitary matrix circuits to simulate Hamiltonians have high circuit execution overhead and long execution time, resulting in significant consumption of computational resources.
By modeling condensed matter physics entities, the Pauli decomposition form of the Hamiltonian is extracted, and the initial Pauli pairs are processed using a stochastic linear combination unitary matrix algorithm. Based on the score results, the Pauli matrix set is divided to generate an estimate of the Hamiltonian, thereby reducing the number of circuit executions and resource consumption.
It improves the accuracy of Hamiltonian estimation, reduces circuit overhead and execution time, and is applicable to different quantum computing hardware platforms.
Smart Images

Figure CN122154969A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum computing technology, and more specifically, to a Hamiltonian simulation method and a Hamiltonian simulation device. Background Technology
[0002] Hamiltonian simulation is one of the core applications of quantum computing, aiming to simulate the time evolution of quantum systems. As the number of qubits increases, the difficulty of simulating the Hamiltonian with classical computers increases dramatically, thus requiring quantum computing devices to perform these calculations.
[0003] In realizing the concept of this application, the inventors discovered that when using random linear combination unitary matrix circuits for simulation, the circuit execution overhead is large and the execution time is long, resulting in a large consumption of computational resources. Summary of the Invention
[0004] In view of this, this application provides a Hamiltonian simulation method and a Hamiltonian simulation apparatus.
[0005] One aspect of this application provides a Hamiltonian simulation method, comprising: responding to a simulation command, modeling an input condensed matter physical entity using a modeling program to obtain a physical entity model, extracting the Pauli decomposition form of the Hamiltonian from the physical entity model, and storing the Hamiltonian and the Pauli decomposition form in memory; reading the Pauli decomposition form from the memory, and processing multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm, obtaining a score result and distribution center corresponding to each initial Pauli pair, wherein the initial Pauli pairs are sampled based on a fusion compatibility graph constructed based on the Hamiltonian. The rate is formed by sampling from the baseline distribution; based on the size of the scores relative to the distribution center, the initial Pauli pairs are partitioned to obtain a set of Pauli matrices, wherein the set of Pauli matrices includes multiple partition subsets obtained from the partitioning; the random linear combination unitary matrix algorithm is used to process the multiple target Pauli pairs obtained by sampling the baseline distribution and the set of Pauli matrices to obtain a score for each target Pauli pair; based on the score results of the multiple target Pauli pairs, an estimate of the Hamiltonian is generated, and the simulation results are displayed through a display interface, wherein the simulation results include at least one of the following: multiple partition subsets and the estimated value.
[0006] According to an embodiment of this application, the method further includes: for any of the target Pauli pairs, merging the two controlled branches in the target Pauli pairs to obtain a differential Pauli string; calculating the number of two-bit gates based on the differential Pauli string, and calculating the execution time based on the number of two-bit gates, wherein the simulation result further includes the number of two-bit gates and / or the execution time.
[0007] According to an embodiment of this application, a random linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from the baseline distribution of the above-mentioned Pauli decomposition form, to obtain a score result and distribution center for each of the above-mentioned initial Pauli pairs. This includes iteratively performing the following operations: performing a truncated Taylor expansion on the above-mentioned Pauli decomposition form to obtain a Taylor expansion form, and determining the above-mentioned baseline distribution based on the above-mentioned Taylor expansion form; sampling the above-mentioned baseline distribution using the above-mentioned random linear combination unitary matrix algorithm to obtain the above-mentioned initial Pauli pairs; processing the initial Pauli pairs a preset number of times using a random linear combination unitary matrix circuit based on the random linear combination unitary matrix algorithm to obtain a score result; and determining the above-mentioned distribution center based on the above-mentioned score result.
[0008] According to an embodiment of this application, the initial Pauli pair is processed a preset number of times using a random linear combination unitary matrix circuit based on a random linear combination unitary matrix algorithm to obtain a score result, including: processing the initial Pauli pair using a random linear combination unitary matrix circuit to obtain a numerator result; averaging the multiple numerator results obtained a preset number of times to obtain a score result.
[0009] According to an embodiment of this application, determining the distribution center based on the above scoring results includes: for any controlled branch in the above initial Pauli pair, calculating the probability distribution of the controlled branch based on the coefficients of multiple expansion terms in the above Taylor expansion form and the coefficients of the expansion terms corresponding to the controlled branch; generating distribution weights based on the probability distributions of the two controlled branches in the above initial Pauli pair; and determining the distribution center based on the distribution weights and the above scoring results.
[0010] According to an embodiment of this application, a set of Pauli matrices is obtained by dividing multiple initial Pauli pairs based on the size of multiple score results relative to the distribution center, including: for any of the score results, if the score result is less than the distribution center, the initial Pauli pairs corresponding to the score result are divided into one partition subset; if the score result is not less than the distribution center, the initial Pauli pairs corresponding to the score result are divided into another partition subset.
[0011] According to an embodiment of this application, the above-described stochastic linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set to obtain a score result for each target Pauli pair. This includes iteratively performing the following operations: sampling the baseline distribution based on a first probability and sampling the Pauli matrix set based on a second probability to obtain a target Pauli pair, wherein the second probability is determined based on the first probability; and processing the target Pauli pair using the above-described stochastic linear combination unitary matrix algorithm to obtain the score result.
[0012] According to an embodiment of this application, generating an estimate of the Hamiltonian based on the scores of multiple target Pauli pairs includes: in the t-th sampling, determining the t-th estimate based on the scores of the target Pauli pairs corresponding to the sampling, the baseline distribution, and the distribution probability; and averaging the multiple t-th estimates from the previous t samplings to obtain the estimated value.
[0013] According to an embodiment of this application, the above method further includes: in the t-th sampling, determining the sample variance based on the scores of the previous t samplings; calculating the confidence interval for the t-th sampling based on the sample variance and the number of samplings; and stopping the sampling operation on the baseline distribution and the Pauli matrix set if the confidence interval meets the error tolerance or the number of samplings meets the number threshold.
[0014] According to an embodiment of this application, the sampling probability is determined as follows: vertices in the fusion compatibility graph are determined based on each Hamiltonian term in the Hamiltonian, and edges between each vertex and related vertices in the fusion compatibility graph are determined based on multiple Hamiltonian terms and their respective related Hamiltonian terms; the weighted neighbor degree between each vertex connected to an edge in the fusion compatibility graph and related vertices is calculated, and the fusion-aware sampling probability of the vertex is determined based on the weighted neighbor degree; the importance weight of the Hamiltonian term related to the vertex is determined based on the fusion-aware sampling probability and the standard sampling probability, and the sampling probability of the Hamiltonian term related to the vertex is determined based on the fusion-aware sampling probability and the importance weight, and sampling is performed in the baseline distribution based on the sampling probability of each Hamiltonian term.
[0015] According to an embodiment of this application, the method further includes: for each of at least two adjacent initial Pauli pairs in the sampling sequence, if the at least two initial Pauli pairs satisfy the fusion compatibility condition, generating a fused Pauli pair based on the at least two initial Pauli pairs, so as to replace the at least two initial Pauli pairs in the sampling sequence using the fused Pauli pair, wherein the sampling sequence is constructed based on multiple initial Pauli pairs obtained by sampling from the baseline distribution.
[0016] According to an embodiment of this application, the method further includes: after processing the initial Pauli pairs of non-fusion Pauli pairs in the sampled sequence using the random linear combination unitary matrix algorithm, generating a new score result based on the score result corresponding to the initial Pauli pair and the importance weight associated with the initial Pauli pair.
[0017] Another aspect of this application provides a Hamiltonian simulation apparatus, comprising: a modeling extraction module, configured to, in response to a simulation command, model an input condensed matter physics entity using a modeling program to obtain a physical entity model, extract the Pauli decomposition form of the Hamiltonian from the physical entity model, and store the Hamiltonian and the Pauli decomposition form in memory; and a linear sampling module, configured to read the Pauli decomposition form from the memory, process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm, and obtain a score result and distribution center corresponding to each initial Pauli pair, wherein the initial Pauli pairs are obtained from the baseline based on sampling probabilities determined according to a fusion compatibility graph constructed based on the Hamiltonian. The distribution is sampled from the distribution; a set partitioning module is used to partition multiple initial Pauli pairs based on the size of multiple scores relative to the distribution center to obtain a Pauli matrix set, wherein the Pauli matrix set includes multiple partition subsets obtained by partitioning; a score calculation module is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set using the random linear combination unitary matrix algorithm to obtain a score result for each target Pauli pair; a simulation display module is used to generate an estimate of the Hamiltonian based on the score results of multiple target Pauli pairs and display the simulation results through a display interface, wherein the simulation results include at least one of the following: multiple partition subsets and the estimated value.
[0018] Another aspect of this application provides a quantum computing device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method described above.
[0019] Another aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the method described above.
[0020] Another aspect of this application provides a computer program product including computer-executable instructions that, when executed, are used to implement the methods described above.
[0021] According to embodiments of this application, a randomized linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from a baseline distribution in the form of Pauli decomposition, obtaining a score and distribution center for each initial Pauli pair. The multiple initial Pauli pairs are then partitioned based on the magnitude of the scores relative to the distribution centers, resulting in a set of Pauli matrices. The randomized linear combination unitary matrix algorithm is then used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the set of Pauli matrices, obtaining a score for each target Pauli pair. Based on the scores of the multiple target Pauli pairs, an estimate of the Hamiltonian is generated. Because the initial Pauli pairs are partitioned based on the distribution centers, and the randomized linear combination unitary matrix algorithm is used to process the baseline distribution and the set of Pauli matrices for balanced sampling, the accuracy of the Hamiltonian estimate is improved without changing the unbiased estimation property of the randomized linear combination unitary matrix algorithm. Furthermore, the circuit overhead is small, reducing the number of executions and computational resources required for the randomized linear combination unitary matrix algorithm. Attached Figure Description
[0022] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0023] Figure 1 A flowchart of a Hamiltonian simulation method according to an embodiment of this application is shown.
[0024] Figure 2 A comparison diagram showing the effects of the Hamiltonian simulation method according to embodiments of this application and related technologies is presented.
[0025] Figure 3 A schematic diagram of the circuit structure of the stochastic linear combination unitary matrix circuit used in the Hamiltonian simulation method according to an embodiment of this application is shown.
[0026] Figure 4 A block diagram of a Hamiltonian simulation apparatus according to an embodiment of this application is shown.
[0027] Figure 5 A block diagram of a quantum computing device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Detailed Implementation
[0028] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0031] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0032] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0033] Embodiments of this application provide a Hamiltonian simulation method and a Hamiltonian simulation apparatus. The method includes modeling a condensed matter physics entity to obtain a physical entity model, and extracting the Pauli decomposition form of the Hamiltonian from the physical entity model; processing multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm to obtain a score result and distribution center for each initial Pauli pair; partitioning the multiple initial Pauli pairs based on the magnitude of the multiple score results relative to the distribution center to obtain a Pauli matrix set, wherein the Pauli matrix set includes multiple partition subsets obtained from the partitioning; processing multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set using a stochastic linear combination unitary matrix algorithm to obtain a score result for each target Pauli pair; and generating an estimate of the Hamiltonian based on the score results of the multiple target Pauli pairs.
[0034] Figure 1 A flowchart of a Hamiltonian simulation method according to an embodiment of this application is shown.
[0035] like Figure 1As shown, the Hamiltonian simulation method includes operations S101 to S105.
[0036] In operation S101, in response to the simulation command, the modeling program is used to model the input condensed matter physical entity to obtain a physical entity model. The Pauli decomposition form of the Hamiltonian is extracted from the physical entity model, and the Hamiltonian and the Pauli decomposition form are stored in memory.
[0037] In operation S102, the Pauli decomposition form is read from memory, and multiple initial Pauli pairs formed by sampling from the baseline distribution of the Pauli decomposition form are processed using the random linear combination unitary matrix algorithm to obtain the score result and distribution center for each initial Pauli pair.
[0038] In operation S103, multiple initial Pauli pairs are partitioned based on the size of multiple score results relative to the distribution center to obtain a set of Pauli matrices, wherein the set of Pauli matrices includes multiple partition subsets obtained from the partitioning.
[0039] In operation S104, the random linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set, and the score result of each target Pauli pair is obtained.
[0040] In operation S105, based on the scores of multiple target Pauli pairs, an estimate of the Hamiltonian is generated, and the simulation results are displayed through the interface.
[0041] The simulation results include at least one of the following: multiple partition subsets and estimated values.
[0042] According to embodiments of this application, the Hamiltonian simulation method can be executed by quantum computing devices such as quantum computers, and the simulation instructions can be automatically generated by the quantum computing device when the user inputs a condensed matter physics entity.
[0043] According to embodiments of this application, a condensed matter physics entity can refer to a specific material system or physical object of interest in condensed matter physics research. These entities are composed of a large number of interacting microscopic particles (such as atoms, electrons, spins, etc.). For example, a condensed matter physics entity can be a LiH molecule, a LiHoYF4 crystal, or an ultracold atom system.
[0044] According to embodiments of this application, the Random Linear Combination Unitary Matrix (RLCU) algorithm is an algorithm used in quantum computing and linear algebra that combines random matrix generation with linear combination operations of unitary matrices. In this embodiment, the algorithm is executed through a Random Linear Combination Unitary Matrix circuit.
[0045] According to an embodiment of this application, after a user inputs a condensed matter physical entity, the quantum computing device uses a modeling program to model the condensed matter physical entity, thereby obtaining a corresponding physical entity model. This model can be represented by the Transverse-Field Ising model, the Heisenberg model, the Fermi-Hubbard model, the molecular Hamiltonian, etc. For example, the LiH molecule can be represented by the molecular Hamiltonian, and the LiHoYF4 crystal can be represented by the Transverse-Field Ising model.
[0046] According to an embodiment of this application, the Pauli decomposition form of the Hamiltonian is extracted from the physical entity model, and the Hamiltonian and the Pauli decomposition form are stored in memory. The random linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form to obtain the score result and distribution center corresponding to each initial Pauli pair.
[0047] According to embodiments of this application, multiple initial Pauli pairs are partitioned based on the size of the score of each initial Pauli pair relative to the distribution center to obtain a Pauli matrix set, wherein the Pauli matrix set includes multiple partition subsets obtained from the partitioning. For example, initial Pauli pairs with scores greater than the distribution center can be grouped into one partition subset, and the remaining initial Pauli pairs can be grouped into another partition subset.
[0048] According to an embodiment of this application, after partitioning the set, the random linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set, and the score result of each target Pauli pair is obtained. Based on the score results of multiple target Pauli pairs, the estimated value of the Hamiltonian can be generated, thereby displaying the simulation results including the estimated value to the user, for example, through a webpage.
[0049] According to embodiments of this application, a randomized linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from a baseline distribution in the form of Pauli decomposition, obtaining a score and distribution center for each initial Pauli pair. The multiple initial Pauli pairs are then partitioned based on the magnitude of the scores relative to the distribution centers, resulting in a set of Pauli matrices. The randomized linear combination unitary matrix algorithm is then used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the set of Pauli matrices, obtaining a score for each target Pauli pair. Based on the scores of the multiple target Pauli pairs, an estimate of the Hamiltonian is generated. Because the initial Pauli pairs are partitioned based on the distribution centers, and the randomized linear combination unitary matrix algorithm is used to process the baseline distribution and the set of Pauli matrices for balanced sampling, the accuracy of the Hamiltonian estimate is improved without changing the unbiased estimation property of the randomized linear combination unitary matrix algorithm, while reducing the number of times the randomized linear combination unitary matrix algorithm is executed.
[0050] According to an embodiment of this application, the above method further includes: for any target Pauli pair, merging the two controlled branches in the target Pauli pair to obtain a differential Pauli string; calculating the number of two-bit gates based on the differential Pauli string, and calculating the execution time based on the number of two-bit gates, wherein the simulation results also include the number of two-bit gates and / or the execution time.
[0051] According to embodiments of this application, the stochastic linear combination unitary matrix circuit needs to execute two controlled Pauli branches when processing Pauli pairs in each round. For Pauli Strings Its controlled implementation is only The site interacts with the control bits, where It is an identity matrix. Therefore, the number of two-bit gates and the Pauli string weights are related. Proportional. If the two branches are synthesized separately, the number of two-bit gates is approximately equal to... + .
[0052] According to an embodiment of this application, for any target Pauli pair, the two controlled Pauli branches in the target Pauli pair are determined based on formula (1). The merging process yields the difference Pauli string.
[0053] (1);
[0054] in, This represents the fundamental state vector of a quantum system and the conjugate transpose of the state vector. Let represent the excited state vector and the conjugate transpose of the excited state vector of the quantum system. Controlled branch The conjugate transpose of Hamiltonian Pauli decomposition form is ,in ,coefficient , Let X represent the identity matrix, where X, Y, and Z represent the matrices corresponding to the X, Y, and Z gates, respectively, and n represents the total number of X, Y, Z, and I.
[0055] According to embodiments of this application, let the differential Pauli string... (Ignoring the overall phase), the fusion circuit is formed by "local application" "and controlled application" "Composition. Since P is only in and Non-in different positions Therefore, the number of two-bit gates It can be calculated using formula (2):
[0056] (2);
[0057] in, Indicates the count, Representing a quantum bit, , This represents the number of two-bit gates in different controlled branches. This represents the number of two-bit gates required for the synthesis of the two controlled components.
[0058] According to embodiments of this application, when two controlled branches have a large number of identical factors, The sum is significantly smaller than the original sum, thus reducing the number of two-bit gates and circuit depth in this embodiment. The original sum can be represented as the number of matrices of types X, Y, and Z.
[0059] According to the embodiments of this application, after obtaining the number of two-bit gates, the execution time can be calculated based on formula (3). :
[0060] (3);
[0061] in, The number of times the random linear combination unitary matrix circuit is executed. This represents the number of two-bit gates in each iteration of the circuit. Balanced sampling reduces variance. To reduce Controlled merger passed reduce ,reduce The reasons are described below. It is a two-bit gate time.
[0062] According to an embodiment of this application, after obtaining the number of two-bit gates and the execution time, the number of two-bit gates and / or the execution time can be displayed to the user.
[0063] In some embodiments, the two controlled branches are respectively , .but Implementing each of the two branches requires approximately [amount missing]. One two-bit gate interaction is required, while after fusion, only one two-bit gate interaction is needed.
[0064] Figure 2 A comparison diagram showing the effects of the Hamiltonian simulation method according to embodiments of this application and related technologies is presented.
[0065] from Figure 2As can be seen in (a) of this paper, when dealing with different numbers of qubits, and with different models constructed, namely the transverse field Ising model, the Heisenberg model, the Fermi-Hubbard model, and the molecular Hamiltonian model of LiH, the execution time obtained by the method in this embodiment is significantly reduced compared to conventional techniques. Figure 2 As can be seen in (b), when dealing with different numbers of qubits, the number of two-bit gates required by the method of this embodiment is significantly reduced compared to conventional techniques when different models are processed using the method of this embodiment.
[0066] According to the embodiments of this application, the method of this embodiment reduces the number of two-qubit gates for all qubit numbers compared to related technologies, effectively reducing resource consumption in quantum computing and achieving a significant reduction in execution time. It is also applicable to different physical entity models and can flexibly meet the needs of different quantum computing hardware platforms.
[0067] According to an embodiment of this application, a random linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form, to obtain the score result and distribution center for each initial Pauli pair. This includes iteratively performing the following operations: performing a truncated Taylor expansion on the Pauli decomposition form to obtain the Taylor expansion form, and determining the baseline distribution based on the Taylor expansion form; sampling the baseline distribution using the random linear combination unitary matrix algorithm to obtain initial Pauli pairs; processing the initial Pauli pairs a preset number of times using a random linear combination unitary matrix circuit based on the random linear combination unitary matrix algorithm to obtain the score result; and determining the distribution center based on the score result.
[0068] According to embodiments of this application, for Hamiltonian The Pauli decomposition form is obtained by using a truncated Taylor expansion to obtain the Taylor expansion form. ,in For unitary operators formed by Pauli series products, For coefficients, Let be the number of terms after expansion. and determine the baseline distribution. Then we have: ,in, .
[0069] Using a stochastic linear combination unitary matrix algorithm, from the baseline distribution in each round Two indexes are sampled independently. That is, the initial Pauli pair, constructing two controlled Pauli branches. A random circuit performing a predetermined number of random linear combination unitary matrix algorithms under a controlled structure with a single auxiliary bit is used to measure the score for each iteration. Therefore, based on multiple scoring results Determine the distribution center.
[0070] According to an embodiment of this application, the initial Pauli pair is processed a preset number of times using a random linear combination unitary matrix circuit based on a random linear combination unitary matrix algorithm to obtain a score result, including: processing the initial Pauli pair using a random linear combination unitary matrix circuit to obtain a numerator result; averaging the multiple numerator results obtained a preset number of times to obtain a score result.
[0071] According to embodiments of this application, in each iteration, the initial Pauli pair is processed using a random linear combination unitary matrix algorithm. After processing, a molecular result can be obtained. The score is obtained by averaging the results of multiple attempts. .
[0072] According to an embodiment of this application, determining the distribution center based on the score result includes: for any controlled branch in the initial Pauli pair, calculating the probability distribution of the controlled branch based on the coefficients of multiple expansion terms in the Taylor expansion form and the coefficients of the expansion terms corresponding to the controlled branch; generating distribution weights based on the probability distributions of the two controlled branches in the initial Pauli pair; and determining the distribution center based on the distribution weights and the score result.
[0073] According to embodiments of this application, the initial Pauli pair comprises two controlled branches. , For any controlled branch, the probability distribution of the controlled branch can be calculated based on the coefficients of multiple expansion terms in the Taylor expansion form and the coefficients of the expansion terms corresponding to the controlled branch. , The calculation process of the probability distribution and the baseline distribution. The same applies. Based on the probability distributions of the two controlled branches in the initial Pauli pair, distribution weights are generated. .
[0074] According to embodiments of this application, the distribution center is determined based on the distribution weights and scores corresponding to different initial Pauli pairs. As shown in formula (4):
[0075] (4).
[0076] According to an embodiment of this application, a set of Pauli matrices is obtained by partitioning multiple initial Pauli pairs based on the size of multiple score results relative to the distribution center. This includes: for any score result, if the score result is less than the distribution center, the initial Pauli pair corresponding to the score result is partitioned into one partition subset; if the score result is not less than the distribution center, the initial Pauli pair corresponding to the score result is partitioned into another partition subset.
[0077] According to an embodiment of this application, for any initial Pauli pair, if the score is less than the distribution center, then the initial Pauli pair is assigned to a partition subset. Otherwise, it will be partitioned into another subset. In the middle, the two partitioned subsets obtained after partitioning can be expressed as formula (5):
[0078] , (5).
[0079] According to an embodiment of this application, for each partitioned subset, the distribution weight of each initial Pauli pair in the partitioned subset can be normalized to obtain the probability distribution of the initial Pauli pair within the partitioned subset.
[0080] According to an embodiment of this application, a random linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling a baseline distribution and a Pauli matrix set to obtain a score for each target Pauli pair. This includes iteratively performing the following operations: sampling the baseline distribution based on a first probability and sampling the Pauli matrix set based on a second probability to obtain a target Pauli pair, wherein the second probability is determined based on the first probability; and processing the target Pauli pair using the random linear combination unitary matrix algorithm to obtain a score.
[0081] According to an embodiment of this application, the first probability It can be set according to specific needs; for example, it can be set to 0.45, and the second probability can be... .
[0082] According to embodiments of this application, with a first probability From baseline distribution = Sampling; with second probability exist and Alternating sampling intervals and sampling according to the within-group distribution yields the target Pauli pairs. Let the final proposal distribution be... The score of the target Pauli pair is obtained by executing the random linear combination unitary matrix algorithm once. .
[0083] According to an embodiment of this application, generating an estimate of the Hamiltonian based on the scores of multiple target Pauli pairs includes: in the t-th sampling, determining the t-th estimate based on the scores of the target Pauli pairs corresponding to the sampling, the baseline distribution, and the distribution probability; and averaging the multiple t-th estimates from the previous t samplings to obtain the estimated value.
[0084] According to an embodiment of this application, in the t-th sampling, the t-th estimator is determined based on the score of the target Pauli pair corresponding to the sampling, the baseline distribution, and the distribution probability, as shown in formula (6):
[0085] (6).
[0086] Due to the importance sampling properties Therefore, the estimated value can be expressed as Maintaining unbiasedness. Compared to the variance of 1 for the estimator in related technologies, the method in this embodiment... The variance decreased significantly.
[0087] According to an embodiment of this application, the above method further includes: in the t-th sampling, determining the sample variance based on the scores of the previous t samplings; calculating the confidence interval of the t-th sampling based on the sample variance and the number of samplings; and stopping the sampling operation on the baseline distribution and the Pauli matrix set if the confidence interval meets the error tolerance or the number of samplings meets the number threshold.
[0088] According to an embodiment of this application, let the score result for the t-th time be... The estimator is the sample mean. Its variance It can be expressed by formula (7):
[0089] (7).
[0090] in, Let be the number of samplings, and let the covariance between any two adjacent Pauli pairs be . Then the sample variance It can be expressed by formula (8):
[0091] (8).
[0092] When adjacent covariance hour, Relatively independent sampling ( The mean is smaller. Based on the above formula, it can be seen that this embodiment intentionally introduces negative correlation through "alternating sampling", which can accelerate the convergence of the mean. The "alternating sampling" involved in this embodiment is the sampling operation with the first probability and the second probability described above.
[0093] According to embodiments of this application, based on the sample variance, the number of samples N, and the adjacent covariance... The confidence interval for the t-th sample can be calculated. ,when Or the number of samples reaches the threshold. Stop at time This is the error tolerance.
[0094] Figure 3 A schematic diagram of the circuit structure of the stochastic linear combination unitary matrix circuit used in the Hamiltonian simulation method according to an embodiment of this application is shown.
[0095] In one specific embodiment, after obtaining the Pauli decomposition form through modeling, a truncated Taylor expansion can be performed, and a baseline distribution can be determined based on the Taylor expansion form, so as to use... Figure 4 The random linear combination unitary matrix circuit shown performs a preset number of balanced samplings N, as follows: Figure 4 RLCU in N This process determines the score, identifies the distribution center based on the score, and then uses the distribution center to divide Pauli pairs. Figure 3 The difference between the RLCU in this application and the original RLCU is that the original RLCU handles the two controlled branches of the Pauli pair. , Implementing the two branches separately requires approximately A two-bit gate, the RLCU of this application is... It only requires one two-bit gate, which clearly shows a significant reduction in the number of two-bit gates. , For observable measurement, N baseline The threshold is the number of occurrences.
[0096] According to embodiments of this application, sampling is performed on the partitioned Pauli matrix set and baseline distribution according to different probabilities. A differential Pauli string is calculated on the sampled target Pauli pairs using a stochastic linear combination unitary matrix circuit. An estimate of the Hamiltonian is then calculated based on the score of the target Pauli pairs output by the stochastic linear combination unitary matrix circuit. The method in this embodiment calculates the number of two-bit gates and the execution time. The difference in the number of samples between the method in this embodiment and the conventional method is shown in Table 1. As can be seen from Table 1, the method in this embodiment significantly reduces the number of samples N of the random linear combination unitary matrix algorithm.
[0097] Table 1
[0098]
[0099] According to an embodiment of this application, the sampling probability is determined as follows: vertices in the fusion compatibility graph are determined based on each Hamiltonian term in the Hamiltonian, and edges between each vertex and related vertices in the fusion compatibility graph are determined based on multiple Hamiltonian terms and their respective related Hamiltonian terms; the weighted neighbor degree between each vertex connected to an edge in the fusion compatibility graph and related vertices is calculated, and the fusion-aware sampling probability of the vertex is determined based on the weighted neighbor degree; the importance weight of the Hamiltonian term associated with the vertex is determined based on the fusion-aware sampling probability and the standard sampling probability, and the sampling probability of the Hamiltonian term associated with the vertex is determined based on the fusion-aware sampling probability and the importance weight, and sampling is performed in the baseline distribution based on the sampling probability of each Hamiltonian term.
[0100] According to embodiments of this application, for example, the Hamiltonian is... ,in L is the number of Hamiltonian terms. Hamiltonian term The coefficients are based on multiple Hamiltonian terms. The fusion compatibility diagram can be determined. For example, merging vertex sets in a compatibility graph Each vertex corresponds to a Hamiltonian term. Edge set If item and If the conditions for fusion under controlled-unitary fusion (CUF) are met, then... The conditions for CUF fusion include: (a) two controlled unitary gates. and (a) Controlled bit structure compatibility (e.g., using the same auxiliary bit encoding); (b) Target unitary operation and The action space satisfies the commutative or merging condition; (c) two operations can be performed in series in the same quantum circuit segment without introducing additional auxiliary bit overhead.
[0101] For common quantum chemical Hamiltonians (such as Pauli strings), the above fusion condition can be simplified to: two Pauli strings and All qubits are either identical or one of them is the identity operator I, i.e. and It is qubit-wise compatible (Wiring with Integrated Switching Electronics).
[0102] According to embodiments of this application, each Hamiltonian term Fusion degree Its weighted neighbor degree in the fusion compatibility graph G is shown in Equation (9):
[0103] (9).
[0104] in, Hamiltonian term coefficient, degree of integration The Hamiltonian term was measured. The "affinity" between itself and other compatible items. The larger the value, the easier it is for the item to be integrated with subsequent sampling items.
[0105] Fusion sensing sampling probability It can be calculated using formula (10):
[0106] (10).
[0107] in The unknown fusion boost parameter is solved through subsequent steps, and it controls the intensity of fusion sensing. It is a 1-norm; This is the normalization constant.
[0108] As can be seen from the above formula, when hour, This degenerates into the sampling probability of a standard randomized LCU method (such as qDRIFT), i.e., the standard sampling probability. ;when At that time, items with higher fusion degree receive a greater sampling probability.
[0109] According to embodiments of this application, since the sampling probability is from Become To ensure the unbiasedness of the simulation, an importance weight needs to be introduced for correction. Specifically, when sampling to the th... When an item is selected, its corresponding evolution operator should be multiplied by its importance weight. Importance weight As shown in formula (11):
[0110] (11).
[0111] When calculating the statistical average, the expected value is... It is completely consistent with the standard qDRIFT, thus ensuring unbiasedness.
[0112] While the introduction of importance weights may increase the variance of the estimate, the overall statistical efficiency (i.e., accuracy given a total number of executions) is actually improved due to the significant reduction in the number of circuit executions resulting from fusion. This embodiment uses constraints... The range of values is used to control the variance increment, ensuring that the fusion benefit is greater than the variance cost.
[0113] According to embodiments of this application, fusion enhancement parameters The choice requires balancing two factors: (a) The larger the value, the higher the fusion probability, and the greater the reduction in the number of circuit executions; (b) The larger the variance, the greater the variance of the importance weight, which may require more sampling times to achieve the same statistical precision. Therefore, this embodiment proposes an adaptive selection strategy:
[0114] (1) Calculate the structural parameters of the fusion compatibility graph: average fusion degree fusion variance , graph density ;
[0115] (2) Estimate the expected fusion rate under different η values ;
[0116] (3) Estimate the variance of importance weights under different η values ;
[0117] (4) Select the optimal fusion enhancement parameters That is, maximizing the ratio of fusion rate to variance cost.
[0118] The aforementioned optimization problem can be solved efficiently on a classical computer using grid search or the golden section method, thereby obtaining the optimal fusion enhancement parameters. The computational complexity is O(n). ,in This is the size of the search grid.
[0119] Once the optimal fusion enhancement parameter η* is determined, the sampling probability of the Hamiltonian term associated with the vertex can be determined by combining formula (10), and sampling can be performed in the baseline distribution based on the sampling probability of each Hamiltonian term.
[0120] According to an embodiment of this application, the above method further includes: for each of at least two adjacent initial Pauli pairs in the sampling sequence, if the at least two initial Pauli pairs satisfy the fusion compatibility condition, generating a fused Pauli pair based on the at least two initial Pauli pairs, so as to replace the at least two initial Pauli pairs in the sampling sequence using the fused Pauli pair, wherein the sampling sequence is constructed based on multiple initial Pauli pairs obtained by sampling from the baseline distribution.
[0121] In one embodiment, the sampled sequence obtained from the sampling... Traverse each pair of adjacent terms That is, two adjacent initial Pauli pairs, check Check if the condition is met. If it is met, mark the two adjacent initial Pauli pairs as fusionable. For fusionable adjacent pairs, merge them to construct a fusion circuit (containing the series connection of two controlled unitary gates), that is, merge the Pauli pairs and execute them as a primary circuit; for non-fusionable terms, construct a separate circuit and execute it.
[0122] In one embodiment, a size of [size missing] is used on the sampling sequence. A sliding window is used to find the largest merge subset within the window. Window size The choice depends on hardware constraints (maximum circuit depth) and the clique number of the fusion compatibility graph. m sampling terms are selected from the sampling sequence using a sliding window. ,like When all pairs of sampling items meet the fusion compatibility conditions, they can be... All controlled unitary gates are fused into a single fused Pauli pair, thus enabling execution through a single circuit. At this point, the calculation of the fused sensing sampling probability needs to consider higher-order compatibility relationships, and the fused compatibility graph is expanded into a hypergraph.
[0123] In the above embodiments, after obtaining the fused Pauli pairs, at least two initial Pauli pairs in the sampled sequence can be replaced using the fused Pauli pairs to facilitate the subsequent processing of the sampled sequence using the random linear combination unitary matrix algorithm.
[0124] According to an embodiment of this application, the above method further includes: after processing the initial Pauli pairs of non-fusion Pauli pairs in the sampled sequence using a random linear combination unitary matrix algorithm, generating a new score result based on the score result corresponding to the initial Pauli pair and the importance weight associated with the initial Pauli pair.
[0125] When processing sampled sequences using circuits based on the random linear combination unitary matrix algorithm, for the original initial Pauli pairs in the sampled sequence, the measurement results (i.e., the scores) performed by the circuit can be multiplied by the corresponding importance weights to obtain the new scores.
[0126] In the sampling probability determined based on the fusion compatibility graph, the method has the following effects: (1) Under the premise of ensuring the unbiasedness of the simulation, the fusion success rate between consecutive sampling terms is significantly improved by optimizing the sampling probability of fusion perception. Experiments show that the average fusion rate is improved by 30%~60%; (2) The reduction in the number of circuit executions brought about by fusion can reduce the total execution time by an average of about 37.5%, and this benefit is greater than that of molecular Hamiltonians of different scales (from (3) The adaptive fusion enhancement parameter selection strategy does not require manual parameter tuning and can automatically determine the optimal parameters according to the Hamiltonian structure, which has good universality and robustness. (4) The preprocessing stage of the above sampling method is completed entirely on a classical computer without increasing quantum resource overhead, and the computational complexity is polynomial in terms of the number of Hamiltonian terms, which can efficiently process large-scale Hamiltonians with hundreds to thousands of terms. (5) The above sampling method can be seamlessly integrated with other optimization techniques such as CUF and Balanced Sampling to form a complete quantum Hamiltonian simulation acceleration framework.
[0127] To more clearly illustrate the advantages of the sampling method provided in this embodiment, the following illustrative descriptions are provided from three different embodiments.
[0128] In the first embodiment, water molecules ( Hamiltonian simulations were performed. The Hamiltonian of a water molecule under the STO-3G basis set, after Jordan-Wigner transformation, contains approximately 200 Pauli cascade terms. After constructing the fusion compatibility graph, the graph density is approximately ρ ≈ 0.15, and the average fusion degree is... Using the sampling method of this embodiment, the optimal fusion enhancement parameters are set. (Determined by an adaptive strategy), the expected fusion rate is F ≈ 0.42, compared to the fusion rate F0 of standard qDRIFT. An improvement of 133%. Under the same accuracy requirements ( Under these conditions, the total number of circuit executions is reduced by approximately 35%.
[0129] In the second embodiment, nitrogen molecules ( Hamiltonian simulations were performed. The Hamiltonian of the nitrogen molecule under the cc-pVDZ basis set contains approximately 2000 Pauli tandem terms. The fusion compatibility graph density ρ ≈ 0.08, and the average fusion degree... Using the method of this embodiment, the optimal fusion enhancement parameters are obtained. Expected fusion rate By combining a sliding window (W=4) multi-factor fusion strategy, the total number of circuit executions is reduced by about 40%, with about 15% of the contribution coming from multi-factor fusion of three or more factors.
[0130] Figure 4 A block diagram of a Hamiltonian simulation apparatus according to an embodiment of this application is shown.
[0131] like Figure 4 As shown, the Hamiltonian simulation device 400 includes a modeling extraction module 410, a linear sampling module 420, a set partitioning module 430, a score calculation module 440, and a simulation display module 450.
[0132] The modeling extraction module 410 is used to respond to simulation commands, model the input condensed matter physical entity using a modeling program, obtain a physical entity model, extract the Pauli decomposition form of the Hamiltonian from the physical entity model, and store the Hamiltonian and the Pauli decomposition form in memory.
[0133] The linear sampling module 420 is used to read the Pauli decomposition form from memory and process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm to obtain the score result and distribution center of each initial Pauli pair. The initial Pauli pairs are sampled from the baseline distribution based on the sampling probability determined by the fusion compatibility graph constructed based on Hamiltonian.
[0134] The set partitioning module 430 is used to partition multiple initial Pauli pairs based on the size of multiple score results relative to the distribution center to obtain a Pauli matrix set, wherein the Pauli matrix set includes multiple partition subsets obtained by partitioning.
[0135] The scoring module 440 is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set using the random linear combination unitary matrix algorithm, and to obtain the score result for each target Pauli pair.
[0136] The simulation display module 450 is used to generate an estimate of the Hamiltonian based on the score results of multiple target Pauli pairs, and to display the simulation results through a display interface. The simulation results include at least one of the following: multiple partition subsets and the estimated value.
[0137] According to embodiments of this application, a randomized linear combination unitary matrix algorithm is used to process multiple initial Pauli pairs sampled from a baseline distribution in the form of Pauli decomposition, obtaining a score and distribution center for each initial Pauli pair. The multiple initial Pauli pairs are then partitioned based on the magnitude of the scores relative to the distribution centers, resulting in a set of Pauli matrices. The randomized linear combination unitary matrix algorithm is then used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the set of Pauli matrices, obtaining a score for each target Pauli pair. Based on the scores of the multiple target Pauli pairs, an estimate of the Hamiltonian is generated. Because the initial Pauli pairs are partitioned based on the distribution centers, and the randomized linear combination unitary matrix algorithm is used to process the baseline distribution and the set of Pauli matrices for balanced sampling, the accuracy of the Hamiltonian estimate is improved without changing the unbiased estimation property of the randomized linear combination unitary matrix algorithm, while reducing the number of times the randomized linear combination unitary matrix algorithm is executed.
[0138] Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or implemented by hardware or firmware in any other reasonable manner by integrating or packaging circuits, or implemented in any one of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0139] For example, any multiple of the modeling extraction module 410, linear sampling module 420, set partitioning module 430, score calculation module 440, and simulation display module 450 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this application, at least one of the modeling extraction module 410, linear sampling module 420, set partitioning module 430, score calculation module 440, and simulation display module 450 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the modeling extraction module 410, linear sampling module 420, set partitioning module 430, score calculation module 440, and simulation display module 450 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0140] It should be noted that the Hamiltonian simulation device part in the embodiments of this application corresponds to the Hamiltonian simulation method part in the embodiments of this application. For a detailed description of the Hamiltonian simulation device part, please refer to the Hamiltonian simulation method part, which will not be repeated here.
[0141] Figure 5 A block diagram of a quantum computing device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Figure 5 The quantum computing device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0142] like Figure 5 As shown, a quantum computing device 500 according to an embodiment of this application includes a processor 501, which can perform various appropriate actions and processes according to a program stored in ROM 502 (read-only memory) or a program loaded from storage portion 508 into RAM 503 (random access memory). The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0143] RAM 503 stores various programs and data required for the operation of the quantum computing device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0144] According to embodiments of this application, the quantum computing device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The quantum computing device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0145] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0146] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0147] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0148] For example, according to embodiments of this application, a computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0149] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on a quantum computing device, the program code is used to enable the quantum computing device to implement the methods provided in the embodiments of this application.
[0150] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0151] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0152] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments of this application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of this application.
[0154] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. This application does not depart from its scope, and those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A Hamiltonian simulation method, characterized in that, include: In response to the simulation command, the modeling program is used to model the input condensed matter physical entity to obtain a physical entity model. The Pauli decomposition form of the Hamiltonian is extracted from the physical entity model, and the Hamiltonian and the Pauli decomposition form are stored in memory. The Pauli decomposition form is read from memory, and multiple initial Pauli pairs are sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm. The score and distribution center of each initial Pauli pair are obtained. The initial Pauli pairs are sampled from the baseline distribution based on the sampling probability determined by the fusion compatibility graph constructed based on Hamiltonian. Based on the size of multiple score results relative to the distribution center, multiple initial Pauli pairs are partitioned to obtain a set of Pauli matrices, wherein the set of Pauli matrices includes multiple partition subsets obtained from the partitioning; The random linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set, and the score result of each target Pauli pair is obtained. Based on the scores of multiple target Pauli pairs, an estimate of the Hamiltonian is generated, and the simulation results are displayed through a display interface. The simulation results include at least one of the following: multiple partition subsets and the estimate.
2. The method according to claim 1, characterized in that, Also includes: For any of the target Pauli pairs, the two controlled branches in the target Pauli pairs are merged to obtain a difference Pauli string; The number of two-bit gates is calculated based on the differential Pauli string, and the execution time is calculated based on the number of two-bit gates. The simulation result also includes the number of two-bit gates and / or the execution time.
3. The method according to claim 1, characterized in that, The algorithm of stochastic linear combination unitary matrix is used to process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form, to obtain the score and distribution center for each initial Pauli pair, including iteratively performing the following operations: The Pauli decomposition form is truncated and Taylorized to obtain the Taylor expansion form, and the baseline distribution is determined based on the Taylor expansion form. The baseline distribution is sampled using the aforementioned random linear combination unitary matrix algorithm to obtain the initial Pauli pairs; The initial Pauli pair is processed a preset number of times using a random linear combination unitary matrix circuit based on the aforementioned random linear combination unitary matrix algorithm to obtain the score result; The distribution center is determined based on the scoring results.
4. The method according to claim 3, characterized in that, The initial Pauli pair is processed a predetermined number of times using a random linear combination unitary matrix circuit based on the aforementioned random linear combination unitary matrix algorithm to obtain the score result, including: The initial Pauli pair is processed using the aforementioned random linear combination unitary matrix circuit to obtain the numerator result; The average of the multiple molecular results obtained from a preset number of attempts is used to obtain the score result.
5. The method according to claim 3, characterized in that, Determining the distribution center based on the scoring results includes: For any controlled branch in the initial Pauli pair, the probability distribution of the controlled branch is calculated based on the coefficients of multiple expansion terms in the Taylor expansion form and the coefficients of the expansion terms corresponding to the controlled branch. Based on the probability distribution of the two controlled branches in the initial Pauli pair, generate distribution weights; The distribution center is determined based on the distribution weights and the score results.
6. The method according to claim 1 or 3, characterized in that, The sampling probability is determined in the following way: The vertices in the fusion compatibility graph are determined based on each Hamiltonian term in the Hamiltonian, and the edges between each vertex and its related vertices in the fusion compatibility graph are determined based on multiple Hamiltonian terms and their respective related Hamiltonian terms. Calculate the weighted neighbor degree between each vertex connected to an edge in the fusion compatibility graph and related vertices, and determine the fusion-aware sampling probability of the vertex based on the weighted neighbor degree; The importance weights of Hamiltonian terms associated with the vertex are determined based on the fused sensing sampling probabilities and the standard sampling probabilities. The sampling probabilities of Hamiltonian terms associated with the vertex are then determined based on the fused sensing sampling probabilities and the importance weights. Sampling is then performed in the baseline distribution based on the sampling probabilities of each Hamiltonian term.
7. The method according to claim 6, characterized in that, Also includes: For each of at least two adjacent initial Pauli pairs in the sampling sequence, if at least two initial Pauli pairs satisfy the fusion compatibility condition, a fused Pauli pair is generated based on the at least two initial Pauli pairs, so as to replace at least two initial Pauli pairs in the sampling sequence using the fused Pauli pair, wherein the sampling sequence is constructed based on multiple initial Pauli pairs obtained by sampling from the baseline distribution; This also includes: After processing the initial Pauli pairs of non-fusion Pauli pairs in the sampled sequence using the random linear combination unitary matrix algorithm, a new score is generated based on the score corresponding to the initial Pauli pair and the importance weight associated with the initial Pauli pair.
8. The method according to claim 1, characterized in that, Based on the size of the multiple scores relative to the distribution center, the multiple initial Pauli pairs are partitioned to obtain a set of Pauli matrices, including: For any of the aforementioned score results, if the score result is less than the distribution center, the initial Pauli pairs corresponding to the score result are divided into a partition subset; If the score is not less than the distribution center, the initial Pauli pair corresponding to the score is assigned to another partition subset.
9. The method according to claim 1, characterized in that, The random linear combination unitary matrix algorithm is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set, to obtain a score for each target Pauli pair, including iteratively performing the following operations: A target Pauli pair is obtained by sampling the baseline distribution based on a first probability and sampling the Pauli matrix set based on a second probability, wherein the second probability is determined based on the first probability. The target Pauli pair is processed using the aforementioned random linear combination unitary matrix algorithm to obtain the score result.
10. The method according to claim 9, characterized in that, Based on the scores of multiple target Pauli pairs, an estimate of the Hamiltonian is generated, including: In the t-th sampling, the t-th estimator is determined based on the score of the target Pauli pair corresponding to the sampling, the baseline distribution, and the distribution probability; The estimated value is obtained by averaging the multiple t-th estimates from the previous t samplings.
11. The method according to claim 10, characterized in that, Also includes: In the t-th sampling, the sample variance is determined based on the scores from the previous t samplings; Calculate the confidence interval for the t-th sample based on the sample variance and the number of samples. If the confidence interval meets the error tolerance or the number of samplings meets the threshold, the sampling operation on the baseline distribution and the Pauli matrix set is stopped.
12. A Hamiltonian simulation device, characterized in that, include: The modeling extraction module is used to respond to simulation commands, model the input condensed matter physical entity using a modeling program to obtain a physical entity model, extract the Pauli decomposition form of the Hamiltonian from the physical entity model, and store the Hamiltonian and the Pauli decomposition form in memory. A linear sampling module is used to read the Pauli decomposition form from the memory and process multiple initial Pauli pairs sampled from the baseline distribution of the Pauli decomposition form using a stochastic linear combination unitary matrix algorithm to obtain the score result and distribution center of each initial Pauli pair. The initial Pauli pairs are sampled from the baseline distribution based on the sampling probability determined by the fusion compatibility graph constructed based on Hamiltonian. A set partitioning module is used to partition multiple initial Pauli pairs based on the size of multiple score results relative to the distribution center to obtain a Pauli matrix set, wherein the Pauli matrix set includes multiple partition subsets obtained by partitioning; The scoring module is used to process multiple target Pauli pairs obtained by sampling the baseline distribution and the Pauli matrix set using the random linear combination unitary matrix algorithm, and to obtain the score result of each target Pauli pair; The simulation display module is used to generate an estimate of the Hamiltonian based on the score results of multiple target Pauli pairs, and to display the simulation results through a display interface, wherein the simulation results include at least one of the following: multiple partition subsets and the estimate.