CN114820182B - Quantum searching method and device for coordination pairs in financial transaction data - Google Patents

Quantum searching method and device for coordination pairs in financial transaction data Download PDF

Info

Publication number
CN114820182B
CN114820182B CN202110125874.XA CN202110125874A CN114820182B CN 114820182 B CN114820182 B CN 114820182B CN 202110125874 A CN202110125874 A CN 202110125874A CN 114820182 B CN114820182 B CN 114820182B
Authority
CN
China
Prior art keywords
transaction data
quantum
characteristic value
condition number
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110125874.XA
Other languages
Chinese (zh)
Other versions
CN114820182A (en
Inventor
李叶
刘焱
袁野为
窦猛汉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Benyuan Quantum Computing Technology Hefei Co ltd
Original Assignee
Benyuan Quantum Computing Technology Hefei Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Benyuan Quantum Computing Technology Hefei Co ltd filed Critical Benyuan Quantum Computing Technology Hefei Co ltd
Priority to CN202110125874.XA priority Critical patent/CN114820182B/en
Publication of CN114820182A publication Critical patent/CN114820182A/en
Application granted granted Critical
Publication of CN114820182B publication Critical patent/CN114820182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Complex Calculations (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)

Abstract

The invention discloses a quantum searching method and a quantum searching device for a coordination pair in financial transaction data, wherein the method comprises the following steps: obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing hermitian matrix corresponding to the transaction data matrix; preparing a characteristic value quantum state carrying characteristic value information of the hermitian matrix according to the quantum state of the hermitian matrix; estimating the characteristic value quantum state, and calculating the condition number of the hermitian matrix according to the estimated characteristic value; searching a coordination pair in the transaction data matrix according to the condition number; wherein, the cooperative pair is financial transaction data with cooperative relationship. By utilizing the embodiment of the invention, the application of the quantum algorithm in the field of financial transaction can be realized, and the coordination pair with coordination relation in the financial transaction data can be searched to meet the requirement of high-frequency transaction and fill the blank of related technology.

Description

Quantum searching method and device for coordination pairs in financial transaction data
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a quantum searching method and device for a cooperative pair in financial transaction data.
Background
The quantum computer is a kind of physical device which performs high-speed mathematical and logical operation, stores and processes quantum information according to the law of quantum mechanics. When a device processes and calculates quantum information and operates on a quantum algorithm, the device is a quantum computer. Quantum computers are a key technology under investigation because of their ability to handle mathematical problems more efficiently than ordinary computers, for example, to accelerate the time to crack RSA keys from hundreds of years to hours.
The current application of quantum computing financial scenarios is mainly focused on quantum monte carlo simulation solution of derivative pricing problems, quantum non-strained binary optimization (QUBO) optimized stock combination, quantum Machine Learning (QML) for risk assessment, and so on. While statistical arbitrage is a fairly important and active area in the financial market, there is little attention currently paid to algorithmic transactions. Statistical benefits, exemplified by paired trading, are one market neutral trading strategy that almost all counterproductive funds take. The high frequency transactions require high computational speed of the computer, and the computational complexity of the collaborative inspection has become a realistic constraint for paired transaction implementation, especially in the case of High Frequency Transactions (HFT). Compared with the classical method, the method searches possible synergistic pairs from a large amount of high-frequency transaction data, and at present, quantum algorithms applied to the field of high-frequency statistics arbitrage transaction are lacking so as to meet the requirement of high-frequency transaction, which is a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a quantum searching method and device for a coordination pair in financial transaction data, which are used for solving the defects in the prior art, can realize the application of a quantum algorithm in the field of financial transaction, can search the coordination pair with a coordination relation in the financial transaction data, so as to meet the requirements of high-frequency transaction, and fills the blank of related technologies.
One embodiment of the present application provides a quantum search method for a synergistic pair in financial transaction data, the method comprising:
obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
preparing a characteristic value quantum state carrying characteristic value information of the hermitian matrix according to the quantum state of the hermitian matrix;
estimating the characteristic value quantum state, and calculating the condition number of the hermite matrix according to the estimated characteristic value;
searching a coordinating pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
Optionally, the preparing a quantum state including the hermitian matrix corresponding to the transaction data matrix includes:
and carrying out normalization processing on the maximum singular value of the transaction data matrix to prepare a quantum state containing the hermitian matrix corresponding to the transaction data matrix after normalization processing, wherein the maximum singular value of the transaction data matrix after normalization processing is 1.
Optionally, the preparing a eigenvalue quantum state carrying eigenvalue information of the hermitian matrix according to the quantum state of the hermitian matrix includes:
and constructing and operating a corresponding quantum phase estimation QPE circuit aiming at the quantum state of the hermite matrix to obtain a eigenvalue quantum state carrying eigenvalue information of the hermite matrix.
Optionally, the estimating the eigenvalue quantum state includes:
constructing a reference condition number, and continuously increasing the value of the reference condition number until no characteristic value exists in the characteristic value quantum state, wherein the characteristic value is smaller than the reciprocal of the reference condition number;
and determining the minimum characteristic value in the characteristic value quantum state according to the number of the reference conditions.
Optionally, the constructing the reference condition number continuously increases the value of the reference condition number until no eigenvalue exists in the eigenvalue quantum state less than the inverse of the reference condition number, including:
construction reference condition number k i =2 i Initializing i=0;
comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number;
and if the characteristic value existing in each characteristic value is smaller than the reciprocal of the reference condition number, adding 1 to the i, and returning to the step of comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number until no characteristic value existing in the characteristic value quantum state is smaller than the reciprocal of the reference condition number.
Optionally, the calculating the condition number of the hermite matrix according to the estimated eigenvalue includes:
and taking the quotient of the maximum eigenvalue and the minimum eigenvalue of the hermitian matrix as the condition number of the hermitian matrix.
Optionally, the searching for the coordinating pair in the transaction data matrix according to the size of the condition number includes:
if the condition number is greater than or equal to a preset condition number, carrying out a coordination test to determine whether a coordination pair exists;
if it is determined that the cooperative pair exists, searching the cooperative pair in the hermite matrix;
and mapping to obtain the coordination pairs in the transaction data matrix according to the coordination pairs in the hermite matrix.
Yet another embodiment of the present application provides a quantum lookup apparatus of a cooperative pair in financial transaction data, the apparatus comprising:
the first preparation module is used for obtaining a transaction data matrix containing a plurality of financial transaction data and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
the second preparation module is used for preparing a characteristic value quantum state carrying characteristic value information of the hermite according to the quantum state of the hermite;
the calculation module is used for estimating the characteristic value quantum state and calculating the condition number of the hermite matrix according to the estimated characteristic value;
the searching module is used for searching the coordination pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
A further embodiment of the present application provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of the above when run.
Yet another embodiment of the present application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the method of any of the above.
Compared with the prior art, the quantum searching method of the cooperative pair in the financial transaction data comprises the steps of firstly obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix; preparing a characteristic value quantum state carrying characteristic value information of the hermitian matrix according to the quantum state of the hermitian matrix; estimating the characteristic value quantum state, and calculating the condition number of the hermitian matrix according to the estimated characteristic value; according to the size of the condition number, searching a coordination pair in the transaction data matrix, wherein the coordination pair is financial transaction data with a coordination relation, so that the quantum algorithm is applied to the financial transaction field, the coordination pair with the coordination relation in the financial transaction data can be searched, the requirement of high-frequency transaction is met, and the blank of related technologies is filled.
Drawings
Fig. 1 is a hardware block diagram of a computer terminal of a quantum search method of a cooperative pair in financial transaction data according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a quantum search method of a cooperative pair in financial transaction data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a quantum search device for a coordinated pair in financial transaction data according to an embodiment of the present invention.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The embodiment of the invention firstly provides a quantum searching method of a coordination pair in financial transaction data, which can be applied to electronic equipment such as a computer terminal, in particular to a common computer, a quantum computer and the like.
The following describes the operation of the computer terminal in detail by taking it as an example. Fig. 1 is a hardware block diagram of a computer terminal according to a quantum search method of a cooperative pair in financial transaction data according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to quantum search methods of coordinated pairs in financial transaction data in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, i.e., implement the methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It should be noted that a real quantum computer is a hybrid structure, which includes two major parts: part of the computers are classical computers and are responsible for performing classical computation and control; the other part is quantum equipment, which is responsible for running quantum programs so as to realize quantum computation. The quantum program is a series of instruction sequences written by a quantum language such as the qlunes language and capable of running on a quantum computer, so that the support of quantum logic gate operation is realized, and finally, quantum computing is realized. Specifically, the quantum program is a series of instruction sequences for operating the quantum logic gate according to a certain time sequence.
In practical applications, quantum computing simulations are often required to verify quantum algorithms, quantum applications, etc., due to the development of quantum device hardware. Quantum computing simulation is a process of realizing simulated operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program, namely the program for representing the quantum bit and the evolution thereof written in the classical language, wherein the quantum bit, the quantum logic gate and the like related to quantum computation are all represented by corresponding classical codes.
Quantum circuits, which are one embodiment of quantum programs, also weigh sub-logic circuits, are the most commonly used general quantum computing models, representing circuits that operate on qubits under an abstract concept, the composition of which includes qubits, circuits (timelines), and various quantum logic gates, and finally the results often need to be read out by quantum measurement operations.
Unlike conventional circuits, which are connected by metal lines to carry voltage or current signals, in a quantum circuit, the circuit can be seen as being connected by time, i.e., the state of the qubit naturally evolves over time, as indicated by the hamiltonian operator, during which it is operated until a logic gate is encountered.
One quantum program is corresponding to one total quantum circuit, and the quantum program refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits of the quantum program. It can be understood that: one quantum program may consist of a quantum circuit, a measurement operation for the quantum bits in the quantum circuit, a register to hold the measurement results, and a control flow node (jump instruction), and one quantum circuit may contain several tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process of executing all quantum logic gates according to a certain time sequence. Note that the timing is the time sequence in which a single quantum logic gate is executed.
It should be noted that in classical computation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved by a combination of logic gates. Similarly, the way in which the qubits are handled is a quantum logic gate. Quantum logic gates are used, which are the basis for forming quantum circuits, and include single-bit quantum logic gates, such as Hadamard gates (H gates, ada Ma Men), bery-X gates (X gates), bery-Y gates (Y gates), bery-Z gates (Z gates), RX gates, RY gates, RZ gates, and the like; two or more bit quantum logic gates, such as CNOT gates, CR gates, CZ gates, iSWAP gates, toffoli gates, and the like. Quantum logic gates are typically represented using unitary matrices, which are not only in matrix form, but also an operation and transformation. The effect of a general quantum logic gate on a quantum state is calculated by multiplying the unitary matrix by the matrix corresponding to the right vector of the quantum state.
Referring to fig. 2, fig. 2 is a flow chart of a quantum searching method for a coordinating pair in financial transaction data according to an embodiment of the present invention, which may include the following steps:
s201, obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
the financial transaction data may specifically be transaction data of a high frequency transaction (HFT, high Frequency Trading), for example: discrete point-in-time price vectors for multiple stocks, and so forth. There may be a synergistic relationship between partial price vectors whose linear combination has certain properties that do not change over time. For example, the linear combined total price of certain stock price vectors may be fixed to be a constant (typically subject to a certain distribution).
After the transaction data matrix X is obtained, in order to facilitate the calculation of the subsequent condition number, the transaction data matrix X may be subjected to normalization processing of the maximum singular value as follows:where max lambda (X) is the maximum singular value of matrix X. Then, can pass throughExisting quantum circuit construction matrix>Corresponding Hermitian matrix>Namely, preparing a quantum state containing the hermitian matrix A. At this time, the maximum eigenvalue of hermitian A is equal to matrix +.>Maximum singular value of (2)The maximum eigenvalue referred to in this application is the maximum value of the absolute value of the eigenvalue, and the minimum eigenvalue is the minimum value of the absolute value of the eigenvalue.
In practical applications, max λ (X) may be estimated based on the following conclusions of the matrix di-norms and F (Frobenius, freude Luo Beini us), specifically: transaction data matrix X Frobenius Fan Shuji is II X II F 2 norms of II X 2 The dimension is n, which has the following conclusion:
thus, the first and second substrates are bonded together, frobenius norms XII can be used F Estimate and add II X II F As the maximum singular value upper bound max lambda (X) of the available X, the 2-norm solution difficulty is greater and may not be considered.
Due to the absolute value of the eigenvalue of the hermite matrix A and the matrix after normalizationThe singular values are the same, the transaction data and the condition number can be reflected, and the matrix +_ can be determined by mapping the coordination pair of the hermitian matrix A one to one>And further determines the synergistic pair of the transaction data matrix X. And, in order to adapt the requirements of the sub-transformation to the matrix form (in the form of hermitian matrix), the subsequent processing of the transaction data matrix X may be replaced by hermitian matrix a.
S202, preparing a characteristic value quantum state carrying characteristic value information of the hermite according to the quantum state of the hermite;
specifically, a corresponding quantum phase estimation QPE line can be constructed and operated for the quantum state of the hermite matrix to obtain a eigenvalue quantum state carrying eigenvalue information of the hermite matrix.
Among them, QPE (Quantum Phase Estimation ) is an important application of quantum fourier transform QFT, which is important in that it is the basis of many quantum algorithms, such as HHL algorithm, etc. The QPE quantum circuit mainly comprises: h door operation module, C-U j The operation (controlled U operator operation) module and the quantum inverse Fourier transform module, the solved essential problem is the eigenvalue estimation of the matrix, namely, the eigenvalue of the matrix is solved by the given matrix. The quantum state of hermite A can be converted into a eigenvalue quantum state containing each eigenvalue of hermite A through a QPE quantum line (in the quantum field, the quantum state is a superposition state, so that all eigenvalue information can be carried). In practical application, the conversion of the characteristic value quantum state is reasonably feasible by constructing other existing or improved quantum circuits, and the application is not limited to the conversion.
S203, estimating the characteristic value quantum state, and calculating the condition number of the hermite matrix according to the estimated characteristic value;
specifically, a reference condition number can be constructed, and the value of the reference condition number is continuously increased until no characteristic value exists in the characteristic value quantum state, and the characteristic value is smaller than the reciprocal of the reference condition number; the minimum eigenvalue in the eigenvalue quantum state is determined according to the reference condition number, and the determined minimum eigenvalue can be an approximate estimated value interval.
For example, the comparison of the characteristic quantum state and the reference condition number may be implemented by the quantum condition number comparator QCNC (Quantum Condition Number Comparison), and the characteristic lower bound is approximated, and an operation flow of qnc may be as follows:
s2031, construct reference condition number k i =2 i Initializing i=0;
s2032, respectively comparing each eigenvalue in the eigenvalue quantum state of the hermitian matrix A with the reciprocal of the reference condition numberComparing if there is a certain characteristic value +.>Returning to 0, otherwise returning to 1; (since the maximum eigenvalue is normalized to 1, return to 0 on the first comparison)
And adding 1 to i when the comparison result returns to 0, and repeatedly executing S2032 until 1 is returned, namely, no eigenvalue in the eigenvalue quantum state is smaller than the reciprocal of the reference condition number. Suppose at this point the reference condition number increases to 2 m The method can obtain: 2 -m ≤minλ A <2 -m+1 I.e. the minimum eigenvalue min lambda of hermite matrix a A The estimated interval is [2 -m ,2 -m+1 ) Wherein m is a positive integer.
Specifically, the quotient of the maximum eigenvalue and the minimum eigenvalue of the hermite matrix can be used as the condition number of the hermite matrix.
In statistics, multiple collinearity refers to the case where some of the explanatory variables in the multiple regression model have a highly linear relationship. In order to detect and measure the degree of multiple co-linearity, condition numbers κ were introduced in the field of numerical analysis. For matrix X:
i.e. the ratio of the maximum singular value to the minimum singular value of X, in this application the quotient of the maximum value of the eigenvalue absolute value of the corresponding hermitian matrix a and the minimum value of the eigenvalue absolute value. The greater the condition number of the matrix, the more severe the degree of multiple collinearity. Multiple linearities can be detected by searching a large condition number system where the system is more likely to have synergistic pairs. Based on this, the collaborative pair existence problem corresponding to the statistical arbitrage (paired transaction) problem can be weakened into an estimation problem of the condition number size.
Taking the above example, the hermitian matrix A has a maximum eigenvalue of 1 and a minimum eigenvalue of [2 ] -m ,2 -m+1 ) Obtaining a condition number estimation section of (2 m-1 ,2 m ]It is simply understood that any condition number within the interval may be taken as a particular value of the estimated condition number.
In practical application, the normalization processing of the maximum eigenvalue may not be performed, and the upper boundary and the lower boundary of the eigenvalue may be iteratively approximated by the eigenvalue estimation, so as to obtain the estimation intervals of the maximum eigenvalue and the minimum eigenvalue, and further estimate the corresponding condition number.
S204, searching a coordination pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
Specifically, in one implementation, if the estimated condition number is greater than or equal to the preset condition number, performing a coordination check to determine whether a coordination pair exists; if it is determined that the cooperative pair exists, searching the cooperative pair in the hermite matrix; and obtaining the coordination pairs in the transaction data matrix through mapping according to the coordination pairs in the hermite matrix. If the condition number is less than the preset condition number, or the coordination test fails, indicating that the transaction data matrix does not find a coordination pair.
Wherein the preset condition number may be set based on specific problem context and requirements. In practice, if the condition number of the matrix is too small, then it is considered that there are no synergistic pairs, otherwise it is considered that there is a high probability that there are synergistic pairs.
In the case where the condition number is equal to or greater than the preset condition number, that is, it is considered that there is a high possibility that there is a cooperative pair, a cooperative check may be performed at this time, for example, by using a quantum residual sequence generation algorithm or the like, to determine whether there is a cooperative pair really. The coordination test is passed, the existence of coordination pairs is indicated, then, a specific coordination pair can be found for the hermite matrix by adopting a method of quantum linear regression to judge the stability of a residual sequence and the like, and then, financial transaction data with coordination relations in the original transaction data matrix, such as a stock price vector, is obtained through mapping. The method for judging the stability of the residual sequence by using the quantum residual sequence generation algorithm and the quantum linear regression is the prior art, and the invention is not repeated here.
In the process, the problem can be simplified, namely, assuming that not only the stock price vectors are cooperated, but also the linear combination of the stock price vectors is constant, the residual sequence can be obtained by carrying out linear regression on the stock price vectors forming the matrix A, so that the stability of the residual sequence is judged, and the linear regression corresponding to the stable residual sequence is the stock price vector with the cooperated relation.
Therefore, the invention weakens the cooperative pair existence problem corresponding to the statistical arbitrage (paired transaction) problem into the condition number size estimation problem, exerts the parallel calculation advantage of the quantum algorithm, reduces the calculation complexity, rapidly solves the important pre-selection problem of the cooperative pair problem, namely the condition number estimation, and provides important data support advantage for the statistical arbitrage; by realizing the application of the quantum algorithm in the field of financial transaction, the coordination pair with coordination relation in the financial transaction data can be searched, thereby meeting the requirement of high-frequency transaction, filling the blank of related technology, and having important open meaning and practical application value.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a quantum search device of a coordinating pair in financial transaction data, corresponding to the flow shown in fig. 2, where the device includes:
the first preparation module 301 is configured to obtain a transaction data matrix including a plurality of financial transaction data, and prepare a quantum state including an hermitian matrix corresponding to the transaction data matrix;
the second preparation module 302 is configured to prepare a eigenvalue quantum state carrying eigenvalue information of the hermitian matrix according to the quantum state of the hermitian matrix;
a calculation module 303, configured to estimate the eigenvalue quantum state, and calculate a condition number of the hermite matrix according to the estimated eigenvalue;
a searching module 304, configured to search for a coordinating pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
Specifically, the first preparation module is specifically configured to:
and carrying out normalization processing on the maximum singular value of the transaction data matrix to prepare a quantum state containing the hermitian matrix corresponding to the transaction data matrix after normalization processing, wherein the maximum singular value of the transaction data matrix after normalization processing is 1.
Specifically, the second preparation module is specifically configured to:
and constructing and operating a corresponding quantum phase estimation QPE circuit aiming at the quantum state of the hermite matrix to obtain a eigenvalue quantum state carrying eigenvalue information of the hermite matrix.
Specifically, the computing module includes:
a construction unit configured to construct a reference condition number, and continuously increase a value of the reference condition number until no feature value exists in the feature value quantum state that is smaller than an inverse of the reference condition number;
and the determining unit is used for determining the minimum characteristic value in the characteristic value quantum state according to the reference condition number.
Specifically, the construction unit is specifically configured to:
construction reference condition number k i =2 i Initializing i=0;
comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number;
and if the characteristic value existing in each characteristic value is smaller than the reciprocal of the reference condition number, adding 1 to the i, and returning to the step of comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number until no characteristic value existing in the characteristic value quantum state is smaller than the reciprocal of the reference condition number.
Specifically, the computing module is specifically configured to:
and taking the quotient of the maximum eigenvalue and the minimum eigenvalue of the hermitian matrix as the condition number of the hermitian matrix.
Specifically, the searching module is specifically configured to:
if the condition number is greater than or equal to a preset condition number, carrying out a coordination test to determine whether a coordination pair exists;
if it is determined that the cooperative pair exists, searching the cooperative pair in the hermite matrix;
and according to the coordination pairs in the hermite matrix, mapping to obtain the coordination pairs in the transaction data matrix.
Therefore, the invention weakens the cooperative pair existence problem corresponding to the statistical arbitrage (paired transaction) problem into the condition number size estimation problem, exerts the parallel calculation advantage of the quantum algorithm, rapidly solves the important pre-selection problem of the cooperative pair problem, namely condition number estimation, and provides important data support advantage for the statistical arbitrage; by realizing the application of the quantum algorithm in the field of financial transaction, the coordination pair with coordination relation in the financial transaction data can be searched, thereby meeting the requirement of high-frequency transaction, filling the blank of related technology, and having important open meaning and practical application value.
The embodiment of the invention also provides a storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the method embodiments described above when run.
Specifically, in the present embodiment, the above-described storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
s2, preparing a characteristic value quantum state carrying characteristic value information of the hermitian matrix according to the quantum state of the hermitian matrix;
s3, estimating the characteristic value quantum state, and calculating the condition number of the hermite matrix according to the estimated characteristic value;
s4, searching a coordination pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the steps of any of the method embodiments described above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
s2, preparing a characteristic value quantum state carrying characteristic value information of the hermitian matrix according to the quantum state of the hermitian matrix;
s3, estimating the characteristic value quantum state, and calculating the condition number of the hermite matrix according to the estimated characteristic value;
s4, searching a coordination pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
Specifically, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional implementation manners, and this embodiment is not repeated herein.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims (9)

1. A quantum search method for a synergistic pair in financial transaction data, the method comprising:
obtaining a transaction data matrix containing a plurality of financial transaction data, and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
constructing and operating a corresponding Quantum Phase Estimation (QPE) circuit aiming at the quantum state of the hermite matrix to obtain a characteristic value quantum state carrying characteristic value information of the hermite matrix;
estimating the characteristic value quantum state, and calculating the condition number of the hermite matrix according to the estimated characteristic value;
searching a coordinating pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
2. The method of claim 1, wherein preparing the quantum states comprising hermite matrices corresponding to the transaction data matrices comprises:
and carrying out normalization processing on the maximum singular value of the transaction data matrix to prepare a quantum state containing the hermitian matrix corresponding to the transaction data matrix after normalization processing, wherein the maximum singular value of the transaction data matrix after normalization processing is 1.
3. The method of claim 2, wherein said estimating the eigenvalue quantum state comprises:
constructing a reference condition number, and continuously increasing the value of the reference condition number until no characteristic value exists in the characteristic value quantum state, wherein the characteristic value is smaller than the reciprocal of the reference condition number;
and determining the minimum characteristic value in the characteristic value quantum state according to the number of the reference conditions.
4. A method according to claim 3, wherein said constructing a reference condition number, continuously increasing the value of said reference condition number until no eigenvalues in said eigenvalue sub-states are less than the inverse of said reference condition number, comprises:
structural reference condition numberInitializing->
Comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number;
and if the characteristic value existing in each characteristic value is smaller than the reciprocal of the reference condition number, adding 1 to the i, and returning to the step of comparing each characteristic value in the characteristic value quantum state with the reciprocal of the reference condition number until no characteristic value existing in the characteristic value quantum state is smaller than the reciprocal of the reference condition number.
5. The method of claim 1, wherein the calculating the condition number of the hermite matrix from the estimated eigenvalues comprises:
and taking the quotient of the maximum eigenvalue and the minimum eigenvalue of the hermitian matrix as the condition number of the hermitian matrix.
6. The method of claim 1, wherein said looking up a cooperating pair in said transaction data matrix according to the size of said condition number comprises:
if the condition number is greater than or equal to a preset condition number, carrying out a coordination test to determine whether a coordination pair exists;
if it is determined that the cooperative pair exists, searching the cooperative pair in the hermite matrix;
and mapping to obtain the coordination pairs in the transaction data matrix according to the coordination pairs in the hermite matrix.
7. A quantum lookup apparatus for a synergistic pair in financial transaction data, the apparatus comprising:
the first preparation module is used for obtaining a transaction data matrix containing a plurality of financial transaction data and preparing a quantum state containing an hermitian matrix corresponding to the transaction data matrix;
the second preparation module is used for constructing and running a corresponding quantum phase estimation QPE circuit aiming at the quantum state of the hermite matrix to obtain a characteristic value quantum state carrying characteristic value information of the hermite matrix;
the calculation module is used for estimating the characteristic value quantum state and calculating the condition number of the hermite matrix according to the estimated characteristic value;
the searching module is used for searching the coordination pair in the transaction data matrix according to the condition number; wherein the coordination pair is financial transaction data with coordination relation.
8. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when run.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of claims 1 to 6.
CN202110125874.XA 2021-01-29 2021-01-29 Quantum searching method and device for coordination pairs in financial transaction data Active CN114820182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110125874.XA CN114820182B (en) 2021-01-29 2021-01-29 Quantum searching method and device for coordination pairs in financial transaction data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110125874.XA CN114820182B (en) 2021-01-29 2021-01-29 Quantum searching method and device for coordination pairs in financial transaction data

Publications (2)

Publication Number Publication Date
CN114820182A CN114820182A (en) 2022-07-29
CN114820182B true CN114820182B (en) 2023-08-04

Family

ID=82525991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110125874.XA Active CN114820182B (en) 2021-01-29 2021-01-29 Quantum searching method and device for coordination pairs in financial transaction data

Country Status (1)

Country Link
CN (1) CN114820182B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997652A (en) * 2009-08-14 2011-03-30 中兴通讯股份有限公司 Acceptance detection method and device based on LDPC-MIMO (low density parity check-multiple input multiple output) communication system
CN110635858A (en) * 2019-04-09 2019-12-31 杭州电子科技大学 Autoregressive model channel prediction method based on quantum computation
CN112232512A (en) * 2020-09-08 2021-01-15 中国人民解放军战略支援部队信息工程大学 Quantum computation simulation platform and linear equation set quantum solution simulation method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11537928B2 (en) * 2019-05-03 2022-12-27 Zapata Computing, Inc. Quantum-classical system and method for matrix computations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997652A (en) * 2009-08-14 2011-03-30 中兴通讯股份有限公司 Acceptance detection method and device based on LDPC-MIMO (low density parity check-multiple input multiple output) communication system
CN110635858A (en) * 2019-04-09 2019-12-31 杭州电子科技大学 Autoregressive model channel prediction method based on quantum computation
CN112232512A (en) * 2020-09-08 2021-01-15 中国人民解放军战略支援部队信息工程大学 Quantum computation simulation platform and linear equation set quantum solution simulation method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于量子算法的量子态层析新方案;杨乐 等;物理学报;第68卷(第14期);全文 *

Also Published As

Publication number Publication date
CN114820182A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US10423887B2 (en) Compilation, memory management, and fault localization with ancillas in an unknown state
CN114819163B (en) Training method and device for quantum generation countermeasure network, medium and electronic device
CN114819168B (en) Quantum comparison method and device for matrix eigenvalues
CN115545947A (en) Optimal investment portfolio determination method based on variational quantum circuit and related device
CN117709415A (en) Quantum neural network model optimization method and device
CN114511094B (en) Quantum algorithm optimization method and device, storage medium and electronic device
CN114764619B (en) Convolution operation method and device based on quantum circuit
CN114820182B (en) Quantum searching method and device for coordination pairs in financial transaction data
CN114819169B (en) Quantum estimation method and device for matrix condition number
CN116403657A (en) Drug response prediction method and device, storage medium and electronic device
CN116415958B (en) Abnormal data detection method and device based on quantum technology and storage medium
CN114881238A (en) Method and apparatus for constructing quantum discriminator, medium, and electronic apparatus
CN117151231A (en) Method, device and medium for solving linear system by using variable component sub-line
CN114881239A (en) Method and apparatus for constructing quantum generator, medium, and electronic apparatus
CN116541947B (en) Grover solving method and device for SAT or MAX-SAT problem of vehicle configuration
CN115879559B (en) Method and device for judging equivalence relation among multiple quantum states and quantum computer
CN115730670B (en) Method and device for generating mode file, medium and electronic device
CN115879558B (en) Method and device for comparing sizes of multiple quantum states
CN115775028B (en) Quantum circuit optimization method, quantum circuit optimization device, quantum circuit optimization medium and electronic device
CN115879560B (en) Equivalent relation judging method and device for quantum data and classical data
CN114512195B (en) Calculation method, device and medium based on molecular dynamics simulation system property
CN116306952B (en) Molecular property prediction method and device, storage medium and electronic device
CN113435113B (en) Power system transient stability evaluation method and device
CN114372583B (en) Quantum program optimization method based on machine learning framework and related equipment
CN115713122B (en) Method and device for determining size relation between quantum data and classical data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, high tech Zone, Hefei City, Anhui Province

Applicant after: Benyuan Quantum Computing Technology (Hefei) Co.,Ltd.

Address before: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, high tech Zone, Hefei City, Anhui Province

Applicant before: ORIGIN QUANTUM COMPUTING COMPANY, LIMITED, HEFEI

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant