Hardware implementation method suitable for matrix maximum eigenvalue estimation and related device

The hardware structure designed using the quantum power iteration method, with the help of quantum phase estimation circuits and controlled rotation, solves the efficiency bottleneck of traditional processors in matrix maximum eigenvalue estimation, and achieves more efficient matrix operations and electrocardiogram diagnosis.

CN123140276APending Publication Date: 2026-11-20ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511019051.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing technologies, the algorithm speed and efficiency improvement of matrix maximum eigenvalue estimation in the computer field are limited, and traditional processor solutions suffer from communication bottlenecks and insufficient flexibility in register file design.

Method used

A hardware structure suitable for estimating the maximum eigenvalue of a matrix is ​​designed using the quantum power iteration method. By utilizing the superposition and entanglement properties of quantum computing through a quantum phase estimation circuit and controlled rotation, the hardware estimation of the maximum eigenvalue of the matrix is ​​realized.

Benefits of technology

It improves the speed and effectiveness of matrix maximum eigenvalue estimation, enhances the efficiency of matrix operations, and is applicable to the processing of multi-lead electrocardiograms and the assessment of heart health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140276A_ABST
    Figure CN123140276A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a hardware implementation method suitable for matrix maximum eigenvalue estimation and related devices, the method prepares an initial quantum state to a data register according to an eigen vector of a matrix to be estimated maximum eigenvalue; a phase estimation algorithm is executed on the initial quantum state in the data register through a quantum phase estimation circuit, so that the eigenvalue of the matrix is extracted to a phase register; then the controlled rotation is executed on the auxiliary quantum bits through the quantum state corresponding to the eigenvalue in the phase register, so that the quantum state of the approximate eigen vector of the maximum eigenvalue of the matrix is obtained; finally, the maximum eigenvalue of the matrix is estimated according to the matrix and the quantum state of the approximate eigen vector. A quantum circuit specially used for matrix maximum eigenvalue estimation is designed based on the quantum power iteration method, the matrix maximum eigenvalue estimation is realized through hardware, the superposition and entanglement of quantum computation can be effectively utilized, and the speed and effect of the matrix maximum eigenvalue estimation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a hardware implementation method and related apparatus for estimating the maximum eigenvalue of a matrix. Background Technology

[0002] In the current field of computer science, with the maturity of emerging technologies such as big data and machine learning, an increasing number of tasks involve various matrix operations, especially the estimation of the maximum eigenvalue of a matrix, which is widely used for feature extraction and representation of data. Therefore, it has become a bottleneck for improving algorithm speed and performance. In existing technologies, general-purpose processor solutions rely on scalar computation, resulting in low efficiency in matrix operations. When using multi-core parallelism, the improvement is limited with a small number of processors, while performance is severely constrained by communication bottlenecks with a large number. While graphics processing units (GPUs) utilize SIMD parallelism, their on-chip cache is too small, requiring frequent access to off-chip data when processing large-scale matrices, making off-chip bandwidth a major bottleneck. Dedicated matrix operation devices use custom hardware, but their limited flexibility in register file design makes it difficult to efficiently support addition and subtraction operations on matrices of different sizes.

[0003] In recent years, there have been some research efforts addressing the technical problems existing in current technologies. Examples include the patent published by Pengcheng Laboratory (CN117370722A) entitled "Processing Method and Related Equipment for Matrix Multiplication Operations in Parallel Computing Hardware"; the patent published by Cambricon Technologies Corporation (CN111857820B) entitled "A Device and Method for Performing Matrix Addition / Subtraction Operations"; and the patent published by Hefei University of Technology (CN114417249B) entitled "A Hardware Structure Implementation Method for Fast Inversion of Multi-Order Matrices". However, these methods are all modifications to traditional processors, resulting in limited improvements in algorithm speed and performance. Summary of the Invention

[0004] This application provides a hardware implementation method and related apparatus for estimating the maximum eigenvalue of a matrix. The hardware structure is designed based on the quantum power iteration method to achieve the estimation of the maximum eigenvalue of a matrix.

[0005] The first aspect of this application provides a hardware implementation method suitable for estimating the maximum eigenvalue of a matrix, including:

[0006] The initial quantum state is prepared into the data register based on the eigenvectors of the matrix whose largest eigenvalue is to be estimated;

[0007] A phase estimation algorithm is performed on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register.

[0008] By controlling the quantum state corresponding to the eigenvalue in the phase register to perform multiple controlled rotations of the auxiliary qubit, the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix is ​​obtained;

[0009] Estimate the maximum eigenvalue of the matrix based on the quantum state of the matrix and the approximate eigenvector.

[0010] Optionally, after performing a phase estimation algorithm on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register, the method further includes:

[0011] The quantum state stored in the phase register is cleared by the inverse circuit of the quantum phase estimation circuit.

[0012] Optionally, the rotation angle controlled for each qubit in the phase register is equal to the reciprocal of the cosine function of the target value, where the target value is equal to the k-th power of the value represented by the quantum state of each qubit, and k is the number of controlled rotations.

[0013] Optionally, the step of controlling the auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix includes:

[0014] R, which is controlled by the quantum state corresponding to the eigenvalue in the phase register. y The process is applied to an auxiliary qubit, causing the quantum state in the auxiliary qubit to rotate multiple times around the Y-axis, thereby obtaining the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix, wherein R... y The rotation angle is equal to twice the rotation angle controlled by each quantum bit in the phase register.

[0015] Optionally, estimating the maximum eigenvalue of the matrix based on the quantum states of the matrix and the approximate eigenvector includes:

[0016] The controlled unitary gate in the Hadamard Test circuit is determined based on the matrix, and the maximum eigenvalue of the matrix is ​​estimated based on the Hadamard Test circuit after determining the controlled unitary gate, wherein the input of the Hadamard Test circuit includes the quantum state of the approximate eigenvector.

[0017] The second aspect of this application provides a method for processing multi-lead electrocardiograms, including:

[0018] Acquire multi-lead electrocardiograms of the target heart and convert the multi-lead electrocardiograms into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times;

[0019] The maximum eigenvalue of the matrix is ​​estimated according to the hardware implementation method for estimating the maximum eigenvalue of a matrix as described in the first aspect;

[0020] The target heart is identified based on the maximum eigenvalue, and the eigenvalue is used to help determine the health status of the target heart.

[0021] A third aspect of this application provides a hardware implementation apparatus suitable for estimating the maximum eigenvalue of a matrix, comprising:

[0022] The initial state preparation unit is used to prepare the initial quantum state into the data register based on the eigenvectors of the matrix whose maximum eigenvalue is to be estimated;

[0023] An eigenvalue extraction unit is used to perform a phase estimation algorithm on the initial quantum state in the data register through a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register;

[0024] A controlled rotation unit is used to control an auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register, so as to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix;

[0025] An eigenvalue estimation unit is used to estimate the maximum eigenvalue of the matrix based on the matrix and the quantum state of the approximate eigenvector.

[0026] A fourth aspect of this application provides a multi-lead electrocardiogram processing device, comprising:

[0027] The information acquisition unit is used to acquire multi-lead electrocardiograms of the target heart and convert the multi-lead electrocardiograms into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times;

[0028] An eigenvalue estimation unit is used to estimate the maximum eigenvalue of the matrix according to a hardware implementation method suitable for matrix maximum eigenvalue estimation;

[0029] A pattern recognition unit is used to identify the feature pattern of the target heart based on the maximum feature value, and the feature pattern is used to assist in determining the health status of the target heart.

[0030] A fifth aspect of this application provides an electronic device, including: a processor and a memory;

[0031] The processor is connected to a memory, wherein the memory is used to store computer programs and the processor is used to invoke the computer programs to execute the methods as described in the first or second aspect of the embodiments of this application.

[0032] The fifth aspect of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform the method as described in the first or second aspect of this application.

[0033] The hardware implementation method for estimating the maximum eigenvalue of a matrix provided in this application prepares an initial quantum state in a data register based on the eigenvectors of the matrix whose maximum eigenvalue is to be estimated. A phase estimation algorithm is then executed on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into a phase register. Next, the quantum states corresponding to the eigenvalues ​​in the phase register control the auxiliary qubits to perform multiple controlled rotations, obtaining the quantum state of the approximate eigenvector of the maximum eigenvalue of the matrix. Finally, the maximum eigenvalue of the matrix is ​​estimated based on the quantum states of the matrix and its approximate eigenvectors. It can be seen that the embodiments of this application design a quantum circuit specifically for estimating the maximum eigenvalue of a matrix based on the quantum power iteration method, and implement the estimation of the maximum eigenvalue of a matrix in hardware. This effectively utilizes the superposition and entanglement properties of quantum computing to improve the speed and efficiency of the estimation of the maximum eigenvalue of a matrix. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A flowchart illustrating a hardware implementation method for estimating the maximum eigenvalue of a matrix provided in one embodiment of this application is shown.

[0036] Figure 2 This invention provides a schematic diagram of the structure of a quantum circuit suitable for matrix maximum eigenvalue estimation according to an embodiment of the present application.

[0037] Figure 3 A flowchart illustrating a multi-lead electrocardiogram processing method according to an embodiment of this application is shown;

[0038] Figure 4 This illustration shows a schematic diagram of a hardware implementation apparatus for estimating the maximum eigenvalue of a matrix according to an embodiment of this application;

[0039] Figure 5 This invention provides a schematic diagram of the structure of a multi-lead electrocardiogram processing device according to an embodiment of the present application.

[0040] Figure 6A schematic diagram of the structure of a computer device provided in one embodiment of this application is shown. Detailed Implementation

[0041] 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 of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0042] Classical computers use transistors to encode information in binary data, such as bits, where each bit can represent a value of 1 or 0. These 1s and 0s act as switches to drive the functions of a classical computer. If there are n bits of data, there are 2^n possible classical states, and one state is represented at a time.

[0043] Quantum computers use quantum processors that operate on data represented by qubits, also known as quantum bits. A single qubit can represent the classical binary states "0" or "1", or a superposition of "0" and "1". Because it can represent a superposition of "0" and "1", a qubit can represent both "0" and "1" states simultaneously. For example, if there are n bits of data, then 2^n qubits can represent n bits of data. n A quantum state can be represented simultaneously. Furthermore, qubits in a superposition can be correlated with each other, a phenomenon known as entanglement, where the state of one qubit (whether 1, 0, or both) depends on the state of another qubit, and more information can be encoded within two entangled qubits. Based on the principles of superposition and entanglement, qubits enable quantum computers to perform functions that might be relatively complex and time-consuming for classical computers.

[0044] Given a sparse Hermitian matrix of size n×n, and whose eigenvalues ​​are bounded:

[0045] 0 < |λ1| ≤ |λ2| ≤ … ≤ |λ n |<1

[0046] Estimate its largest eigenvalue λ n Even if the eigenvalues ​​of a matrix are not within this range, the absolute value range of all matrix eigenvalues ​​can be reduced to (0,1) through simple scaling.

[0047] The classic power iteration method mainly includes the following steps:

[0048] First, initialize a random vector x0∈C. n ;

[0049] The matrix process is iterated k times to form the following sequence:

[0050]

[0051] calculating an approximate maximum eigenvalue

[0052]

[0053] where (·) denotes the inner product, and * denotes the complex conjugate. Since matrix A is a Hermitian matrix, its eigenvalues are always real numbers. The following lemma shows that x k can be used to approximate the eigenvalue λ n to obtain the approximate eigenvector E n .

[0054] Lemma 1: Let x k be defined as above, and assume that its maximum absolute eigenvalue λ n is unique, that is, for all 1<i<n, |λ i |<|λ n |. Then we have x k ≈α·E n , where α is a number dependent on the number of iterations k.

[0055] Proof: Since A is a Hermitian matrix, its eigenvectors can be orthonormalized even in the presence of degeneracy (multiple roots). They can be selected as a set of bases for A. Therefore, the initial random vector x0 can be expressed as:

[0056] x0=c1E1+c2E2+…+c n E n .#(3)

[0057] After the first iteration, we have:

[0058] x1=Ax0

[0059] =A(c1E1+c2E2+…+c n E n )

[0060] =c1λ1E1+c2λ2E2+…+c n λ n E n .#(4)

[0061] Similarly, after k iterations, we can obtain:

[0062]

[0063] We assume that the absolute value of the maximum eigenvalue is non-degenerate (non-multiple root), that is, 0≤|λ1|≤|λ2|≤…<|λ n |, and we have

[0064] When k→∞.#(6)

[0065] Therefore, when k is large enough, we have:

[0066]

[0067] The proof is complete.

[0068] From here, we can see the coefficient factors in Lemma 1. Because x k =α·E n Ax k ≈λ n x k We have

[0069]

[0070] so

[0071]

[0072] According to the classical power iteration method described above, the maximum eigenvalue can be approximated as:

[0073]

[0074] in, It is x k The square norm, i.e., |x| k | 2 Furthermore, we have It corresponds exactly to x k Normalized quantum states, therefore Can be rewritten as

[0075]

[0076] Now, based on the above information, estimate the largest eigenvalue of the matrix.

[0077] Lemma 2: Given an n×n sparse Hermitian matrix A, there exists a unitary operation U A Given an initial state |0>|x0>, the following transformations can be performed:

[0078]

[0079] in, Let A|x0> be an approximation; C is a normalization constant. For example, Cλ max ≤1, λ max The largest eigenvalue of A. Unitary operation U A The time complexity is

[0080] In the following work, some notation is simplified as follows: a|x0> is used to denote the approximate version, and it is assumed that the error caused by truncation is implicit, i.e., A|x0> is the value in Lemma 2. Furthermore, assuming the initial eigenvalue range of the matrix is ​​(0,1), the constant C can be set to 1. If the eigenvalue range is arbitrary, we can rescale the matrix as described above, or introduce an approximation. The factor C. This will not affect the overall runtime, as it will be absorbed by the condition number κ. For simplicity, we will set C = 1 throughout the discussion.

[0081] Based on the derivation of the quantum power method described above, this application provides a hardware implementation method and related apparatus suitable for estimating the maximum eigenvalue of a matrix. In its embodiment, an initial quantum state is prepared in a data register based on the eigenvector of the matrix whose maximum eigenvalue is to be estimated. A phase estimation algorithm is then executed on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalue of the matrix into a phase register. Then, the quantum states corresponding to the eigenvalues ​​in the phase register control the auxiliary qubits to perform multiple controlled rotations, obtaining the quantum state of the approximate eigenvector of the maximum eigenvalue of the matrix. Finally, the maximum eigenvalue of the matrix is ​​estimated based on the quantum states of the matrix and its approximate eigenvector. This invention designs a quantum circuit specifically for estimating the maximum eigenvalue of a matrix based on the quantum power iteration method, and implements the estimation of the maximum eigenvalue of a matrix in hardware. It can effectively utilize the superposition and entanglement properties of quantum computing to improve the speed and efficiency of the estimation of the maximum eigenvalue of a matrix.

[0082] Please refer to Figure 1 This illustration shows a flowchart of a hardware implementation method for estimating the maximum eigenvalue of a matrix, provided in one embodiment of this application. The method can be applied to a computer device, which refers to an electronic device capable of data computation and processing. The method may include the following steps:

[0083] Step 101: Prepare the initial quantum state into the data register based on the eigenvectors of the matrix whose maximum eigenvalue is to be estimated.

[0084] For example, the initial quantum state is |x0>, the matrix whose largest eigenvalue is to be estimated is A, and the eigenvectors of matrix A are |u>. i >, then we can find the eigenvectors of A, |x0>, in |u i Expand as The quantum state currently stored in the data register is To satisfy A|u i >=λ i |u i>, where N is the number of eigenvalues.

[0085] Step 102: Perform a phase estimation algorithm on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register.

[0086] Quantum phase estimation (QPE) is one of the core algorithms in quantum computing, used to accurately estimate the phase corresponding to the eigenvalues ​​of unitary operators (such as quantum gates). Its core idea is to transform phase information into a measurable quantum state through quantum parallelism and inverse quantum Fourier transform.

[0087] For example, the initial quantum state in the data register is determined by a quantum phase estimation circuit. By executing the phase estimation algorithm, the quantum state can be obtained. Thus, the eigenvalue λ was realized. i Extraction of λ i The corresponding quantum state |λ i Stored in the phase register.

[0088] Step 103: Control the auxiliary qubit to perform multiple controlled rotations by controlling the quantum state corresponding to the eigenvalue in the phase register, and obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix.

[0089] For example, a new auxiliary bit is added, with an initial quantum state of |0>, and based on the quantum state |λ of the phase register... i Control its rotation so that:

[0090]

[0091] Right now

[0092]

[0093] The overall system state becomes:

[0094]

[0095] Where k is the number of rotations.

[0096] Specifically, the rotation angle controlled by each qubit in the phase register is equal to the reciprocal of the cosine function with the target value as the independent variable. The target value is equal to the k-th power of the value represented by the quantum state of each qubit, where k is the number of controlled rotations, i.e., the rotation angle controlled by each qubit in the phase register.

[0097] More specifically, the step of controlling the auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix includes:

[0098] R, which is controlled by the quantum state corresponding to the eigenvalue in the phase register. y The process is applied to an auxiliary qubit, causing the quantum state in the auxiliary qubit to rotate multiple times around the Y-axis, thereby obtaining the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix, wherein R... y The rotation angle is equal to twice the rotation angle controlled by each quantum bit in the phase register.

[0099] Right now

[0100]

[0101] achievable

[0102]

[0103] Furthermore, after performing a phase estimation algorithm on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register, the method further includes:

[0104] The quantum state stored in the phase register is cleared by the inverse circuit of the quantum phase estimation circuit.

[0105] Exemplary

[0106]

[0107] in

[0108] The logic gates in the quantum phase estimation circuit are inversely transformed to restore the quantum state stored in the phase register to the initial quantum state |0>, so that other algorithms can call the phase register in a later time, thus saving quantum hardware.

[0109] Step 104: Estimate the maximum eigenvalue of the matrix based on the quantum state of the matrix and the approximate eigenvector.

[0110] For example, the quantum state |x| that approximates the eigenvector is obtained. k The sum of the sums can be used to estimate the largest eigenvalue of a matrix through its sum matrix A.

[0111] Specifically, estimating the maximum eigenvalue of the matrix based on the quantum states of the matrix and the approximate eigenvector includes:

[0112] The controlled unitary gate in the Hadamard Test circuit is determined based on the matrix, and the maximum eigenvalue of the matrix is ​​estimated based on the Hadamard Test circuit after determining the controlled unitary gate, wherein the input of the Hadamard Test circuit includes the quantum state of the approximate eigenvector.

[0113] For example, it can be derived from |0>|0>|0>|x k The desired result is obtained, and a Hadamard gate is applied to the first register. Then, the unitary gate U corresponding to matrix A is applied according to the first qubit. A ,get

[0114]

[0115] Applying a Hadamard gate to the first register, measuring the first qubit in the |+ / ->(Pauli-X) basis yields the superimposed real part, i.e. <x k |A|x k >. Where, |G1> is the value divided by |0>|0>|0>|x k >+|1>|0>|0>|A|x k Garbage states that are not of concern. (See reference) Figure 2 , Figure 2 A schematic diagram of the structure of a quantum circuit for estimating the maximum eigenvalue of a matrix is ​​shown in one embodiment of this application.

[0116] As can be seen, the hardware implementation method for estimating the maximum eigenvalue of a matrix provided in this application prepares an initial quantum state in a data register based on the eigenvector of the matrix whose maximum eigenvalue is to be estimated; a phase estimation algorithm is executed on the initial quantum state in the data register through a quantum phase estimation circuit to extract the eigenvalue of the matrix into a phase register; then, the quantum state corresponding to the eigenvalue in the phase register controls the auxiliary qubit to perform multiple controlled rotations to obtain the quantum state of the approximate eigenvector of the maximum eigenvalue of the matrix; finally, the maximum eigenvalue of the matrix is ​​estimated based on the quantum state of the matrix and its approximate eigenvector. This application's embodiment designs a quantum circuit specifically for estimating the maximum eigenvalue of a matrix based on the quantum power iteration method, and implements the estimation of the maximum eigenvalue of a matrix in hardware. It can effectively utilize the superposition and entanglement properties of quantum computing to improve the speed and effectiveness of estimating the maximum eigenvalue of a matrix.

[0117] Please refer to Figure 3 This illustration shows a flowchart of a multi-lead electrocardiogram processing method according to an embodiment of this application. The method can be applied to computer devices, which refer to electronic devices with data computing and processing capabilities. The method may include the following steps:

[0118] Step 301: Acquire a multi-lead electrocardiogram of the target heart and convert the multi-lead electrocardiogram into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times;

[0119] Step 302: Estimate the maximum eigenvalue of the matrix according to a hardware implementation method suitable for matrix maximum eigenvalue estimation;

[0120] Step 303: Identify the feature pattern of the target heart based on the maximum feature value, the feature pattern being used to assist in determining the health status of the target heart.

[0121] Multilead electrocardiography (ECG) is a technique that records the projection of cardiac electrical activity in different spatial directions using a combination of multiple electrodes. The standard clinical practice uses a 12-lead system, including 6 limb leads and 6 chest leads, which can comprehensively assess the cardiac electrophysiological state and is a core tool for diagnosing diseases such as arrhythmias, myocardial ischemia / infarction.

[0122] Specifically, the overall electrical activity intensity of the heart can be determined based on the maximum eigenvalue, which is used to assess the strength of myocardial contractility; the weight distribution of each lead can be determined based on the eigenvector corresponding to the maximum eigenvalue, which is used to locate abnormal excitation conduction pathways; and the principal component contribution rate can be determined based on the proportion of the maximum eigenvalue in the sum of all eigenvalues, which is used to determine cardiac rhythm stability. The strength of myocardial contractility, abnormal excitation conduction pathways, and principal component contribution rate are indicators for assessing the health of the heart.

[0123] As can be seen, the embodiments of this application will Figure 1 The hardware implementation method for matrix maximum eigenvalue estimation in the embodiment is used for electrocardiogram diagnosis, thereby improving the efficiency of assessing heart health.

[0124] Figure 4 A schematic diagram of a hardware implementation apparatus for estimating the maximum eigenvalue of a matrix, according to an embodiment of this application, is shown. The apparatus includes:

[0125] The initial state preparation unit 401 is used to prepare the initial quantum state into the data register based on the eigenvectors of the matrix whose maximum eigenvalue is to be estimated;

[0126] The eigenvalue extraction unit 402 is used to perform a phase estimation algorithm on the initial quantum state in the data register through a quantum phase estimation circuit, so as to extract the eigenvalues ​​of the matrix into the phase register;

[0127] The controlled rotation unit 403 is used to control the auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register, so as to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix.

[0128] Eigenvalue estimation unit 404 is used to estimate the maximum eigenvalue of the matrix based on the quantum state of the matrix and the approximate eigenvector.

[0129] Figure 5 A schematic diagram of a multi-lead electrocardiogram processing device according to an embodiment of this application is shown. The device includes:

[0130] The information acquisition unit 501 is used to acquire a multi-lead electrocardiogram of the target heart and convert the multi-lead electrocardiogram into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times.

[0131] Eigenvalue estimation unit 502 is used to estimate the maximum eigenvalue of the matrix according to a hardware implementation method suitable for matrix maximum eigenvalue estimation;

[0132] The pattern recognition unit 503 is used to identify the feature pattern of the target heart based on the maximum feature value, and the feature pattern is used to assist in determining the health status of the target heart.

[0133] Figure 6 The diagram illustrates the structure of a computer device according to an embodiment of this application, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the functions of the computer system of the hardware implementation method for matrix maximum eigenvalue estimation or the multi-lead electrocardiogram processing method in any of the above embodiments.

[0134] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, causes the computer to perform the functions of a computer system applicable to the hardware implementation method for matrix maximum eigenvalue estimation or the multi-lead electrocardiogram processing method in any of the above embodiments.

[0135] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the functions of a computer system applicable to a hardware implementation method for matrix maximum eigenvalue estimation or a multi-lead electrocardiogram processing method in any of the above embodiments.

[0136] It is understood that the specific examples in this application are only intended to help those skilled in the art better understand the implementation methods of this application, and are not intended to limit the scope of the invention.

[0137] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this application in any way.

[0138] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and the implementation methods in this application are not limited in this respect.

[0139] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0140] It is understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0141] It is understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0142] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] 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 aforementioned method implementations, and will not be repeated here.

[0144] 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 mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0145] 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, depending on actual needs.

[0146] In addition, 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.

[0147] If a function 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 part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of 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.

[0148] The above are merely specific embodiments of this application, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A hardware implementation method suitable for estimating the maximum eigenvalue of a matrix, characterized in that, include: The initial quantum state is prepared into the data register based on the eigenvectors of the matrix whose largest eigenvalue is to be estimated; A phase estimation algorithm is performed on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register. By controlling the quantum state corresponding to the eigenvalue in the phase register to perform multiple controlled rotations of the auxiliary qubit, the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix is ​​obtained; Estimate the maximum eigenvalue of the matrix based on the quantum state of the matrix and the approximate eigenvector.

2. The method according to claim 1, characterized in that, After performing a phase estimation algorithm on the initial quantum state in the data register using a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register, the method further includes: The quantum state stored in the phase register is cleared by the inverse circuit of the quantum phase estimation circuit.

3. The method according to claim 1, characterized in that, The rotation angle controlled by each qubit in the phase register is equal to the reciprocal of the cosine function of the target value, where the target value is equal to the k-th power of the value represented by the quantum state of each qubit, and k is the number of controlled rotations.

4. The method according to claim 3, characterized in that, The process of controlling the auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix includes: R, which is controlled by the quantum state corresponding to the eigenvalue in the phase register. y The process is applied to an auxiliary qubit, causing the quantum state in the auxiliary qubit to rotate multiple times around the Y-axis, thereby obtaining the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix, wherein R... y The rotation angle is equal to twice the rotation angle controlled by each quantum bit in the phase register.

5. The method according to claim 1, characterized in that, The step of estimating the maximum eigenvalue of the matrix based on the quantum state of the matrix and the approximate eigenvector includes: The controlled unitary gate in the Hadamard Test circuit is determined based on the matrix, and the maximum eigenvalue of the matrix is ​​estimated based on the Hadamard Test circuit after determining the controlled unitary gate, wherein the input of the Hadamard Test circuit includes the quantum state of the approximate eigenvector.

6. A method for processing multi-lead electrocardiograms, characterized in that, include: Acquire multi-lead electrocardiograms of the target heart and convert the multi-lead electrocardiograms into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times; The hardware implementation method for estimating the maximum eigenvalue of a matrix according to any one of claims 1-5 estimates the maximum eigenvalue of the matrix; The target heart is identified based on the maximum eigenvalue, and the eigenvalue is used to help determine the health status of the target heart.

7. A hardware implementation device suitable for estimating the maximum eigenvalue of a matrix, characterized in that, include: The initial state preparation unit is used to prepare the initial quantum state into the data register based on the eigenvectors of the matrix whose maximum eigenvalue is to be estimated; An eigenvalue extraction unit is used to perform a phase estimation algorithm on the initial quantum state in the data register through a quantum phase estimation circuit to extract the eigenvalues ​​of the matrix into the phase register; A controlled rotation unit is used to control an auxiliary qubit to perform multiple controlled rotations through the quantum state corresponding to the eigenvalue in the phase register, so as to obtain the quantum state of the approximate eigenvector of the largest eigenvalue of the matrix; An eigenvalue estimation unit is used to estimate the maximum eigenvalue of the matrix based on the matrix and the quantum state of the approximate eigenvector.

8. A multi-lead electrocardiogram processing device, characterized in that, include: The information acquisition unit is used to acquire multi-lead electrocardiograms of the target heart and convert the multi-lead electrocardiograms into a matrix, wherein the elements in the matrix represent the voltage values ​​corresponding to different leads at different times; An eigenvalue estimation unit is used to estimate the maximum eigenvalue of the matrix according to a hardware implementation method suitable for matrix maximum eigenvalue estimation; A pattern recognition unit is used to identify the feature pattern of the target heart based on the maximum feature value, and the feature pattern is used to assist in determining the health status of the target heart.

9. An electronic device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to perform the method as described in claims 1-5 or 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, perform the method as described in claims 1-5 or 6.

Citation Information

Patent Citations

  • A device and method for performing matrix addition / subtraction operations

    CN111857820B

  • Processing method for matrix multiplication in parallel computing hardware and related equipment

    CN117370722A