Gene phasing method and device based on dvqe, equipment and storage medium

CN121483366BActive Publication Date: 2026-10-09SHENZHEN SPINQ TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511409108.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-10-09
Estimated Expiration
2045-09-28

AI Technical Summary

Technical Problem

[0004]基于上述问题,本申请实施例提供了基于DVQE的基因定相方法、装置、设备及存储介质,目的是克服现有基因定相方法在处理大规模基因组数据时存在的易陷入局部最优、收敛精度不足及求解效率有限的问题

Benefits of technology

[0050]By mapping gene sequencing fragments to nodes of an undirected graph and using the number of different bases at SNP sites between fragments as edge weights, the gene phasing problem is transformed into a maximum cut problem on an undirected graph. Furthermore, this application maps the objective function of the maximum cut problem to the global Hamiltonian of the Ising model, enabling the gene phasing task to be solved within a quantum framework. The optimal solution to the maximum cut problem is obtained by solving for the ground state (the lowest energy quantum state) of the Hamiltonian, resulting in a better grouping method for gene sequencing fragments and avoiding the drawback of iterative optimization easily getting trapped in local optima in traditional VQE-like methods. Simultaneously, addressing the limited number of qubits that current quantum processors can handle, this application decomposes the global Hamiltonian into multiple sub-Hamiltonians and combines DVQE to perform parallel solutions on each sub-Hamiltonian, thereby improving solution efficiency while maintaining controllable computational scale and avoiding the shortcomings of excessive computational complexity in existing exact algorithms and insufficient accuracy in classical approximation algorithms. Finally, by analyzing the global solution, the haplotype source of each sequencing fragment can be accurately determined, achieving higher-precision gene phasing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121483366B_ABST
    Figure CN121483366B_ABST
Patent Text Reader

Abstract

The application discloses a gene phasing method and device based on DVQE, equipment and a storage medium, which are used to solve the problem that the existing gene phasing method is easy to fall into local optimization and has insufficient convergence accuracy when processing large-scale sequencing data. The method comprises the following steps: mapping the obtained gene sequencing fragments to the nodes of an undirected graph, and taking the difference base number between the gene sequencing fragments at the SNP site as the edge weight between the nodes; converting the gene phasing problem into a maximum cut problem of the undirected graph; constructing a target function according to the maximum cut problem of the undirected graph, and mapping the target function into a global Hamiltonian of an Ising model based on the constructed target function; decomposing the global Hamiltonian into a plurality of sub-Hamiltonians based on the number of bits that can be carried by a quantum processor; performing parallel solving on each sub-Hamiltonian by using a distributed quantum variational eigen-solver (DVQE), and obtaining a global solution; and determining the haplotype source of each sequencing fragment according to the global solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gene phasing technology, and in particular to gene phasing methods, apparatus, devices and storage media based on DVQE. Background Technology

[0002] Gene phasing is an important problem in bioinformatics, aiming to accurately assign heterozygous sites in the genome of diploid organisms to two homologous chromosomes, thereby reconstructing haplotype sequences. While high-throughput sequencing technology can obtain vast amounts of genotype data, it cannot directly distinguish the parental origin of alleles; therefore, computational methods are needed to infer haplotypes. Computationally, the gene phasing problem can be modeled as a combinatorial optimization problem. For example, the fragment allocation problem can be transformed into a maximum cut problem in graph theory. By optimizing the fragment partitioning method to maximize the differences between different groups, fragments from the same source have high similarity, while fragments from different sources have large differences, thus obtaining the most probable haplotype phasing result.

[0003] Existing methods for solving the maximum cut problem mainly fall into three categories: First, exact algorithms such as branch and bound, while guaranteeing the optimal solution, have computational complexity that increases exponentially with the problem size, making them unsuitable for handling large-scale genomic data in practical applications. Second, classical approximation algorithms such as semidefinite programming or metaheuristic algorithms can obtain approximate solutions in polynomial time, but their accuracy decreases significantly with increasing problem size. Third, traditional variational quantum eigensolver (VQE) methods tend to get stuck in local optima during iteration, resulting in insufficient accuracy of phase determination results and difficulty in balancing convergence speed and solution accuracy under complex constraints. Therefore, designing new solution methods within the quantum optimization framework that can overcome local optima limitations while improving overall convergence performance and solution quality has become an urgent technical problem to be solved. Summary of the Invention

[0004] Based on the above problems, this application provides a gene phasing method, apparatus, device and storage medium based on DVQE, in order to overcome the problems of existing gene phasing methods being prone to getting trapped in local optima, having insufficient convergence accuracy and limited solution efficiency when processing large-scale genomic data.

[0005] In a first aspect, embodiments of this application provide a gene phasing method based on DVQE, including:

[0006] The obtained gene sequencing fragments are mapped to nodes of an undirected graph, and the number of differential bases between the gene sequencing fragments at single nucleotide polymorphism (SNP) sites is used as the edge weight between the nodes.

[0007] The gene phasing problem is transformed into a maximum cut problem of an undirected graph, and an objective function is constructed based on the maximum cut problem of the undirected graph.

[0008] The constructed objective function is mapped to the global Hamiltonian of the Ising model;

[0009] Based on the number of bits that a quantum processor can carry, the global Hamiltonian is decomposed into multiple sub-Hamiltonians;

[0010] A distributed quantum variational eigensolver (DVQE) is used to solve each sub-Hamiltonian in parallel to obtain the global solution;

[0011] The haplotype origin of each sequencing fragment is determined based on the global solution.

[0012] In one embodiment, constructing the objective function based on the maximum cut problem of the undirected graph includes:

[0013] Assign binary decision variables to the gene sequencing fragments. as well as ;in Indicates the source of the first haplotype. Indicates the source of the second haplotype. Indicates the source of the first haplotype. Indicates the source of the second haplotype;

[0014] Based on the assigned binary decision variables and the edge weights between the nodes, construct the objective function corresponding to the maximum cut problem of the undirected graph;

[0015] The objective function is expressed as follows:

[0016]

[0017] In the formula, This represents the set of binary decision variables corresponding to all nodes in an undirected graph; Represents a node and nodes The edges connecting them; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. Perform the traversal and accumulate the edge weights of each edge; Represents a node binary decision variables; Represents a node binary decision variables; The edge weight represents the number of differential bases at SNP sites between the two gene sequencing fragments.

[0018] In one embodiment, the constructed objective function is mapped to the global Hamiltonian of the Ising model, including:

[0019] The binary decision variables in the objective function are mapped onto a preset Pauli matrix Z to obtain the global Hamiltonian corresponding to the objective function;

[0020] The Hamiltonian is expressed as:

[0021]

[0022] In the formula, This represents the global Hamiltonian corresponding to the objective function; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. The edge weights are accumulated; For the edge The weights; For the first Pauli qubits Operators; For the first Pauli qubits Operators.

[0023] In one embodiment, the number of bits that the quantum processor can carry decomposes the global Hamiltonian into multiple sub-Hamiltonians, satisfying the following expression:

[0024]

[0025] In the formula, This represents the global Hamiltonian corresponding to the objective function; This indicates summing over all sub-Hamiltonians; For the first The coefficients corresponding to each component; Represents Hamiltonian The One component; This represents the tensor product, an operator used to combine operators of multiple qubits into a single system. Represents Hamiltonian components The The Hamiltonian, of which , This represents the total number of sub-Hamiltonians, i.e., how many parts the original large Hamiltonian was split into for processing. Each sub-Hamiltonian... Only applies to One quantum bit, Indicates the total number of sub-bits; This represents the number of qubits acted by each sub-Hamiltonian.

[0026] In one embodiment, the step of using a distributed quantum variational eigenvalue solver (DVQE) to perform parallel solutions on each sub-Hamiltonian to obtain a global solution includes:

[0027] Assign a quantum processor to each sub-Hamiltonian and build a parameterized quantum circuit on each quantum processor. Obtain the initial global solution by optimizing the quantum circuit parameters to minimize the expected value of the global Hamiltonian.

[0028] The obtained global solution is subjected to a neighborhood search algorithm to flip bit by bit, and the change in the cut value after each bit flip is determined. The solution that maximizes the cut value is selected as the optimized global solution.

[0029] In one embodiment, after performing bit-by-bit flipping on the obtained global solution using a neighborhood search algorithm to determine the cut value change after each bit flip, and selecting the solution that maximizes the cut value as the optimized global solution, the method further includes:

[0030] The optimized global solution is divided into multiple substrings;

[0031] For each substring, based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, a single-bit rotation gate or a two-bit rotation gate is applied to the parameterized quantum circuit corresponding to the substring to generate a new parameterized quantum circuit based on the original parameterized quantum circuit.

[0032] The adjustable parameters in the new parameterized quantum circuit are optimized to minimize the expected value of the global Hamiltonian and output the final global solution for determining the haplotype origin of each gene sequencing fragment.

[0033] In one embodiment, the step of applying a single-bit rotation gate or a two-bit rotation gate in the parameterized quantum circuit corresponding to each substring, based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, includes:

[0034] Compare the values ​​of bits in the substring bit by bit with the corresponding values ​​of bits in the initial global solution;

[0035] When the value of a bit in a substring is different from the value of the corresponding bit in the initial global solution, a single-bit rotation gate is added to the quantum bit corresponding to that bit.

[0036] When any two bits in the optimized global solution have different values, a two-bit rotation gate is added between the corresponding two qubits.

[0037] Secondly, embodiments of this application also provide a gene phasing device based on DVQE, comprising:

[0038] The fragment mapping unit is used to map the obtained gene sequencing fragments into nodes of an undirected graph, and uses the number of different bases at SNP sites between the gene sequencing fragments as the edge weights between the nodes.

[0039] The problem transformation unit is used to transform the gene phase problem into the maximum cut problem of an undirected graph.

[0040] The objective function construction unit is used to construct an objective function based on the maximum cut problem of the undirected graph, and to map the constructed objective function to the global Hamiltonian of the Ising model.

[0041] Hamiltonian decomposition unit, used to decompose the global Hamiltonian into multiple sub-Hamiltonians based on the number of bits that the quantum processor can carry;

[0042] Parallel solution unit is used to perform parallel solution of each sub-Hamiltonian using a distributed quantum variational eigenvalue solver (DVQE) to obtain the global solution;

[0043] The result determination unit is used to determine the haplotype origin of each sequencing fragment based on the global solution.

[0044] Thirdly, embodiments of this application also provide a quantum computing device, including:

[0045] Processor, memory, communication interface;

[0046] The memory is either a short-term storage memory or a persistent storage memory;

[0047] The processor is configured to communicate with the memory and execute instructions in the memory to perform any of the above-described DVQE-based gene phasing methods.

[0048] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it performs the gene phasing method based on DVQE described in any of the above-mentioned embodiments.

[0049] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0050] By mapping gene sequencing fragments to nodes of an undirected graph and using the number of different bases at SNP sites between fragments as edge weights, the gene phasing problem is transformed into a maximum cut problem on an undirected graph. Furthermore, this application maps the objective function of the maximum cut problem to the global Hamiltonian of the Ising model, enabling the gene phasing task to be solved within a quantum framework. The optimal solution to the maximum cut problem is obtained by solving for the ground state (the lowest energy quantum state) of the Hamiltonian, resulting in a better grouping method for gene sequencing fragments and avoiding the drawback of iterative optimization easily getting trapped in local optima in traditional VQE-like methods. Simultaneously, addressing the limited number of qubits that current quantum processors can handle, this application decomposes the global Hamiltonian into multiple sub-Hamiltonians and combines DVQE to perform parallel solutions on each sub-Hamiltonian, thereby improving solution efficiency while maintaining controllable computational scale and avoiding the shortcomings of excessive computational complexity in existing exact algorithms and insufficient accuracy in classical approximation algorithms. Finally, by analyzing the global solution, the haplotype source of each sequencing fragment can be accurately determined, achieving higher-precision gene phasing results. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0052] Figure 1 A schematic flowchart of a gene phasing method based on DVQE provided for an embodiment of this application;

[0053] Figure 2 An embodiment provided in this application A schematic diagram of the parameterized quantum circuit of the gate;

[0054] Figure 3 An embodiment provided in this application A schematic diagram of the parameterized quantum circuit of the gate;

[0055] Figure 4 A schematic diagram of another gene phasing method based on DVQE provided for embodiments of this application;

[0056] Figure 5 A schematic diagram of a gene phasing device based on DVQE provided for an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of a quantum computing device structure provided in an embodiment of this application. Detailed Implementation

[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0059] Quantum computing, as a next-generation information processing technology, has attracted widespread attention in recent years due to its parallel computing capabilities and potential advantages in combinatorial optimization problems. Among combinatorial optimization problems, the maximum cut (MaxCut) problem is a typical NP-hard problem with important applications in graph theory, network optimization, gene phasing, and many other fields. Particularly in gene phasing scenarios, it is necessary to divide sequencing fragments into two sets originating from the paternal and maternal parents, such that fragments from the same source have high similarity while fragments from different sources have large differences. This problem can essentially be transformed into a MaxCut problem for solution.

[0060] Current methods for solving the Maxcut problem mainly fall into three categories. The first is exact algorithms, such as branch and bound and dynamic programming. Although exact algorithms can find the optimal solution, their computational complexity increases exponentially with the problem size, i.e., their time complexity is O(2^3). N The first approach is to use quantum algorithms, where N is the number of vertices in the MaxCut problem. This approach is only applicable to small-scale problems. The second approach is classical approximation algorithms, such as semi-definite programming (SDP), local search algorithms, genetic algorithms, and simulated annealing, which are metaheuristic algorithms. Classical approximation optimization algorithms can find approximate solutions to problems in polynomial time and are commonly used to solve large-scale problems. However, as the problem size increases, the accuracy of classical approximation optimization algorithms decreases, making it difficult to meet practical production needs. The third approach is quantum algorithms, such as quantum approximate optimization algorithms (QAOA), variable quantum eigenvalue solvers (VQE), and quantum annealing. Based on the properties of quantum mechanics, such as quantum superposition and quantum entanglement, quantum computing can perform parallel computations, possessing computational power far exceeding that of classical computing, and can efficiently handle large-scale problems that are difficult to solve using classical computing. However, current quantum computing is still in the era of noisy intermediate-scale quantum (NISQ) computing, where quantum resources are relatively scarce, making it difficult to handle large-scale MaxCut problems. Therefore, some researchers have proposed the Distributed Quantum Eigenvalue Solver (DVQE) algorithm based on the Quantum Eigenvalue Solver (VQE) algorithm and using a distributed computing strategy.

[0061] In DVQE algorithms, hardware-efficient parameterized quantum circuits (HEAs) are often used to construct the solution space of the problem. However, this method is prone to getting trapped in local optima. In summary, existing quantum optimization algorithms have limited ability to explore the search space and struggle to balance convergence speed and solution accuracy under complex constraints.

[0062] The various embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0063] This application provides a gene phasing method based on DVQE, such as... Figure 1 As shown, the method includes steps S110-S160.

[0064] S110: Map the obtained gene sequencing fragments to nodes of an undirected graph, and use the number of different bases at SNP sites between the gene sequencing fragments as the edge weights between the nodes.

[0065] Specifically, the first step is to perform a reference genome alignment on the obtained gene sequencing fragments. For example, the SNP site coordinates and bases of each gene sequencing fragment can be extracted based on a pre-determined set of SNP sites. This set of SNP sites can be derived from the set of SNP sites obtained by performing variation detection on the sequencing data of the same sample, or from the set of SNP sites known in a public database for the same sample.

[0066] To ensure data reliability, low-quality bases, low-alignment-quality fragments, and repetitive fragments can be removed or marked. Based on this, each gene sequencing fragment that passes quality verification is mapped to a node in an undirected graph, and each node stores the set of SNP sites it covers and the corresponding base information for those SNP sites.

[0067] After the node is established, any two sequencing fragments If the bases at at least one common SNP site differ from the corresponding bases in the human genome reference sequence, then an edge is constructed. The edge weight of the undirected edge is defined as the number of bases that are inconsistent between two gene sequencing fragments at their shared SNP sites. If a shared site is a deletion, low-quality, or indeterminate base in either gene sequencing fragment, it is not included in the edge weight. If the two gene sequencing fragments do not share any SNP sites, no undirected edge is established between their corresponding nodes. It can be understood that a larger edge weight indicates a higher degree of difference between the two gene sequencing fragments at their shared SNP sites, suggesting they are more likely to originate from different homologous chromosomes; conversely, a smaller edge weight indicates greater consistency between the two fragments at their shared SNP sites, suggesting they are more likely to originate from the same homologous chromosome.

[0068] For example, suppose there are three fragments obtained through high-throughput sequencing in the target genome region, denoted as r1, r2, and r3. The base observation information at several SNP sites obtained by alignment to the human reference genome sequence is as follows: fragment r1 covers SNP1 and SNP2, with observed bases A and G respectively; fragment r2 covers SNP2 and SNP3, with observed bases C and T respectively; fragment r3 covers SNP1 and SNP3, with observed bases A and C respectively. The bases on the reference sequence are: SNP1=A, SNP2=C, SNP3=T.

[0069] Map r1, r2, and r3 to nodes v1, v2, and v3 of an undirected graph, resulting in a node set V = {v1, v2, v3}. It is evident that r1 and r2 both cover the SNP2 site. The base information observed for r1 at SNP2 is G, and the base information observed for r2 at SNP2 is C. The base information of the reference sequence at the SNP2 site is also C. Since the bases at the common SNP2 site of the two gene sequencing fragments r1 and r2 differ from the corresponding bases in the reference sequence, an edge is constructed... , Weight = 1. r1 and r3 both cover SNP1. The base information observed by r2 at SNP1 is A, the base information observed by r3 at SNP1 is A, and the base information of the reference sequence at SNP1 is A. Since the base information of r1 and r3 at the shared SNP1 site is the same as the corresponding bases of the reference sequence, no edge is constructed. r2 and r3 both cover SNP3. The base information observed by r2 at SNP3 is T, the base information observed by r3 at SNP3 is C, and the base information of the reference sequence at SNP3 is T. Since the bases of the two gene sequencing fragments at the common SNP site SNP2 differ from the corresponding bases of the reference sequence, an edge is constructed. , Weight = 1. The final undirected graph consists of a set of nodes V = {v1, v2, v3} and a set of edges E = { ( (weight=1) ( The weight is 1).

[0070] S120: Transform the gene phasing problem into a maximum cut problem of an undirected graph, and construct an objective function based on the maximum cut problem of the undirected graph.

[0071] Gene phasing is essentially a grouping problem, requiring the determination of whether each gene sequence fragment originates from the paternal or maternal chromosome based on sequencing data. Ideally, gene sequence fragments from the same source (paternal or maternal) should have identical or highly similar bases at the SNP sites they cover; while gene sequence fragments from different sources typically exhibit significant differences at their covered SNP sites. Therefore, transforming the gene phasing problem into a maximum cut problem in an undirected graph aims to maximize the similarity of fragments within the same group while maximizing the difference between fragments in different groups.

[0072] The goal of the maximum cut problem is to divide all nodes in a graph into two groups such that the sum of the edge weights crossing these two groups is maximized. By transforming the gene phasing problem into a maximum cut problem for an undirected graph, the edge weight represents the number of bases that are inconsistent at a common SNP site between two gene sequencing fragments. The greater the difference, the higher the edge weight. By maximizing the sum of edge weights, it is ensured that fragments with large differences are assigned to different groups, thereby effectively distinguishing fragments from different haplotypes and achieving the goal of gene phasing.

[0073] S130: Map the constructed objective function to the global Hamiltonian of the Ising model.

[0074] In the Ising model, each node is represented by a binary spin variable, which can take the values ​​+1 or -1, corresponding to the two different sets to which the node can be assigned. When the spin variables of two nodes have the same value, i.e., the two nodes are in the same set, the edge is not counted in the cut value; when the spin variables have opposite values, i.e., the two nodes are in different sets, the edge weight is counted in the cut value. Therefore, the larger the sum of the edge weights, the lower the energy of the Ising model; minimizing the energy is equivalent to maximizing the cut value. Based on this principle, the objective function constructed after transforming the gene phasing problem into a maximum cut problem for an undirected graph is further mapped to the global Hamiltonian of the Ising model. The optimal solution to the maximum cut problem can then be obtained by solving the ground state (the quantum state with the lowest energy) of the Hamiltonian, thus ensuring that the optimization objective of the gene phasing problem is achieved.

[0075] For example, for nodes The Ising model uses spin variables. To represent the result of node partitioning, for example Represents a node Sets classified as originating from the parent haplotype middle, Represents a node Set classified as originating from the maternal haplotype In this way, the partitioning problem for each node is encoded into a set of ±1 spin variables.

[0076] The energy function of the Ising model is expressed as:

[0077]

[0078] in, Represents the global Hamiltonian of the Ising model; and Let be any two distinct nodes in an undirected graph; Represents the edge set of an undirected graph; Represents nodes in an undirected graph and The edge weight of the undirected edge between them; Represents a node The partitioning results, for example Represents a node Classified into sets whose haplotype origin is the parent middle, Represents a node Classified into the set whose haplotype origin is the parent. middle; Represents a node The partitioning results, for example Represents a node Classified into sets whose haplotype origin is the parent middle, Represents a node Classified into the set whose haplotype origin is the parent. In the middle; it can be seen that, When the value is +1, the energy contribution is 0. When =-1, the energy contribution is Therefore, the smaller the energy function, the greater the total weight of the cut edges.

[0079] S140: Based on the number of bits that the quantum processor can carry, the global Hamiltonian is decomposed into multiple sub-Hamiltonians.

[0080] Considering the hardware resource constraints of current quantum processors, and given that the global Hamiltonian often corresponds to all nodes and edges in large-scale gene phasing problems, involving coupling relationships of hundreds or even thousands of qubits, far exceeding the capacity of existing quantum processors, it is necessary to decompose the global Hamiltonian based on the number of qubits that the quantum processor can handle. This involves dividing it into multiple sub-Hamiltonians, each containing only variables and interaction terms within the qubit limit. This ensures that the scale of each computational task running on the quantum processor remains within the hardware limits of the quantum processor, thus overcoming the hardware resource bottleneck.

[0081] S150: Using distributed quantum variables, the eigenvalue solver DVQE performs parallel solutions on each sub-Hamiltonian to obtain the global solution.

[0082] Decomposing the global Hamiltonian using DVQE and solving each sub-Hamiltonian in parallel enables the solution process to run within the finite number of qubits of a quantum processor, reducing the computational complexity of the overall maximum cut problem. Parallel solving of the multiple sub-Hamiltonians also improves efficiency. Furthermore, since the sub-Hamiltonians cover different parts of the overall maximum cut problem, the DVQE optimization process can perform a more thorough search within the global solution space, thus avoiding the pitfalls of traditional VQE, which is prone to getting trapped in local optima due to its limited search range. This makes the overall solution closer to the true global optimum. Therefore, using DVQE to solve each sub-Hamiltonian in parallel can balance convergence speed and solution accuracy when dealing with large-scale gene phasing problems, overcoming the problems of low computational efficiency and insufficient accuracy of existing techniques under complex constraints.

[0083] S160: Determine the haplotype origin of each sequencing fragment based on the global solution.

[0084] As mentioned earlier, the global solution typically exists in the form of a binary string or a sequence of spin variables, where each bit or spin variable corresponds to a node in an undirected graph, i.e., a gene sequencing fragment. By using pre-defined encoding rules, such as assigning a bit value "0" to the paternal haplotype source and a bit value "1" to the maternal haplotype source, or assigning spin variable values ​​"+1" and "-1" to two different haplotype sources respectively, the obtained global solution can be transformed into a determination of the haplotype source for each gene sequencing fragment.

[0085] In summary, this application's embodiments map gene sequencing fragments to nodes of an undirected graph and use the number of different bases at SNP sites between fragments as edge weights, transforming the gene phasing problem into a maximum cut problem on an undirected graph. Furthermore, this application maps the objective function of the maximum cut problem to the global Hamiltonian of the Ising model, enabling the gene phasing task to be solved within a quantum framework. The optimal solution to the maximum cut problem is obtained by solving for the ground state (the lowest energy quantum state) of the Hamiltonian, resulting in a better gene sequencing fragment grouping method. This avoids the drawback of traditional VQE-type methods where iterative optimization easily gets trapped in local optima. Simultaneously, addressing the limited number of qubits that current quantum processors can handle, this application decomposes the global Hamiltonian into multiple sub-Hamiltonians and combines DVQE to perform parallel solutions on each sub-Hamiltonian, thereby improving solution efficiency while ensuring controllable computational scale. This avoids the shortcomings of existing exact algorithms having excessive computational complexity and classical approximation algorithms having insufficient accuracy. Ultimately, by analyzing the global solution, the haplotype origin of each sequencing fragment can be accurately determined, achieving higher-precision gene phasing results.

[0086] In one embodiment, the step S120 of this application, which involves constructing an objective function based on the maximum cut problem of the undirected graph, specifically includes:

[0087] S121: Assign binary decision variables to the gene sequencing fragment. as well as ;in Indicates the first haplotype source (e.g., parental source). Indicates the second haplotype source (e.g., the maternal parent source). Indicates the source of the first haplotype. Indicates the source of the second haplotype;

[0088] S122: Based on the assigned binary decision variables and the edge weights between the nodes, construct the objective function corresponding to the maximum cut problem of the undirected graph;

[0089] The objective function is expressed as follows:

[0090]

[0091] In the formula, This represents the set of binary decision variables corresponding to all nodes in an undirected graph; Represents a node and nodes The edges connecting them; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. Perform the traversal and accumulate the edge weights of each edge; Represents a node binary decision variables; Represents a node binary decision variables; The edge weight represents the number of differential bases at SNP sites between the two gene sequencing fragments. It can be viewed as a binary function; specifically, if Then the binary function A value of 1 indicates that the node Corresponding fragments and nodes The corresponding fragments belong to different haplotype sources, which means... This edge has been cut; if Then the binary function A value of 0 indicates that the node Corresponding fragments and nodes The corresponding fragments belong to the same haplotype source, which means that... This edge will not be cut.

[0092] In one embodiment, the objective function based on the construction in step S130 of this application embodiment is mapped to the global Hamiltonian of the Ising model, including:

[0093] S131: Map the binary decision variables in the objective function to a preset Pauli matrix Z to obtain the global Hamiltonian corresponding to the objective function;

[0094] By transforming the binary decision variables in the objective function into spin variables in the Ising model through a mapping relationship, and further projecting them onto the preset Pauli matrix Z, the binary decision variables originally represented by {0,1} can be equivalently replaced with spin variables taking values ​​of {+1, -1}. The quantum state is then represented using the Pauli Z operator, so that the state of each qubit can characterize the partitioning result of a node in the maximum cut problem. This transforms the maximum cut problem into a problem applicable to quantum processors for solving the ground state of a quantum system.

[0095] The Hamiltonian is expressed as:

[0096]

[0097] In the formula, This represents the global Hamiltonian corresponding to the objective function; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. The edge weights are accumulated; For the edge The weights; For the first Pauli qubits Operators; For the first Pauli qubits Operators.

[0098] In one embodiment, the number of bits that the quantum processor can carry, mentioned in step S140 of this application embodiment, refers to the Ising model Hamiltonian. Uniformly decomposed into Height Hamilton It satisfies the following expression:

[0099]

[0100] In the formula, This represents the global Hamiltonian corresponding to the objective function; This indicates summing over all sub-Hamiltonians; For the first The coefficients corresponding to each component; Represents Hamiltonian The One component; Represents the tensor product, used to convert... Operators of individual qubits are combined to form the operators of a whole system; Represents Hamiltonian components The The Hamiltonian, of which , This represents the total number of sub-Hamiltonians, i.e., how many parts the original large Hamiltonian was split into for processing. Each sub-Hamiltonian... Only applies to One quantum bit, Indicates the total number of sub-bits; This represents the number of qubits acted by each sub-Hamiltonian.

[0101] In one embodiment, step S150 of this application, which involves using a distributed quantum variational eigenvalue solver (DVQE) to perform parallel solutions on each sub-Hamiltonian to obtain a global solution, includes:

[0102] S151: Assign a quantum processor to each sub-Hamiltonian and build a parameterized quantum circuit on each quantum processor. Obtain the initial global solution by optimizing the quantum circuit parameters to minimize the expected value of the global Hamiltonian.

[0103] Specifically, step S151 includes the following steps A.1 to A.7:

[0104] A.1: For each sub-Hamiltonian Allocate one quantum processor (QPU), each QPU contains Each quantum bit. By using distributed quantum computing, large problems can be broken down into multiple quantum processing units (QPUs), thus reducing the burden on a single QPU.

[0105] A.2: Initialize parameterized quantum circuits: construct on each QPU A parameterized quantum circuit with 1 bit This parameterized quantum circuit is formed by the action on the first bit. Gates and Entanglement Layers The structure of a door can be formalized as follows:

[0106]

[0107] in, Indicates the first Parameterized quantum circuitry on a QPU; The index representing the QPU, since the global Hamiltonian was decomposed into... There are several sub-Hamiltonians, and the index of the aforementioned sub-Hamiltonian is also... , Each sub-Hamiltonian is assigned to a QPU, so the index of the QPU can inherit the index of the sub-Hamiltonian; For the first The parameters to be optimized in a parameterized quantum circuit, among which ; , ,in, This indicates the rotation angle of the RX gate, and the rotation angle of the first bit. Indicates the first and Action on each bit Rotation angle in a quantum gate. The definition of a door is:

[0108] ;

[0109] in, The parameterized coupling gate between two qubits is represented by the 4×4 matrix above. Gates in computational basis The lower part indicates the diagonal. The retained components represent the real parts of the amplitudes along the diagonal and off-diagonal lines of the matrix. and It is the coupled / flipped component, the imaginary part (imaginary unit) of the amplitude on the off-diagonal side of the matrix. Introduced quantum phase effect); Represents the matrix index; The imaginary unit; This is the scaling factor; This represents the tensor product (Kronecker product) of the Pauli Z matrix and the Pauli X matrix.

[0110] Please refer to Figure 2 , Figure 2 for The diagram illustrates the controlled interaction between two qubits, thus representing the coupling relationship between qubits in the Ising model. The upper qubit in the diagram is the i-th qubit, and the lower qubit is the (i+1)-th qubit. First, a Hadamard gate is applied to the (i+1)-th qubit, transforming its quantum state from Z-based to X-based, allowing it to enter a representation space that can interact with the i-th qubit. Next, a pair of CNOT gates are sequentially applied between the i-th and (i+1)-th qubits, along with a parameterized RZ rotation gate applied to the (i+1)-th qubit, forming a controlled rotation operation. The first CNOT gate maps the state of the i-th qubit to the (i+1)-th qubit, making the result of the RZ rotation gate related to the state of the i-th qubit; the RZ rotation gate, based on the angle parameter... A phase rotation is applied to the (i+1)th qubit to adjust the interaction strength between the two qubits. The second CNOT gate closes the coupling process, ensuring that the desired phase evolution occurs only in the joint state of the two qubits. Finally, a Hadamard gate is applied again to the (i+1)th qubit to switch its state from X-based back to Z-based, thus completing the entire two-qubit interaction process.

[0111] A.3: Quantum state preparation: preparing M parameterized quantum circuits Acting on the initial state respectively M parameterized quantum states are obtained. .in, express The zero state of a quantum bit (tensor product). Indicates the first Parameterized quantum circuitry on a QPU; For the first The parameters to be optimized in a parameterized quantum circuit.

[0112] A.4: M parameterized quantum states The expected value of the global Ising model Hamiltonian is obtained by measuring the expected value of each of the M sub-Hamiltonians and calculating the expected value of the Hamiltonian. The formula for calculating the expected value of the global Hamiltonian is as follows:

[0113]

[0114] in, Indicates the first The expected value calculated in the next iteration; Indicates the first The set of all parameters to be optimized in the next iteration; Indicates the first The iteration, in the... On each QPU, according to parameters Prepared quantum state; Indicates the first During the nth iteration One parameter to be optimized; This means multiplying the local expectations of all sub-Hamiltonians; For the first The calculation is performed in the next iteration.

[0115] A.5: Update the parameters to be optimized for all parameterized quantum circuits using the classical gradient optimizer. ( include Repeat steps A.3, A.4, and A.5 until one of the following preset convergence conditions is met:

[0116] ① Global energy change ;in, Indicates the expected value of the next iteration. Indicates the first The expected value of the global Hamiltonian at the next iteration, The preset threshold;

[0117] ② Reaching the maximum number of iterations .

[0118] Here, classic gradient optimizers include, but are not limited to, gradient descent, stochastic gradient descent (SGD), momentum method, AdaGrad, RMSProp, Adam, etc.

[0119] A.6: At the end of the last iteration, that is, when the preset convergence condition is met, read the M parameterized quantum states obtained from the last iteration. The quantum state basis vector with the highest probability Arrange the M quantum state basis vectors in order Performing tensor product yields the ground state corresponding to the optimal solution of the Hamiltonian of the global Ising model. ,Right now .

[0120] A.7: Ground state obtained according to A.6 binary bit string Calculate the cut value of Maxcut, i.e. .in, This represents the binary bit string obtained from A.6. The corresponding cut value; This represents the binary bit string obtained from A.6. The bits.

[0121] S152: The obtained global solution is subjected to a neighborhood search algorithm to flip bit by bit, and the cut value change after each bit flip is determined, so as to select the solution that maximizes the cut value as the optimized global solution.

[0122] In steps A.1 to A.7, a candidate solution, the bit string k, has been obtained. However, since distributed quantum computing may lose some global entanglement information, this embodiment of the application chooses to use a neighborhood search algorithm for fine-tuning to find a better solution, specifically including the following steps B.1 to B.3:

[0123] B.1: Read the ground state described in A.7 binary bit string And calculate the corresponding cut value. , recorded as ;

[0124] B.2: Flip the bit string bit by bit. The binary value of the bit (i.e., if the original bit value is "0", it is changed to "1", and if the original bit value is "1", it is changed to "0") is denoted as the new bit string after flipping the a-th bit. And calculate the corresponding cut value. .

[0125] in, Represented as a bit string The Bit, For a bit string of length n By sequentially flipping n positions using a neighborhood search algorithm, n neighborhood solutions can be obtained, corresponding to n cut values, denoted as . .

[0126] B.3: In Find the maximum value and the corresponding value. , will the maximum value As the optimized global solution .

[0127] In a feasible embodiment, after step S152 of the aforementioned embodiment, where the obtained global solution is subjected to a neighborhood search algorithm for bit-by-bit flipping to determine the cut value change after each bit flip, and the solution that maximizes the cut value is selected as the optimized global solution (including steps B.1~B.3), the method further includes:

[0128] S153: Divide the optimized global solution into multiple substrings;

[0129] Specifically, the global solution optimized in B.3 Divide into M equal parts to obtain M bit strings. ,Right now Each Corresponding to the A bit string of QPUs.

[0130] S154: For each substring, based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, apply a single-bit rotation gate or a two-bit rotation gate to the parameterized quantum circuit corresponding to the substring to generate a new parameterized quantum circuit based on the original parameterized quantum circuit.

[0131] For each substring, based on the differences between the positions of each bit in the substring and the corresponding positions of the initial global solution, the corresponding parameterized quantum circuit is further adjusted. Specifically, when some bits in the substring are inconsistent with the initial solution, a corresponding single-bit or two-bit rotation gate adjustment operation is introduced into the parameterized quantum circuit corresponding to that substring. In this way, a new parameterized quantum circuit that can better characterize the features of the optimized global solution can be generated based on the original parameterized quantum circuit. Finally, by combining the parameterized quantum circuits corresponding to all substrings, a new set of quantum circuits can be obtained and used for subsequent iterative optimization calculations. This can improve the flexibility and adaptability of the quantum circuit in searching the solution space while preserving the overall solution characteristics, avoiding getting trapped in local optima and enhancing the global convergence effect.

[0132] More specifically, in one feasible embodiment, step S154 of the aforementioned embodiment, which describes applying a single-bit rotation gate or a two-bit rotation gate in the parameterized quantum circuit corresponding to each substring based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, includes:

[0133] Each substring of the optimized global solution (denoted as substring) The substring at the same position as the initial global solution (denoted as substring) By comparing bit by bit, if there is a difference between the two solutions at one or two bits, the corresponding operation is added to the corresponding quantum circuit; if there is no difference, it remains unchanged. This allows the quantum circuit to be continuously adjusted according to the difference in the solution, thus getting closer to the optimal solution.

[0134] Specifically, the adjustment scheme based on the differences in solutions includes two cases:

[0135] Case 1 (Single-bit flip): When the value of a bit in a substring is different from the value of the corresponding bit in the initial global solution, a single-bit rotation gate is added to the quantum bit corresponding to that bit.

[0136] Bit-by-bit pairing of substrings (Optimized global solution) In the (corresponding bit string on each QPU) and substring (The initial global solution is at the ) The binary value of a bit string obtained by measuring quantum states on a QPU;

[0137] like In the A parameterized quantum circuit The first in Action on each bit Door;

[0138] like Then in the first A parameterized quantum circuit The first in No operation is performed on any of the bits.

[0139] in, Represents the optimized global solution. The first substring The binary value of a bit (0 or 1); Represents the initial global solution. The first substring The binary value of a bit (0 or 1); The door is the function of the first A single-bit rotation gate on a specific bit of a QPU;

[0140] That is, when the optimized solution The value at a certain bit is related to the initial solution. If the corresponding position is different, a single-bit rotation gate operation is added to the corresponding qubit. For example, assuming the initial solution... The first bit is 0, while the optimal solution If the first bit is 1, then a single-bit rotation gate operation is applied to the first qubit; if the two are the same, nothing is done. This allows quantum circuits to capture differences at the single-bit level.

[0141] Case 2 (Two-bit flip): When the values ​​of any two bits in the optimized global solution are different, a two-bit rotation gate is added between the corresponding two qubits.

[0142] Substring of the global solution after bit-by-bit alignment optimization The binary value;

[0143] like Then in the first A parameterized quantum circuit The first in The bit and the first Controlled two-bit gates that operate on each bit ;in, Indicates the action on bits and On a double-bit rotating gate;

[0144] Conversely, no operation is performed; among them This means that in a two-bit operation, the two bits must be in different positions.

[0145] That is, if the optimized global solution has any two bits with different values, a two-bit rotation gate operation is added between these two bits with different values. For example, suppose... If the second bit is 0 and the third bit is 1, then a two-bit rotation gate operation is applied between the second and third qubits; if the two bit values ​​are the same, then no action is taken.

[0146] Here, a new rotation angle parameter is added. and rotation angle parameters Quantum gates and controlled double-bit gate The parameters to be optimized in the original parameters Together they constitute the new first Parameters to be optimized for a parameterized quantum circuit ;

[0147] in, The definition of a door is:

[0148]

[0149] A schematic diagram of the quantum circuit can be found here. Figure 3 ,like Figure 3 As shown, firstly, in the quantum bit and quantum bits Hadamard gates are applied to each of the qubits. These gates transform the quantum state from the computational ground state to a superposition basis, allowing subsequent rotation operations to be performed under the equivalent X basis. After the basis transformation, the qubits... With quantum bits A set of controlled NOT gates (CNOT gates) is applied between the qubits. As control bits, quantum bits As controlled bits, two qubits are entangled using a CNOT gate operation. At this point, any phase rotation applied to one bit can be applied to the other bit through the entanglement, thus achieving bit-to-bit interaction. After the CNOT gate, further... Apply a parameterized Z-axis rotating gate to the top The rotation angle of the revolving door is These are the parameters to be optimized, used to control the degrees of freedom in the variable quantum circuit. By adjusting the phase of the qubits in this way, the strength of the interaction between the two qubits can be controlled. After completing the above rotation operation, another set of CNOT gates is applied to de-entangle the two qubits, restoring them to independent bit representations. Finally, in the qubit... and quantum bits A Hadamard gate is then applied again to restore the superposition basis back to the computational ground state. In this way, the entire circuit completes the controlled two-qubit rotation operation on the two qubits in the X basis.

[0150] S155: Optimize the adjustable parameters in the new parameterized quantum circuit to minimize the expected value of the global Hamiltonian and output the final global solution for determining the haplotype origin of each gene sequencing fragment.

[0151] Based on the new parameterized quantum circuit generated in the aforementioned embodiments, iterative adjustments are continuously performed on the adjustable parameters in the new quantum circuit to minimize the expected value of the global Hamiltonian. This continuously approaches the global optimal solution and finally outputs a global solution for determining the haplotype source of each sequencing fragment, which can improve the quality of the final solution.

[0152] C.1: The M new parameterized quantum circuits obtained in step S154 Replace the parameterized quantum circuit described in step S151, A.2, respectively. This allows the new parameter configuration to enter the next iteration.

[0153] C.2: Repeat steps A.3, A.4, A.5, A.6, A.7 in S151, B.1~B.3 in S152, S153~S154, and C.1~C.2 until the cut value no longer changes as described in step A.7.

[0154] C.3: Output the Maxcut solution to complete gene phasing: Convert the binary bit string obtained in step A.6 of the current iteration round. The process involves partitioning the data, specifically adding segments with a bit value of 0 to the set. , indicating that it comes from the parent set Fragments with a bit value of 1 are added to the set. , indicating that it comes from the father. .gather and set That is, the set of solutions to the Maxcut problem. In Represents gene fragments Derived from the parent, set In Represents gene fragments It originates from the maternal parent, thus completing the genetic phasing.

[0155] Please see Figure 4 , Figure 4 This paper illustrates a flowchart of a specific application embodiment of a gene phasing method based on DVQE, which includes:

[0156] S1: Begin.

[0157] S2: Transform gene phasing into a Maxcut problem.

[0158] The problem of grouping gene phase segments is abstracted into the maximum cut problem in graph theory, allowing complex combinatorial optimization objectives to be expressed in the form of a standard graph model, which facilitates processing using quantum optimization algorithms. After completion, proceed to step S5.

[0159] S3: Decompose the Hamiltonian of the Ising model.

[0160] The overall Ising Hamiltonian obtained by mapping the objective function is split into multiple independently operable sub-Hamiltonians according to the number of bits that the quantum processor can handle, so as to solve in parallel under limited hardware conditions. After completion, proceed to step S6.

[0161] S4: Initialize the quantum state.

[0162] Prepare initial qubit states (usually all-zero states) on the quantum processor to provide a unified starting point for subsequent parameterized quantum circuits, thereby ensuring the controllability and repeatability of the computation. After completion, proceed to step S4.

[0163] S5: Construct parameterized quantum circuits.

[0164] A quantum circuit with adjustable parameters is built on the quantum processor to realize the evolution of the Hamiltonian corresponding to the objective function. After completion, proceed to step S6.

[0165] S6: Measure the expected value of the Hamiltonian of the Ising model.

[0166] The quantum states obtained from the evolution of quantum circuits are measured on a quantum processor to obtain the expected value of each sub-Hamilton, and the expected value of the global Hamiltonian is calculated accordingly, which serves as an evaluation index of the quality of the current parameter configuration.

[0167] S7: Does the expected value converge?

[0168] Determine whether the expected value of the global Hamiltonian meets the convergence condition (e.g., the change between two adjacent iterations is less than a preset threshold, or the current number of iterations is greater than a preset maximum number). If not, proceed to step S8; if yes, proceed to step S9.

[0169] S8: Update parameters.

[0170] The adjustable parameters in the quantum circuit are updated using a classical optimizer, and the process returns to step S6 to continue iterating until the expected value of the global Hamiltonian satisfies the convergence condition.

[0171] S9: Perform a neighborhood search to obtain the optimal neighborhood solution (i.e., the optimized global solution).

[0172] Based on the converged solution obtained by quantum mechanics, a classical neighborhood search strategy is further adopted to detect changes in the solution by bit-by-bit flipping, thereby obtaining a potentially optimized global solution.

[0173] S10: Has the Cut value converged?

[0174] Determine whether the cut value after neighborhood search is stable or meets the set standard. If not, go to S11; if yes, go to S12.

[0175] S11: Add RXX quantum gates for quantum perturbation.

[0176] An RXX gate is introduced into the quantum circuit to introduce quantum perturbation, thereby increasing the diversity of the search space and helping the algorithm escape local optima. After the perturbation is complete, the algorithm returns to step S6 to continue optimization.

[0177] S12: Obtain the optimal solution from Maxcut.

[0178] The solution that ultimately satisfies the convergence condition is identified as the optimal solution to the maximum cut problem.

[0179] S13: Complete the method execution. The output optimal solution is used for gene phasing to determine the haplotype source of each sequencing fragment.

[0180] In practical applications, steps S2-S3 and S4-S5 can be executed in parallel. That is, while transforming gene phasing into a Maxcut problem, quantum states can be initialized and parameterized quantum circuits can be constructed. Furthermore, the specific execution order, optimization conditions, and parameter adjustment strategies can be flexibly adjusted according to application requirements, hardware architecture, and performance optimization goals. All equivalent substitutions or modifications should fall within the protection scope of this application.

[0181] To implement the gene phasing method based on DVQE in the embodiments of this application, the embodiments of this application also provide a gene phasing device based on DVQE, such as... Figure 5 As shown, the device includes:

[0182] The fragment mapping unit 501 is used to map the obtained gene sequencing fragments into nodes of an undirected graph, and to use the number of different bases at SNP sites between the gene sequencing fragments as the edge weights between the nodes.

[0183] Problem transformation unit 502 is used to transform the gene phase problem into a maximum cut problem of an undirected graph, and to construct an objective function based on the maximum cut problem of the undirected graph;

[0184] The objective function construction unit 503 is used to map the constructed objective function to the global Hamiltonian of the Ising model;

[0185] Hamiltonian decomposition unit 504 is used to decompose the global Hamiltonian into multiple sub-Hamiltonians based on the number of bits that the quantum processor can carry.

[0186] Parallel solving unit 505 is used to perform parallel solving of each sub-Hamiltonian using a distributed quantum variational eigenvalue solver (DVQE) to obtain the global solution.

[0187] Result determination unit 506 is used to determine the haplotype source of each sequencing fragment based on the global solution.

[0188] It should be noted that the gene phasing device based on DVQE provided in the above embodiments is only illustrated by the division of the above-described program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. Furthermore, the gene phasing device based on DVQE provided in the above embodiments and the gene phasing method embodiments based on DVQE belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0189] Based on the hardware implementation of the above program modules, and in order to implement the gene phasing method based on DVQE provided in the embodiments of this application, the embodiments of this application also provide a quantum computing device, such as... Figure 6 As shown, the quantum computing device 600 includes:

[0190] The communication interface 603 enables information exchange with other devices, such as network devices.

[0191] The processor 601 is connected to the communication interface 603 to enable information interaction with other devices. When running a computer program, it executes the gene phasing method based on DVQE provided by one or more of the above-mentioned technical solutions. The computer program is stored in the memory 602.

[0192] Processor 601 may include a classical processor and a quantum processing unit (QPU). The classical processor is responsible for tasks such as preprocessing of gene sequencing fragments, construction of undirected graphs, decomposition of the global Hamiltonian of the Ising model, iterative updates of the classical optimizer, and neighborhood search operations. The QPU, under the scheduling of the classical processor, executes the construction and operation of parameterized quantum circuits, measurement of the Hamiltonian expectation value, and solution of parallel sub-Hamiltons, and feeds back the quantum measurement results to the classical processor. The combination of the classical processor and the QPU enables the gene phasing method based on DVQE provided by one or more of the above technical solutions. Processor 601 can also be implemented using a standalone QPU, which independently implements the gene phasing method based on DVQE provided by one or more of the above technical solutions.

[0193] Of course, in practical applications, the various components in the quantum computing device 600 are coupled together via a bus system 604. It can be understood that the bus system 604 is used to achieve communication between these components. In addition to a data bus, the bus system 604 also includes a power bus, a control bus, a status signal bus, and a quantum control bus. The quantum control bus is used to send quantum gate operation commands to the QPU and read back measurement results. However, for clarity, in... Figure 6 The general designated all buses as Bus System 604.

[0194] The memory 602 in this embodiment is used to store various types of data to support the operation of the quantum computing device 600. Examples of such data include any computer program used to operate on the quantum computing device 600.

[0195] It is understood that memory 602 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 602 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0196] When the processor 601 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.

[0197] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 602 storing a computer program, which can be executed by a processor 601 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0198] This application also provides a computer program product storing a computer program / instruction, which, when executed by a processor, is used to implement the DVQE-based gene phasing method described in the first aspect or any specific implementation of the first aspect of this application.

[0199] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0200] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0201] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0202] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0203] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a quantum computing device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A gene phasing method based on DVQE, characterized in that, include: The obtained gene sequencing fragments are mapped to nodes of an undirected graph, and the number of differential bases at SNP sites between the gene sequencing fragments is used as the edge weight between the nodes. The gene phasing problem is transformed into a maximum cut problem of an undirected graph, and an objective function is constructed based on the maximum cut problem of the undirected graph. The constructed objective function is mapped to the global Hamiltonian of the Ising model; Based on the number of bits that a quantum processor can carry, the global Hamiltonian is decomposed into multiple sub-Hamiltonians; A distributed quantum variational eigenvalue solver (DVQE) is used to solve each sub-Hamiltonian in parallel to obtain the global solution. The haplotype origin of each sequencing fragment is determined based on the global solution; The number of bits that the quantum processor can carry decomposes the global Hamiltonian into multiple sub-Hamiltonians, satisfying the following expression: ; In the formula, This represents the global Hamiltonian corresponding to the objective function; This indicates summing over all sub-Hamiltonians; For the first The coefficients corresponding to each component; Represents Hamiltonian The One component; This represents the tensor product, an operator used to combine operators of multiple qubits into a single system. Represents Hamiltonian components The The Hamiltonian, of which , This represents the total number of sub-Hamiltonians, i.e., how many parts the original large Hamiltonian was divided into for processing; where each sub-Hamiltonian... Only applies to One quantum bit, Indicates the total number of sub-bits; This represents the number of qubits acted upon by each sub-Hamiltonian; The method employs a distributed quantum variational eigenvalue solver (DVQE) to perform parallel solutions on each sub-Hamiltonian, obtaining a global solution, including: Assign a quantum processor to each sub-Hamiltonian and build a parameterized quantum circuit on each quantum processor. Obtain the initial global solution by optimizing the quantum circuit parameters to minimize the expected value of the global Hamiltonian. The obtained global solution is subjected to a neighborhood search algorithm to flip bit by bit, and the change in the cut value after each bit flip is determined. The solution that maximizes the cut value is selected as the optimized global solution.

2. The method according to claim 1, characterized in that, The construction of the objective function based on the maximum cut problem of the undirected graph includes: Assign binary decision variables to the gene sequencing fragments. as well as ;in Indicates the source of the first haplotype. Indicates the source of the second haplotype. Indicates the source of the first haplotype. Indicates the source of the second haplotype; Based on the assigned binary decision variables and the edge weights between the nodes, construct the objective function corresponding to the maximum cut problem of the undirected graph; The objective function is expressed as follows: ; In the formula, This represents the set of binary decision variables corresponding to all nodes in an undirected graph; Represents a node and nodes The edges connecting them; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. Perform the traversal and accumulate the edge weights of each edge; Represents a node binary decision variables; Represents a node binary decision variables; The edge weight represents the number of differential bases at SNP sites between the two gene sequencing fragments.

3. The method according to claim 2, characterized in that, The constructed objective function is mapped to the global Hamiltonian of the Ising model, including: The binary decision variables in the objective function are mapped onto a preset Pauli matrix Z to obtain the global Hamiltonian corresponding to the objective function; The global Hamiltonian is represented as: ; In the formula, This represents the global Hamiltonian corresponding to the objective function; Let be the edge set of the graph; The summation symbol represents summation over all edges in the graph. The edge weights are accumulated; For the edge The weights; For the first Pauli qubits Operators; For the first Pauli qubits Operators.

4. The method according to claim 1, characterized in that, After performing bit-by-bit flipping on the obtained global solution using a neighborhood search algorithm, determining the cut value change after each bit flip, and selecting the solution that maximizes the cut value as the optimized global solution, the method further includes: The optimized global solution is divided into multiple substrings; For each substring, based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, a single-bit rotation gate or a two-bit rotation gate is applied to the parameterized quantum circuit corresponding to the substring to generate a new parameterized quantum circuit based on the original parameterized quantum circuit. The adjustable parameters in the new parameterized quantum circuit are optimized to minimize the expected value of the global Hamiltonian and output the final global solution for determining the haplotype origin of each gene sequencing fragment.

5. The method according to claim 4, characterized in that, For each substring, based on the difference in binary values ​​between the bits in each substring and the corresponding bits in the initial global solution, a single-bit rotation gate or a two-bit rotation gate is applied to the parameterized quantum circuit corresponding to the substring, including: Compare the values ​​of bits in the substring bit by bit with the corresponding values ​​of bits in the initial global solution; When the value of a bit in a substring is different from the value of the corresponding bit in the initial global solution, a single-bit rotation gate is added to the quantum bit corresponding to that bit. When any two bits in the optimized global solution have different values, a two-bit rotation gate is added between the corresponding two qubits.

6. A gene phasing device based on DVQE, characterized in that, include: The fragment mapping unit is used to map the obtained gene sequencing fragments into nodes of an undirected graph, and uses the number of different bases at SNP sites between the gene sequencing fragments as the edge weights between the nodes. The problem transformation unit is used to transform the gene phase problem into a maximum cut problem of an undirected graph, and to construct an objective function based on the maximum cut problem of the undirected graph. The objective function construction unit is used to map the constructed objective function to the global Hamiltonian of the Ising model; The Hamiltonian decomposition unit is used to decompose the global Hamiltonian into multiple sub-Hamiltonians based on the number of bits that the quantum processor can support; the decomposition of the global Hamiltonian into multiple sub-Hamiltonians based on the number of bits that the quantum processor can support satisfies the following expression: ; In the formula, This represents the global Hamiltonian corresponding to the objective function; This indicates summing over all sub-Hamiltonians; For the first The coefficients corresponding to each component; Represents Hamiltonian The One component; This represents the tensor product, an operator used to combine operators of multiple qubits into a single system. Represents Hamiltonian components The The Hamiltonian, of which , This represents the total number of sub-Hamiltonians, i.e., how many parts the original large Hamiltonian was divided into for processing; where each sub-Hamiltonian... Only applies to One quantum bit, Indicates the total number of sub-bits; This represents the number of qubits acted upon by each sub-Hamiltonian; Parallel solution unit is used to perform parallel solution of each sub-Hamiltonian using a distributed quantum variational eigenvalue solver (DVQE) to obtain the global solution; The parallel solution unit is also used to allocate a quantum processor to each sub-Hamiltonian and construct a parameterized quantum circuit on each quantum processor. By optimizing the quantum circuit parameters to minimize the expected value of the global Hamiltonian, an initial global solution is obtained. The obtained global solution is then subjected to a neighborhood search algorithm to flip bit by bit to determine the change in the cut value after each bit flip, so as to select the solution that maximizes the cut value as the optimized global solution. The result determination unit is used to determine the haplotype origin of each sequencing fragment based on the global solution.

7. A quantum computing device, characterized in that, include: Processor, memory, and communication interface; The memory is either a short-term storage memory or a persistent storage memory; The processor is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Genome assembling method, genome assembling device, storage medium and equipment

    CN117457067A

  • Quantum information processing method for open quantum system, classic computer, quantum computer, quantum information processing program, and data structure

    JP2020201566A