Quantum kernel method, classification method and related systems, devices

By compressing the number of bits in quantum computing, high-dimensional data is encoded onto fewer quantum bits, and the inner product is calculated using quantum kernel functions, which solves the problem of low computing efficiency of high-dimensional data and achieves more efficient data processing and analysis.

CN117273157BActive Publication Date: 2025-10-14ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311405279.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-10-14
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

When processing high-dimensional data, existing technologies have problems such as low computing efficiency, high resource consumption, and prone to memory overflow. Especially when the data feature information is not compressed, it is difficult to effectively utilize the advantages of quantum computing.

Method used

By compressing the number of bits, multidimensional data is encoded onto a smaller number of quantum bits. The quantum kernel inner product is calculated in the Hilbert space using quantum circuits and kernel functions to construct a quantum kernel matrix, reducing the number of quantum bits and circuit depth.

Benefits of technology

It improves computing efficiency, reduces running time and memory space requirements, maintains the integrity of data feature information, and is suitable for complex data analysis scenarios such as financial market analysis and credit scoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117273157B_ABST
    Figure CN117273157B_ABST
Patent Text Reader

Abstract

The application provides a quantum kernel method, a classification method, a data coding method and related systems and devices, which are applied to a quantum computer or a quantum simulator. The method comprises: encoding any two m-dimensional data in a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, m and n are positive integers, and m>n; measuring the encoded n quantum bits to obtain quantum kernel inner products of the two encoded m-dimensional data in a Hilbert space, thereby obtaining a quantum kernel matrix corresponding to the plurality of m-dimensional data. In the application, multi-dimensional data is encoded into a smaller number of quantum bits without compressing data feature information as much as possible, the calculation of the quantum kernel method is completed, the running time and the memory space are saved through the compression of the number of bits, and the calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of quantum computing, and in particular to a quantum kernel method for compressing the number of bits, a classification method, a quantum chip system, a quantum computer, and a classical computer. Background Art

[0002] A quantum computer is a physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, and to store and process quantum information. When a device processes and calculates quantum information and runs quantum algorithms, it is considered a quantum computer. Quantum computers are a key technology under research because they can handle mathematical problems more efficiently than conventional computers. For example, they can reduce the time required to crack RSA keys from hundreds of years to just hours.

[0003] The related technology uses one quantum bit to represent one type of characteristic information, and cannot use a smaller number of bits to represent more dimensional data characteristic information without compressing the data characteristic information.

[0004] Based on this, the present application provides a quantum kernel method for compressing the number of bits, a classification method, a data encoding method for compressing the number of bits, a quantum chip system, a quantum computer, and a classical computer to improve related technologies. Summary of the Invention

[0005] The present application provides a quantum kernel method for compressing the number of bits, a classification method, a data encoding method for compressing the number of bits, a quantum chip system, a quantum computer, and a classical computer, which improve computing efficiency by compressing the number of bits.

[0006] In a first aspect, the present application provides a quantum kernel method for compressing the number of bits, which is applied to a quantum computer or a quantum simulator, and the method comprises:

[0007] Encode any two m-dimensional data from multiple m-dimensional data into n quantum bits through the quantum circuit corresponding to the preset kernel function, where m and n are positive integers and m>n;

[0008] The encoded n quantum bits are measured to obtain the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space, thereby obtaining a quantum kernel matrix corresponding to the multiple m-dimensional data.

[0009] In a second aspect, the present application provides a classification method applied to classical computers, the method comprising:

[0010] Training a classifier according to the quantum kernel matrix; during the training process of the classifier, a kernel function in an objective function is determined according to a corresponding quantum kernel inner product in the quantum kernel matrix;

[0011] Using the trained classifier, performing a classification task;

[0012] The quantum kernel matrix is ​​obtained by using the quantum kernel method for compressing the number of bits as described in any one of claims 1 to 8.

[0013] In a third aspect, the present application provides a data encoding method for compressing the number of bits, which is applied to a quantum chip system or a quantum simulator, and the method comprises:

[0014] Through quantum circuits, m-dimensional data is encoded into n quantum bits, where m and n are positive integers and m>n.

[0015] In a fourth aspect, the present application provides a quantum chip system, comprising at least one quantum processor, wherein the at least one quantum processor is configured to execute quantum operations corresponding to a quantum program to implement the following steps:

[0016] Through the quantum circuit corresponding to the preset kernel function, any two m-dimensional data among multiple m-dimensional data are encoded into n quantum bits, where m and n are positive integers and m>n.

[0017] In a fifth aspect, the present application provides a quantum computer, comprising:

[0018] A quantum chip system, the quantum chip system comprising at least one quantum processor, the at least one quantum processor configured to execute quantum operations corresponding to a quantum program, thereby encoding any two m-dimensional data from a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, where m and n are positive integers and m>n;

[0019] A measurement and control system, comprising a control device and a measuring device, wherein the control device is used to convert the quantum program corresponding to the quantum circuit into a corresponding control signal and send it to the quantum processor, and the measuring device is used to measure the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in Hilbert space, thereby obtaining the quantum kernel matrix corresponding to the multiple m-dimensional data;

[0020] A support system for providing a working environment to ensure the operation of the quantum chip system;

[0021] An operating system is used to provide a software system to enable interaction between the user and the quantum chip system and the measurement and control system.

[0022] In a sixth aspect, the present application provides a classical computer, comprising:

[0023] memory for storing computer programs;

[0024] At least one processor is configured to execute the computer program to implement the following steps:

[0025] Select n quantum bits to encode any two m-dimensional data from multiple m-dimensional data, where m and n are positive integers and m>n;

[0026] According to the measurement results of the encoded n quantum bits, the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space is calculated, thereby obtaining the quantum kernel matrix corresponding to the multiple m-dimensional data.

[0027] According to the quantum kernel method for compressing the number of bits, classification method, data encoding method for compressing the number of bits, quantum chip system, quantum computer, and classical computer provided in this application, by compressing the number of bits, multidimensional data can be encoded onto a smaller number of quantum bits without compressing the data feature information, thereby reducing the number of quantum bits and circuit depth, and effectively improving computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The present application is further described below with reference to the accompanying drawings and specific implementation methods.

[0029] Figure 1 This is a flow chart of a data encoding method for compressing the number of bits provided in an embodiment of the present application.

[0030] Figure 2a and Figure 2b These are the first and second parts of a schematic diagram of a structure of a quantum circuit provided in an embodiment of the present application.

[0031] Figure 3 This is a flow chart of a quantum kernel method for compressing the number of bits provided in an embodiment of the present application.

[0032] Figure 4 It is a flow chart of a classification method provided in an embodiment of the present application.

[0033] Figure 5 This is a schematic diagram of the structure of a quantum chip system provided in an embodiment of the present application.

[0034] Figure 6 Schematic diagram of the structure of a quantum computer provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0036] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0037] Quantum computers have a hybrid architecture, consisting of two main components: a classical computing component responsible for performing classical computations and control, and a quantum computing component responsible for running quantum programs and thus achieving quantum computations. A quantum program is a sequence of instructions written in a quantum language, such as QRunes, that can be executed on a quantum computer. This supports quantum logic gate operations and ultimately enables quantum computations. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a specific time sequence.

[0038] Quantum circuits, as a manifestation of quantum programs, also known as quantum logic circuits, are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. Their components include quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0039] Unlike traditional circuits, which are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time. In other words, the state of the quantum bit naturally evolves over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

[0040] A quantum program as a whole corresponds to a single quantum circuit. The quantum program refers to this quantum circuit, where the total number of qubits in the quantum circuit is the same as the total number of qubits in the quantum program. A quantum program can be understood as consisting of a quantum circuit, measurement operations on the qubits in the quantum circuit, registers storing the measurement results, and control flow nodes (jump instructions). A quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all quantum logic gates in a specific time sequence. It should be noted that the time sequence refers to the chronological order in which individual quantum logic gates are executed.

[0041] It's important to note that in classical computing, the most basic unit is the bit, and the most fundamental control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, quantum logic gates are used to manipulate qubits. Quantum logic gates enable quantum states to evolve. They form the foundation of quantum circuits. Quantum logic gates include single-bit quantum logic gates such as the Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate, RY gate, and RZ gate; and multi-bit quantum logic gates such as the CNOT gate, CR gate, iSWAP gate, and Toffoli gate. Quantum logic gates are generally represented using unitary matrices. Unitary matrices are not only a matrix form but also a type of operation and transformation. A typical quantum logic gate operates on a quantum state by multiplying the unitary matrix on the left by the matrix corresponding to the quantum state's right vector.

[0042] With the recent development of quantum technology, quantum computers and quantum simulators have become tools for achieving complex computational tasks, particularly those involving high-dimensional data processing and machine learning. Kernel methods, particularly quantum kernel methods, can map classical datasets into high-dimensional Hilbert spaces, thereby computing inner products using kernel functions and further employing classical machine learning algorithms for prediction. These methods involve specific software frameworks and hardware configurations, such as VQNET and Pyqpanda.

[0043] Kernel methods are a commonly used technique in machine learning and statistics for dealing with nonlinear problems and high-dimensional data. In kernel methods, by mapping the original data into a high-dimensional feature space, the data in this high-dimensional feature space is made linearly separable or approximately linearly separable, allowing linear classifiers or regressors to be used to solve nonlinear problems in the original data. The core idea of ​​kernel methods is to use a kernel function, which is a function that measures the similarity between two samples. By calculating the inner product of the samples in the feature space, the similarity of the samples in the original space can be obtained, thereby achieving linear processing of nonlinear data. Kernel functions can map low-dimensional data to high-dimensional space without the need to explicitly calculate high-dimensional feature vectors, thus avoiding the complexity of high-dimensional calculations.

[0044] Although high-dimensional Hilbert space provides new possibilities for data space, the computational efficiency of related technologies on simulators is lower than that of classical algorithms. The number of bits used by existing quantum kernel methods is the same as the number of features (data dimensions), but in real-world scenarios, there are situations where the data dimensions are large and a large number of bits are required. A larger number of bits will lead to a significant increase in running time and slower computational efficiency. Moreover, when the number of bits is large, not only does the running time increase significantly, but it is also prone to problems that make calculations impossible due to memory overflow. For example, in a bank interest rate prediction project, the number of features may reach fifty or sixty. Some related technologies perform dimensionality reduction operations on the original features, such as PCA (principal component analysis), but the disadvantage is that it leads to the loss of important data feature information.

[0045] How to optimize computing efficiency and reduce resource usage while maintaining data feature information has become a problem to be solved.

[0046] To address the above issues, this application provides a quantum kernel method for compressing the number of bits, a classification method, a data encoding method for compressing the number of bits, a quantum chip system, a quantum computer, and a classical computer to improve related technologies. This application encodes multidimensional data onto a smaller number of quantum bits while minimizing the compression of data feature information, completing the calculation of the quantum kernel method. By compressing the number of bits, the number of quantum bits and circuit depth are reduced, thereby saving runtime and memory space and improving computational efficiency.

[0047] It should be noted that although this application uses the interest rate prediction scenario in the financial field as an example, this application can be applied to other computing scenarios in the financial field, such as the construction of credit scoring models, portfolio optimization, risk management analysis, simulation of high-frequency trading strategies, stock price trend prediction, pricing of complex financial derivatives, etc. In addition, in addition to the financial field, this application can also be applied to computing scenarios in other technical fields, such as gene sequence analysis in bioinformatics, simulation of drug discovery, simulation of complex physical systems, optimization of deep learning models, prediction of weather patterns, complex network analysis, energy system optimization, etc.

[0048] The present application relates to a quantum computer, and its system operating environment is suitable for, for example, a high-performance computing center, a research laboratory, or a specialized quantum technology company.

[0049] This application does not limit the type of quantum computer, which may include but is not limited to the following types.

[0050] Quantum computers based on superconducting circuits: use superconducting circuits to implement quantum bits, with high integration and fast operation speed.

[0051] Ion-trap-based quantum computers: Use ion traps to implement quantum bits, which have higher fidelity and longer coherence time.

[0052] Quantum computers based on optical systems: use optical systems to implement quantum bits, with high parallelism and fast operation speed.

[0053] Quantum computers based on topological systems: use topological systems to implement quantum bits, which have higher fault tolerance and longer coherence time.

[0054] (Quantum kernel method for compressing the number of bits)

[0055] See also Figure 1 , Figure 1 This is a flow chart of a quantum kernel method for compressing the number of bits provided in an embodiment of the present application.

[0056] An embodiment of the present application provides a quantum kernel method for compressing the number of bits, which is applied to a quantum computer or a quantum simulator. The method includes steps S101 to S102.

[0057] Step S101: encoding any two m-dimensional data from a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, where m and n are positive integers and m>n.

[0058] Step S102: measuring the encoded n qubits to obtain the quantum inner product of the encoded two m-dimensional data in the Hilbert space, so as to obtain the quantum kernel matrix corresponding to the plurality of m-dimensional data.

[0059] The quantum kernel method of compressing the number of bits can encode high-dimensional data into fewer qubits, and then calculate the quantum inner product in the Hilbert space. For example, given 2 12-dimensional data, it is encoded into 6 qubits, and the quantum inner product is calculated.

[0060] The quantum simulator can be a software tool or platform designed to simulate the behavior and operation of a quantum computer for the purpose of researching and developing quantum algorithms on a classical computer. The quantum simulator is, for example, Pyqpanda.

[0061] The kernel function allows operations in high-dimensional space without explicitly calculating high-dimensional feature vectors. The kernel function can be expressed as, for example, k(x, x') = |<φ(x)|φ(x')>|, or k(x, x') = |<φ(x)|φ(x')>| 2 , where k(x, x') is the value of the kernel function, representing a similarity measure between two data x and x'. φ(x) and φ(x') represent the feature vectors obtained by mapping data x and x' to a feature space (usually high-dimensional). <·|·> is the inner product operation, which calculates the inner product of two feature vectors. |<φ(x)|φ(x')>| calculates the modulus of the inner product between two feature vectors in the feature space (the inner product is a complex number), representing the similarity of data x and x' in the feature space. If this value is close to 1, it means that data x and x' are very similar in the feature space; if it is close to 0, it means that data x and x' have low similarity. The purpose of the kernel function is to calculate the similarity of two data in the feature space through the inner product, without explicitly calculating the feature vectors in the feature space, i.e., allowing calculations in high-dimensional or infinite-dimensional feature spaces without explicitly knowing the values of the feature vectors φ(x) and φ(x').

[0062] Different types of kernel functions can capture different kinds of similarity measures. For example, a linear kernel function uses the inner product to measure the linear relationship between data, while a Gaussian kernel function (RBF kernel function) can capture the nonlinear similarity between data. The choice of parameters and the type of kernel function depends on the specific application scenario.

[0063] A quantum circuit can include a series of quantum gate operations. For example, a simple two-qubit circuit can contain a Hadamard gate and a CNOT gate.

[0064] An m-dimensional data can refer to a data or vector containing m kinds of feature information, each of which can be original feature information or pre-processed feature information. For example, a 4-dimensional data can be represented as [3.2, 4.5, 2.1, 5.7].

[0065] A qubit is the basic unit of quantum computation, unlike a classical bit, which can be in a superposition of 0 and 1 simultaneously. For example, a qubit operated by a Hadamard gate will be in a uniform superposition of 0 and 1.

[0066] m and n are positive integers representing the dimension of the data and the number of bits, respectively. For example, m = 12, n = 6; or m = 12, n = 5.

[0067] m > n means that the dimension of the m-dimensional data is greater than the number of qubits used to encode the data. For example, 12 > 6.

[0068] A Hilbert space is a complete inner product space, where every two elements have a well-defined inner product and satisfy the completeness condition. In quantum mechanics, a finite-dimensional Hilbert space can be represented by vectors such as |0> and |1>, which can be combined into any quantum state.

[0069] Quantum kernel inner product is the inner product between two quantum states in Hilbert space, often used to measure the similarity between two quantum states. Consider two quantum states |ψ> and The quantum kernel inner product between the two can be represented as where <·|·> represents the inner product in Hilbert space. Quantum kernel inner product can be used in machine learning tasks such as classification, regression, etc., providing information about the relationship between data for algorithms.

[0070] A quantum kernel matrix is a matrix containing all possible quantum kernel inner products between multiple m-dimensional data. For example, for three 12-dimensional data, the quantum kernel matrix can be a 3x3 matrix, where each element is the quantum kernel inner product corresponding to the pair of 12-dimensional data. When the number of m-dimensional data is M, the quantum kernel matrix can be MxM. In large-scale machine learning tasks, quantum kernel matrix can be used to quickly evaluate the relationship between data and improve computational efficiency.

[0071] The quantum kernel method described above efficiently uses limited quantum resources to process high-dimensional data. High-dimensional data is encoded onto a small number of quantum bits using a preset kernel function. Specifically, a quantum circuit is constructed to implement the kernel function. Any two m-dimensional data from a plurality of m-dimensional data are taken and encoded onto n quantum bits using the quantum circuit, where m>n, preserving the characteristic information of the m-dimensional data as much as possible. Subsequently, the encoded quantum bits are measured to obtain the quantum kernel inner product of the two m-dimensional data in Hilbert space. By repeating this process, a quantum kernel matrix can be constructed for any two of all m-dimensional data, containing the similarity information between any two m-dimensional data from all m-dimensional data. The advantage of this approach is that, given limited quantum computing resources, the number of quantum bits used by the quantum kernel method to process high-dimensional data is reduced, making it particularly suitable for complex tasks that require processing multi-dimensional characteristic data. First, the quantum kernel method significantly improves computational efficiency, making it possible to process large quantities of high-dimensional data. Second, it avoids the data information that may be lost during dimensionality reduction, thereby improving prediction accuracy. In finance, such as stock market analysis and credit scoring, quantum kernel matrices can quickly assess the similarities between large amounts of data, helping data analysts make more accurate predictions. Furthermore, this approach leverages the advantages of quantum computing, such as parallelism, which allows for processing large amounts of data in a short period of time. It also reduces the storage and computing resources required by traditional computers to process large amounts of data, thereby lowering costs and improving efficiency.

[0072] For example, in the financial sector, consider four 12-dimensional data sets representing 12 characteristic features, such as stock prices, trading volumes, and price-to-price ratios, for four companies. First, a quantum circuit is used to encode any two 12-dimensional data sets onto six qubits. After encoding, these qubits are measured, and in Hilbert space, all possible quantum kernel inner products between the four 12-dimensional data sets are calculated, resulting in a 4×4 quantum kernel matrix. This quantum kernel matrix provides in-depth insights into the similarities between the stocks of these four companies, helping analysts more accurately predict stock market trends.

[0073] In some embodiments, the kernel function is k(x,x′)=|<φ(x)|φ(x′)>|, the m-dimensional data includes m different types of feature information; any two m-dimensional data among the multiple m-dimensional data are used as the first m-dimensional data and the second m-dimensional data, and the encoding process of the first m-dimensional data and the second m-dimensional data includes: according to the parameters of the i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit, the i-th group of quantum gates corresponding to the first m-dimensional data acts on the n quantum bits; according to the parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the quantum circuit, the i-th group of quantum gates corresponding to the second m-dimensional data acts on the n quantum bits. A conjugate transpose operation of a group of quantum gates acts on the n quantum bits; wherein the number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to the n quantum bits; parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data; the i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data, the value range of i is 1 to k, k is an integer greater than 1, and the types of characteristic information in different groups of characteristic information corresponding to the same m-dimensional data are not completely the same, and the types and order of characteristic information in a group of characteristic information with the same sequence number corresponding to any two m-dimensional data are completely the same.

[0074] Feature information can include attribute information of m-dimensional data and can be used to describe or represent specific aspects of the m-dimensional data. For example, in house price prediction, the m-dimensional data of a house includes feature information such as area, number of bedrooms, and number of bathrooms. M-dimensional data contains m different types of feature information. For example, the m-dimensional data of a student includes four types of feature information: name, age, gender, and grades. In this case, m = 4.

[0075] A quantum gate is a quantum operation used in quantum computing to change quantum states. Examples include Pauli-X gates and Hadamard gates. The parameters of a quantum gate are the set parameters that define its behavior. For example, the rotation angle of a controlled rotary logic gate. Applying a quantum gate to a qubit involves applying a quantum gate operation to the qubit, thereby changing its state. For example, applying a Hadamard gate to a qubit initially in the state |0> results in a superposition state.

[0076] The i-th set of quantum gates corresponding to the first m-dimensional data refers to the i-th set of quantum operations corresponding to the first m-dimensional data in the quantum circuit. For example, for the data [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], the third set of quantum gates can be controlled RY gates or controlled RZ gates. This serves to encode the data, and its benefit is that it allows the quantum circuit to be dynamically adjusted based on the data, thereby achieving quantum representation of the data.

[0077] The i-th group of quantum gates corresponding to the second m-dimensional data refers to the i-th group of quantum operations corresponding to the second m-dimensional data in the quantum circuit. Its function is to implement the encoding of the second m-dimensional data and complete the inner product calculation together with the first m-dimensional data.

[0078] Selecting n types of feature information from m types of feature information as the i-th group of feature information means selecting a subset from the m types of feature information as the i-th group of feature information. For example, from [name, age, gender, grades], [age, grades] is selected as the second group of feature information, in which case m = 4 and n = 2. This application does not limit the method for selecting n types of feature information; the selection can be sequential, random, manual, or based on the weights of the respective feature information.

[0079] i is the serial number of multiple sets of feature information, and its value range is 1 to k, such as 1, 2, 3...k.

[0080] k is the number of multiple sets of feature information, and k is, for example, 2, 3, 4, 5, 10, 20, 100, etc., and this application is not limited to this.

[0081] Different groups of feature information refer to subsets of feature information with different serial numbers. For example, the first group of feature information may be [age, gender], while the second group of feature information may be [name, grades].

[0082] The characteristic information type in a set of characteristic information refers to the types of various characteristic information contained in the set of characteristic information.

[0083] Here, based on the parameters of the i-th set of quantum gates corresponding to the m-dimensional data, the i-th set of quantum gates corresponding to the m-dimensional data is applied to the n qubits. Through specific quantum gate operations, the classical m-dimensional characteristic data is mapped into the quantum state of n qubits for further operations and calculations on a quantum computer. The advantage is that quantum mechanisms can represent and process information in a higher-dimensional Hilbert space (for example, calculating the quantum kernel inner product of two quantum eigenvectors), potentially achieving more efficient and accurate calculation results than traditional methods.

[0084] The i-th set of feature information for the m-dimensional data includes n types of feature information selected from the m types of feature information for the m-dimensional data. This allows n types of feature information to be selected for data encoding each time. This allows different data encoding strategies to address different data characteristics and computational requirements. This provides flexibility, allowing the algorithm to select appropriate feature information for encoding based on different application scenarios and data characteristics. This allows each feature information to be encoded zero, one, or multiple times during the encoding process of the m-dimensional data, thereby optimizing computational performance.

[0085] The different sets of feature information corresponding to the m-dimensional data have different types of feature information. This ensures that the feature information of different sets is unique and avoids using the same feature combination for multiple encodings. The benefit is that this strategy increases data diversity, can capture multiple patterns in the data, and enhances the model's generalization ability.

[0086] The parameters of the i-th set of quantum gates for the m-dimensional data are determined based on the i-th set of characteristic information of the m-dimensional data. This dynamic adjustment strategy dynamically adjusts the parameters of the quantum gates based on the selected characteristic information to ensure that the quantum encoding accurately reflects the selected characteristic information. Advantageously, this dynamic adjustment strategy allows multiple characteristic information to be encoded into n qubits in batches, reducing the number of required qubits and circuit depth. It also optimizes the encoding strategy based on different characteristic information, thereby achieving better computational results.

[0087] The quantum kernel method described above first defines the kernel function k(x,x') = |<φ(x)|φ(x')>|. Taking any two m-dimensional data as the first and second m-dimensional data, in a quantum circuit, the first m-dimensional data is used to apply corresponding quantum gates to n qubits. These quantum gates are dynamically determined based on the data characteristics. Subsequently, the second m-dimensional data is used to apply the conjugate transpose operation of the corresponding quantum gates to the n qubits. Each set of quantum gates corresponds one-to-one to n qubits, ensuring precise data encoding. This method determines the corresponding quantum gate parameters based on different sets of characteristic information, encoding two m-dimensional data onto n qubits. This method effectively encodes the data characteristics and preserves the relative relationships between the data. This encoding method makes quantum computing more efficient, reduces the number of bits, and reduces circuit depth. Furthermore, by selecting different sets of characteristic information, different perspectives or interpretations of the m-dimensional data can be obtained, providing more information and insights.

[0088] The benefits of this approach are, first, a more efficient way to represent high-dimensional data in quantum systems. Because it dynamically adjusts quantum circuits to the data, this ensures efficient encoding of data features while reducing the demand on quantum resources. Furthermore, by utilizing the conjugate transpose operation of quantum gates, we can directly compute the inner product of the data in a quantum environment, significantly accelerating data processing. Overall, this approach provides an efficient strategy for processing large datasets in quantum machine learning.

[0089] For example, the following are 12-dimensional data of two companies (data A and data B).

[0090] Data A: Stock price: 50.5; Trading volume: 5,000 shares; Price-earnings ratio: 15; Price-to-book ratio: 1.2; Debt ratio: 40%; Dividend yield: 2.5%; Net profit growth rate: 5%; Number of employees: 1,000; Annual sales: 200 million; R&D expenses: 10 million; Domestic market share: 20%; International market share: 5%.

[0091] Data B: Stock price: 45.3; Trading volume: 4,500 shares; Price-earnings ratio: 13; Price-to-book ratio: 1.1; Debt ratio: 35%; Dividend yield: 2%; Net profit growth rate: 4%; Number of employees: 800; Annual sales: 150 million; R&D expenses: 8 million; Domestic market share: 22%; International market share: 6%.

[0092] For the two 12-dimensional data sets above, the first set of feature information for data A includes: stock price, trading volume, price-to-earnings ratio, price-to-book ratio, debt ratio, and dividend yield. The second set of feature information for data A includes: net profit growth rate, number of employees, annual sales, R&D expenses, domestic market share, and international market share.

[0093] The first set of feature information for Data B is identical to that of Data A (the types and order are exactly the same), including the first six features: stock price, trading volume, price-to-earnings ratio, price-to-book ratio, debt ratio, and dividend yield. The second set of feature information for Data B is identical to that of Data A, including the last six features: net profit growth rate, number of employees, annual sales, R&D expenses, domestic market share, and international market share.

[0094] That is to say, for these two 12-dimensional data, the first set of feature information is the first 6 types of feature information of the 12-dimensional data, and the second set of feature information is the last 6 types of feature information of the 12-dimensional data.

[0095] The advantage of doing this is that it ensures that the type of feature information used and its order are consistent when encoding different data, maintains the consistency and standardization of data processing, and facilitates subsequent analysis and comparison.

[0096] Each m-dimensional data set is encoded using a unique sequence of characteristic information. The type and order of these characteristic information remain consistent across different data sets, but vary between different sets of characteristic information within the same data set. This approach enables efficient processing and analysis of high-dimensional data in quantum computing. Because high-dimensional data is represented using a small number of quantum bits, processing speed and efficiency can be significantly improved. Furthermore, the multiple sets of characteristic information capture the characteristics of the data from multiple perspectives, providing a more comprehensive perspective for complex data analysis scenarios such as financial analysis. The quantum kernel matrix provides a tool for rapidly comparing and analyzing the similarities of large amounts of data, which is extremely valuable in stock analysis, credit scoring, and other data analysis fields.

[0097] For example, consider 12-dimensional stock data on five companies (Companies A, B, C, D, and E) in the financial market. This data includes 12 characteristic features, including each company's stock price, trading volume, price-to-earnings ratio, price-to-book ratio, debt ratio, dividend yield, net profit growth rate, number of employees, annual sales, R&D expenses, domestic market share, and international market share. Using a specially designed quantum circuit, the 12-dimensional data for Companies A and B is encoded into six qubits. After processing by the quantum circuit, these six qubits are measured, and the corresponding quantum kernel inner product of Company A and Company B is calculated. Similarly, the same processing is performed on other data combinations to obtain the quantum kernel inner product of the 12-dimensional data for any two companies. This process is then combined to create a 5×5 quantum kernel matrix. This matrix provides information on the similarity between the five companies' stock data, thereby assisting financial analysts in making more accurate investment decisions.

[0098] In some embodiments, during the encoding process of the first m-dimensional data and the second m-dimensional data, the order of action of each group of quantum gates is as follows: first, applying the conjugate transpose operation from the first group of quantum gates corresponding to the first m-dimensional data to the k-th group of quantum gates, and then applying the conjugate transpose operation from the k-th group of quantum gates corresponding to the second m-dimensional data to the first group of quantum gates; or, alternately applying the conjugate transpose operation from the first group of quantum gates corresponding to the first m-dimensional data to the k-th group of quantum gates and the conjugate transpose operation from the first group of quantum gates corresponding to the second m-dimensional data to the k-th group of quantum gates.

[0099] Applying the conjugate transpose operation of first applying the first set of quantum gates corresponding to the first m-dimensional data to the kth set of quantum gates, and then applying the conjugate transpose operation of the kth set of quantum gates corresponding to the second m-dimensional data to the first set of quantum gates, means first applying the corresponding quantum gate operations (in order from 1 to k) based on the k sets of characteristic information of the first m-dimensional data, and then applying the conjugate transpose operation of the k sets of quantum gate operations (in order from k to 1) of the second m-dimensional data. For example, m = 18, n = 6, and k = 3, and the first and second 18-dimensional data are denoted as data A and data B, respectively, the order of applying the quantum gates is: the first set of quantum gates corresponding to data A, the second set of quantum gates corresponding to data A, the third set of quantum gates corresponding to data A, the conjugate transpose operation of the third set of quantum gates corresponding to data B, the conjugate transpose operation of the second set of quantum gates corresponding to data B, and the conjugate transpose operation of the first set of quantum gates corresponding to data B. This order of application achieves combined encoding of the first and second m-dimensional data on a quantum circuit. In this way, the two m-dimensional data are effectively entangled and correlated at the quantum level, facilitating subsequent similarity or inner product calculations.

[0100] Alternating the conjugate transpose operations from the first set of quantum gates corresponding to the first m-dimensional data to the kth set of quantum gates and from the first set of quantum gates corresponding to the second m-dimensional data to the kth set of quantum gates means alternating the conjugate transpose operations of the k sets of quantum gates corresponding to the first m-dimensional data and the k sets of quantum gates corresponding to the second m-dimensional data. For the aforementioned data A and data B, the order of application of the various sets of quantum gates is: the conjugate transpose operations of the first set of quantum gates corresponding to data A and the first set of quantum gates corresponding to data B, the conjugate transpose operations of the second set of quantum gates corresponding to data A and the second set of quantum gates corresponding to data B, and the conjugate transpose operations of the third set of quantum gates corresponding to data A and the third set of quantum gates corresponding to data B. This order of application also achieves combined encoding of two m-dimensional data, but in an alternating manner. This alternating approach can provide a different data representation than the previous method, thereby facilitating better classification or prediction results in specific application scenarios.

[0101] In quantum computing, the way data is encoded directly affects its subsequent computing performance. The above method provides two unique encoding methods, both of which focus on combining the characteristics of two m-dimensional data. The first method first completely encodes the first m-dimensional data and then encodes the second m-dimensional data; while the second method encodes the two data alternately. Regardless of which method is used, the purpose is to create a composite state on the quantum circuit that reflects the characteristics of the two data, thereby providing a basis for further quantum kernel inner product calculations and machine learning tasks. These two encoding methods can capture the complex relationships between data and facilitate inner product or similarity calculations in the context of quantum computing. In addition, different encoding methods may be suitable for different tasks or data sets, thereby providing greater flexibility and choice space for quantum machine learning, bringing more accurate and efficient prediction and classification results, especially when dealing with high-dimensional and complex data sets.

[0102] Taking the financial field as an example, suppose there is financial data of two companies A and B (data A and data B).

[0103] The first encoding method: First, apply the first set of quantum gates corresponding to the first set of characteristic information of data A, and then apply the second set of quantum gates corresponding to the second set of characteristic information of data A. Next, apply the conjugate transpose operation of the second set of quantum gates corresponding to the second set of characteristic information of data B, and then apply the conjugate transpose operation of the first set of quantum gates corresponding to the first set of characteristic information of data B.

[0104] The second encoding method: first apply the first group of quantum gates corresponding to the first group of characteristic information of data A, then apply the conjugate transpose operation of the first group of quantum gates corresponding to the first group of characteristic information of data B, then apply the second group of quantum gates corresponding to the second group of characteristic information of data A, and then apply the conjugate transpose operation of the second group of quantum gates corresponding to the second group of characteristic information of data B.

[0105] Regardless of the method used, the goal is to create a composite state on the quantum circuit that can reflect the financial status of the two companies, providing a basis for subsequent analysis and comparison.

[0106] In some embodiments, in the set formed by the 1st group of feature information to the kth group of feature information of the m-dimensional data, each type of feature information in the m types of feature information appears 0 times, 1 time, or multiple times.

[0107] The number of occurrences of different types of feature information may be the same or different.

[0108] The set formed by the first set of feature information to the kth set of feature information refers to a set of k sets of feature information selected from the m-dimensional data.

[0109] The number of occurrences of each feature information refers to the number of times each feature information appears in the selected k sets of feature information. For example, if the feature information [income] appears in all three sets of feature information, its number of occurrences is 3.

[0110] 0, 1, and multiple are specific occurrence values. 0 means that a feature does not appear in any of the k selected feature information sets; 1 means that a feature information only appears in one set of feature information; and multiple means that a feature information appears in two or more sets of feature information.

[0111] This method, based on quantum computing technology, utilizes multiple sets of feature information to improve the efficiency and flexibility of data encoding. By subdividing the features of m-dimensional data into multiple sets of feature information, quantum encoding strategies can be more targeted for different sets of feature information, ensuring that the information content of key features is better preserved. Furthermore, this method can reduce data dimensionality while maintaining information integrity (when each feature information appears once or multiple times), thereby improving computational accuracy.

[0112] First, this multi-set feature information strategy allows for targeted quantum encoding of different data features, enhancing the flexibility of data encoding and ensuring the efficient transmission of key information. Second, for complex m-dimensional data, this approach can significantly reduce the quantum resource requirements (number of bits, circuit depth), thereby improving the efficiency of quantum computing.

[0113] In a financial risk assessment scenario, assume that each customer has a set of 12-dimensional data, including age, occupation, income, liabilities, credit score, deposits, investments, housing status, education, marital status, number of children, and work experience. Now, the 12-dimensional data of any two customers is encoded into 6 qubits. For each 12-dimensional data set, four sets of feature information are selected, i.e., k = 4. The first set of feature information is [age, occupation, income, liabilities, credit score, deposits], the second set is [income, liabilities, credit score, deposits, investments, housing status], the third set is [deposits, investments, housing status, education, marital status, number of children], and the fourth set is [education, marital status, number of children, work experience, credit score, investments]. In these sets of feature information, [age] and [occupation] each appear once, [income] appears twice, and [credit score] appears three times. For the 12-dimensional data corresponding to any two customers (customer A and customer B), the corresponding quantum gate parameters are determined for the 6 quantum bits 4 times in succession based on the eigenvalues ​​of the 4 sets of characteristic information of customer A. Then, the corresponding quantum gate parameters are determined for the 6 quantum bits 4 times in succession based on the eigenvalues ​​of the 4 sets of characteristic information of customer B, thereby realizing data encoding of two 12-dimensional data through quantum circuits.

[0114] In high-dimensional data computation, the selection and processing of feature information is crucial for computational efficiency and result accuracy. For m types of feature information, the number of times different features appear can reflect their importance.

[0115] For features that appear 0 times in the set, this type of feature information does not appear in the set of k selected feature information. Generally speaking, this means that these features are not particularly important for the prediction model or calculation, or they have high collinearity with other features. Therefore, they can be safely excluded to reduce the dimensionality of the data. The benefit is that this can effectively reduce computational complexity, speed up model training and prediction, and reduce the risk of model overfitting.

[0116] Each feature appears only once, meaning it appears exactly once in the set of k feature groups. This ensures that each feature provides unique information to the model without redundancy. This balanced feature processing strategy ensures data integrity and representativeness, helping the model capture all potential patterns in the data and improving computational efficiency by eliminating unnecessary recalculation.

[0117] For feature information that appears multiple times in a set, it appears in multiple sets of feature information, which generally means that this feature information is very important. For example, in financial risk assessment, credit score is a key indicator and may be selected into multiple sets of feature information. The advantage is that the multiple use (reuse) of these key feature information ensures that the model can fully utilize the information it provides and strengthen its impact on the prediction target. In addition, when the data length needs to be padded, these key features can be given priority consideration to ensure that key information is not missed and improve the model's prediction accuracy.

[0118] In some embodiments, when m / n is an integer, k=m / n, and the i-th group of feature information corresponds to the (i-1)n+1-th feature information to the in-th feature information.

[0119] An integer m / n means that m-dimensional data can be evenly divided into multiple subsets of size n. For example, in a financial scenario, if m = 12 and n = 6, then 12 / 6 = 2, an integer. This ensures that feature information is evenly distributed, with each set containing n features. The benefit is that this even feature division helps maintain data consistency and balance during encoding and computation.

[0120] k = m / n, where k represents the number of feature sets. It is calculated by dividing the dimension m of m-dimensional data by the number of features per set n. For example, if m = 12 and n = 6, k = 12 / 6 = 2, resulting in a total of two feature sets. Its purpose is to determine the total number of feature sets required. The benefit is that it provides a clear framework for feature grouping, making data processing and encoding more organized.

[0121] The i-th group of feature information corresponds to the (i-1)n+1th feature information to the inth feature information, and is used to clearly specify the range of feature information contained in the i-th group of feature information. Taking m=12 and n=6 as an example, for the first group of feature information (i=1), the feature range is (1-1)*6+1=1 to 1*6=6, that is, the first to the sixth feature information; for the second group of feature information (i=2), the feature range is (2-1)*6+1=7 to 2*6=12, that is, the seventh to the twelfth feature information. Its function is to sort the feature information in the m-dimensional feature information and accurately determine the range of feature information contained in each group of feature information. The advantage is that it ensures that the data range of each group of feature information is clear, which facilitates accurate data processing and encoding.

[0122] In complex data analysis scenarios, such as those in the financial sector, multidimensional data often needs to be processed and analyzed. Within a set of multidimensional data, the dimensions of the feature information may exceed 50 (i.e., m > 50). The above method provides a uniform and orderly way to partition this feature information. When the total number of feature information in m-dimensional data is divisible by n, the feature information is evenly partitioned into k groups, where k = m / n. Each group of feature information contains n types of feature information. The parameters of the quantum gate corresponding to n qubits are determined based on these n types of feature information, providing a corresponding basis for determining the quantum gate parameters for subsequent quantum encoding and calculations. The advantage of this method is that through uniform and clear feature partitioning, each feature information in the m-dimensional data is processed once during the encoding process, and all features of the same m-dimensional data receive equal processing opportunities, thus avoiding data bias or imbalance. Furthermore, each group of feature information provides a clear basis for dividing the data range, making data processing simpler, more direct, and more accurate. In financial analysis, this precision and consistency can help improve the accuracy of predictions and decisions.

[0123] For example, at a financial institution, analysts need to predict future stock market behavior. Each m-dimensional data set contains 12 types of feature information (m = 12), such as past stock prices, trading volume, and macroeconomic indicators. First, n = 6 is selected, with each set of feature information containing 6 features, for a total of 2 sets of feature information (k = 2). The first set of feature information contains features 1 through 6, and the second set of feature information contains features 7 through 12. This method allows all features to be processed and encoded clearly and orderly, laying a solid foundation for subsequent quantum computing.

[0124] In some embodiments, when m / n is a non-integer, k is the result of rounding up m / n, and the i-th group of feature information corresponds to the (i-1)n+1th feature information to the inth feature information. In the k-th group of feature information, the m+1th feature information to the knth feature information use any kn-m of the m types of feature information.

[0125] A non-integer m / n means that the result of dividing the dimension m of m-dimensional data by the number of feature information per group n is not an integer. For example, in a financial scenario, if m = 15 and n = 6, then 15 / 6 = 2.5, which is not an integer. This extends the application scope of the data encoding method, making it applicable to both cases where m is divisible by n and cases where m is not divisible by n. The benefit is that it allows for flexible adjustments when feature information is not evenly distributed, ensuring that all information is encoded.

[0126] k is the result of rounding up m / n. That is, when m / n is a non-integer, k is rounded up to the nearest integer. For example, if 15 / 6 = 2.5, k is 3. Its purpose is to provide a clear indication of the number of feature information groups. The benefit is that it ensures that each feature information group has a clear data range.

[0127] In the kth set of feature information, the m+1th through knth feature information utilize any kn-m of the m types of feature information. This is a special treatment for the last set of feature information (the kth set). When m / n is a non-integer, the last set of feature information is incomplete, so this section provides a method for selecting and filling in feature information. In the example of m=15 and n=6, if each type of feature information appears once in the three sets of feature information (k=3), 18 types of feature information are required. However, 15-dimensional data actually has only 15 types of feature information, so the third set of feature information will only have 3 types of feature information, unlike the first two sets of feature information, which cannot reach 6. Therefore, the 16th through 18th feature information utilize any 3 of the 15 types of feature information in the 15-dimensional data, such as the 1st through 3rd features, or the 2nd, 6th, and 8th features. This serves to provide feature selection guidance for the incomplete last set of feature information. The benefit is that each set of feature information contains the same number (n) of feature information, even if the data cannot be evenly partitioned.

[0128] In complex data analysis, such as in the financial field, the amount of feature information cannot always be evenly divided. To address this problem, this embodiment adopts a flexible method to divide the feature information into multiple subsets of size n, until the last incomplete subset, and then select the missing feature information from the previously divided feature information and reuse it to fill the last subset. The range of each set of feature information is clearly defined, and the incomplete last set of feature information is completed by selecting any feature information from the m types of feature information in the m-dimensional data. The advantages of this method are: first, it allows for flexible organization of feature information. Even if the total number of feature information cannot be evenly divided, it ensures that all feature information is encoded at least once (reused feature information is encoded twice), ensuring that data feature information is not lost, and providing multiple sets of feature information for subsequent quantum bit processing, each set of feature information containing n types of feature information. In addition, it provides structure and consistency for data processing, reduces the possibility of errors, and improves data processing efficiency. In financial analysis, this structured feature encoding method can improve the accuracy and reliability of the model, thereby helping financial institutions make more informed decisions.

[0129] For example, a financial institution collects 15-dimensional data (m = 12) on companies, such as stock prices, trading volumes, and interest rates, to predict future stock performance. Each set of feature information contains five types of information (n = 5). Since 12 / 5 = 2.4, k = 3, for a total of three sets of feature information. The first two sets each contain five types of information, but the last set is only assigned two types of information. Therefore, any three types of information are selected from the 12 types of information in the 12-dimensional data to fill in the third set of feature information. This filling is performed separately for the two m-dimensional data sets, so that each of the three sets of feature information corresponding to the m-dimensional data contains five types of information. In this way, all the feature information can be encoded and can provide a basis for determining the corresponding quantum gate parameters.

[0130] In some embodiments, in the kth group of feature information, the (m+1)th feature information to the (kn)th feature information adopt the first (kn-m) of the m types of feature information.

[0131] The m+1th through knth feature information uses the first kn-m of the m types of feature information. This means that when the last set of feature information is incomplete (the number of remaining feature information is less than n), in order to fill in the kth set of feature information, feature information is selected from the beginning of the m-dimensional data to ensure the integrity of the last set of feature information. Consider the scenario where m = 12 and n = 5. Rounding up 12 / 5 is 3, which means there are three sets of feature information. In the third set of feature information, two types of feature information, 11 and 12, are already present, and three more types of feature information need to be filled in. Therefore, the first three types of feature information are selected from the beginning of the m-dimensional data.

[0132] In data analysis scenarios, each feature of m-dimensional data carries information that has a significant impact on the prediction results. When the data dimensions cannot be evenly divided into each set of feature information, it is sometimes necessary to ensure that all feature information is encoded. When the last set of feature information is incomplete, feature information is selected again from the beginning of the m-dimensional data to complete the last set of feature information so that it contains n types of feature information. This flexible data encoding method helps to fully utilize all data feature information, thereby enhancing the accuracy and robustness of the model. For each of the two m-dimensional data, each feature information is encoded into the quantum state of the quantum bit. Regardless of its position in the m-dimensional data, this ensures that no feature information of the m-dimensional data is lost and the integrity of the m-dimensional data is maintained. In addition, this method provides an efficient and unified way to process m-dimensional data of different dimensions, making the data encoding process more flexible and adaptable, allowing data analysis organizations to quickly and accurately predict on different data sets.

[0133] For example, suppose an analyst at a financial institution is using 12-dimensional data (such as stock prices, trading volume, and average returns over the past 12 months) to predict future stock performance. To do this, these 12 features need to be grouped and encoded. Since each group contains five features, the first two groups contain features 1 through 5 and 6 through 10, respectively. By the third group, there are only two features, 11 and 12, which is less than five. To reach five features, the first three features are selected from the 12-dimensional data to fill the gap. Therefore, the third group includes features 11, 12, 1, 2, and 3. This method ensures that all features of the two m-dimensional data are encoded into the quantum state of the qubit, providing a complete basis for determining the quantum gate parameters for the quantum prediction process.

[0134] The embodiments of the present application do not limit the number and type of quantum gates in the quantum circuit, which may include, for example, any one or more known quantum gates.

[0135] In some embodiments, the quantum circuit includes one or more of an H-gate, a controlled RY-gate, and a controlled Z-gate.

[0136] The H gate (Hadamard gate) is a single-qubit logic gate in quantum computing that can map the ground state to the superposition state. The H gate acts on the quantum state |0> to produce the state Acting on |1> will produce the state H-gates are often used to create superposition states. In quantum algorithms, superposition is key to performing parallel operations, and H-gates provide a simple way to achieve this superposition.

[0137] The controlled RY gate is a single-qubit logic gate that applies an RY rotation to the qubit, a controlled rotation operation. For example, RY(0.142) applies a 0.142 (rad) rotation (approximately 8.136 degrees) to the qubit. This gate provides a conditional rotation of the quantum state, introducing a rotation angle based on the value of a characteristic information. This is used to encode the characteristic information and rotate the qubit's phase.

[0138] The controlled Z gate is a two-qubit logic gate. When the control qubit is in the |1> state, a Z operation (also known as the Pauli-Z operation) is applied to the target qubit, creating a controlled phase flip. For example, if the control qubit is |1>, the controlled Z gate flips the phase of the target qubit. This provides a conditional phase flip in the quantum state.

[0139] The quantum circuit includes one or more of an H gate, a controlled RY gate, and a controlled Z gate, which means that any of the above gates or a combination thereof may be used when designing a quantum circuit.

[0140] See also Figure 2a and Figure 2b , Figure 2a and Figure 2b These are the first and second parts of a schematic diagram of a structure of a quantum circuit provided in an embodiment of the present application.

[0141] As shown in Figure 2, in a quantum circuit corresponding to a quantum kernel function, six qubits are used to encode two 12-dimensional data (data A and data B), where m = 12, n = 6, and k = 2. Specifically, the following processing is performed on the six qubits (i.e., q0, q1, q2, q3, q4, and q5):

[0142] Applying the first H gate to each quantum bit produces a superposition state; the action sequence of the first H gates corresponding to q0 to q5 is simultaneous;

[0143] A first controlled RY gate is applied to each qubit for controlled rotation, wherein the rotation parameters of the first controlled RY gates corresponding to q0 to q5 are determined according to the 1-6 features of data A; the correspondence between q0 to q5 and the 1-6 features of data A is sequential and one-to-one; the action sequence of the first controlled RY gates corresponding to q0 to q5 is simultaneous;

[0144] The first controlled Z gate is applied to every two adjacent quantum bits for controlled phase flipping; the action timing corresponding to q0~q5 is sequential; the control bit corresponding to q0 is q1, the control bit corresponding to q1 is q2, and so on, the control bit corresponding to q6 is q0.

[0145] A second controlled RY gate is applied to each qubit for controlled rotation, wherein the rotation parameters of the second controlled RY gates corresponding to q0 to q5 are determined according to the 7-12 characteristics of data A; the correspondence between q0 to q5 and the 7-12 characteristics of data A is sequential and one-to-one; the action timing of the second controlled RY gates corresponding to q0 to q5 is simultaneous;

[0146] Apply the second controlled Z gate to every two adjacent quantum bits to perform controlled phase flipping; the action timing corresponding to q0~q5 is sequential;

[0147] Apply the third controlled Z gate to every two adjacent quantum bits to perform controlled phase flipping; the action sequence corresponding to q0~q5 is in reverse order;

[0148] A conjugate transpose operation of the third controlled RY gate is applied to each qubit for controlled rotation, wherein the rotation parameters of the third controlled RY gates corresponding to q0 to q5 are determined according to the 7-12 characteristics of data B; the correspondence between q0 to q5 and the 7-12 characteristics of data B is sequential and one-to-one; the conjugate transpose operations of the third controlled RY gates corresponding to q0 to q5 are applied simultaneously;

[0149] Apply the fourth controlled Z gate to every two adjacent quantum bits to perform controlled phase flipping; the action sequence corresponding to q0~q5 is in reverse order;

[0150] A conjugate transpose operation of the fourth controlled RY gate is applied to each qubit for controlled rotation, wherein the rotation parameters of the fourth controlled RY gates corresponding to q0 to q5 are determined according to the 1-6 features of data B; the correspondence between q0 to q5 and the 1-6 features of data B is sequential and one-to-one; the conjugate transpose operations of the fourth controlled RY gates corresponding to q0 to q5 are applied simultaneously;

[0151] A second H gate is applied to each quantum bit to return it from the superposition state to the ground state; the action sequence of the second H gates corresponding to q0~q5 is simultaneous.

[0152] In quantum simulators, the conjugate transpose operation can be implemented using the dagger(·) function in pyqpandas. The dagger(·) function is used to perform a conjugate transpose operation on a quantum gate. In quantum computing, a quantum gate can be represented as a matrix, and performing a conjugate transpose operation on a quantum gate yields the conjugate transpose matrix of the quantum gate.

[0153] A quantum circuit is a collection of quantum gates used to manipulate information on qubits. For example, when building a quantum algorithm for financial forecasting, different combinations of quantum gates can be selected based on the data and algorithm requirements. H-gates, controlled RY-gates, and controlled Z-gates provide the ability to create superposition states, controlled rotations, and controlled phase flips, enabling the encoding of complex data structures, such as financial data, and the execution of highly parallel quantum computations.

[0154] In some embodiments, measuring the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space includes:

[0155] The encoded n quantum bits are measured multiple times to obtain the probability value of one of the ground states as the quantum kernel inner product of the two encoded m-dimensional data.

[0156] The quantum system corresponding to one of the ground states is a quantum system composed of the n qubits. The embodiments of the present application do not limit the selected ground state, for example, it can be a ground state of all 0s, or a ground state of all 1s, or a ground state of some 0s and some 1s.

[0157] In quantum computing, the ground state is the fundamental state in a quantum system. The number of ground states corresponding to n qubits is 2 n , that is, for n qubits, there are 2 nOne of the possible ground states. For example, for n = 6 qubits, one of the possible ground states is |101001>.

[0158] The probability value of one of the ground states obtained by measuring the encoded n qubits multiple times is a quantum statistical process, that is, repeatedly measuring the n qubits after a specific encoding operation to count the frequency of a specific ground state, so as to obtain the probability of the ground state. For example, assuming that two m-dimensional data are used to encode 6 qubits, and the encoded 6 qubits are measured 1000 times, and it is found that the specific ground state |101001> appears 200 times. Therefore, the probability value of this ground state is 200 / 1000 = 0.2, and 0.2 is taken as the quantum inner product of the encoded 2 m-dimensional data.

[0159] The probability value of a specific ground state obtained by measurement can obtain the quantum inner product of two m-dimensional data, which is the embodiment of the advantage of quantum computing, and provides an efficient method to calculate the similarity of high-dimensional data. Traditional kernel function calculation can be very complex and time-consuming in high-dimensional space, while through quantum computing, the estimate value of the kernel function can be directly obtained in the multi-state quantum state, greatly improving the efficiency and accuracy. When two m-dimensional data are encoded on a quantum computer or quantum simulator, these data will exhibit their relationship in a specific way in Hilbert space. This relationship can be quantified by measuring the probability of a specific ground state. In the multi-state of the quantum state, all possible ground states can exist, but the probability of each ground state is different. By measuring the encoded n qubits multiple times, the frequency of a specific ground state can be counted, and the quantum inner product of the two m-dimensional data can be estimated.

[0160] By using the characteristics of quantum computing, the estimate value of the kernel function can be directly obtained in the multi-state quantum state, which is much more efficient than the traditional method of calculating in high-dimensional data space. Moreover, this method of quantum computing provides a deeper understanding of the relationship between data, making it more accurate to identify and utilize data characteristics in machine learning and classification algorithms, so as to achieve better analysis and prediction results in many fields such as finance, medicine, energy, etc.

[0161] Taking the financial field as an example, two companies A and B correspond to 2 51-dimensional financial data, m = 51, n = 5, and k = 11. After encoding by the quantum circuit, the two data are encoded into 5 quantum bits (part of the feature information needs to be multiplexed). After 10,000 measurements, the ground state |00000> appears 3,000 times, and the probability value of the ground state is 0.3. This probability value is used as an estimate of the quantum inner product of the financial data of companies A and B in the Hilbert space. This method provides an efficient way to compare and analyze the financial health of the two companies, providing a new and efficient tool for financial analysts to make decisions and predictions.

[0162] In one specific application scenario, the embodiment of the present application also provides a quantum kernel method for compressing the number of bits, applied to a quantum computer or a quantum simulator, and the method comprises:

[0163] encoding any two m-dimensional data in a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, m and n are positive integers, and m > n; the kernel function is k(x, x') = | < φ(x) | φ(x') > |, the m-dimensional data include m different types of feature information; and the quantum circuit includes one or more of an H gate, a controlled RY gate and a controlled Z gate;

[0164] performing multiple measurements on the encoded n quantum bits to obtain a probability value of one of the ground states, as a quantum inner product of the two encoded m-dimensional data, thereby obtaining a quantum kernel matrix corresponding to the plurality of m-dimensional data.

[0165] Taking any two m-dimensional data in a plurality of m-dimensional data as first m-dimensional data and second m-dimensional data, the encoding process of the first m-dimensional data and the second m-dimensional data comprises: applying an i-th group of quantum gates corresponding to the first m-dimensional data to the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit; and applying a conjugate transpose operation of an i-th group of quantum gates corresponding to the second m-dimensional data to the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the quantum circuit; wherein the number of each group of quantum gates is n, each group of quantum gates corresponds to one of the n quantum bits, the parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of feature information of the m-dimensional data, the i-th group of feature information of the m-dimensional data includes n types of feature information selected from the m types of feature information of the m-dimensional data, the value range of i is 1 to k, k is an integer greater than 1, and the types of feature information in different groups of feature information corresponding to the same m-dimensional data are not completely the same, and the types and orders of feature information in the same group of feature information corresponding to any two m-dimensional data are completely the same.

[0166] In the encoding process of the first m-dimensional data and the second m-dimensional data, the order of action of each group of quantum gates is as follows: first, the conjugate transpose operation of the first group of quantum gates corresponding to the first m-dimensional data to the k-th group of quantum gates is applied, and then the conjugate transpose operation of the k-th group of quantum gates corresponding to the second m-dimensional data to the first group of quantum gates is applied; or, the conjugate transpose operation of the first group of quantum gates corresponding to the first m-dimensional data to the k-th group of quantum gates and the conjugate transpose operation of the first group of quantum gates corresponding to the second m-dimensional data to the k-th group of quantum gates are applied alternately.

[0167] In the set formed by the 1st to kth groups of feature information of the m-dimensional data, each type of feature information in the m types of feature information appears one or more times. When m / n is an integer, k=m / n, and the i-th group of feature information corresponds to the (i-1)n+1th to the inth feature information. When m / n is a non-integer, k is the result of rounding up m / n, and the i-th group of feature information corresponds to the (i-1)n+1th to the inth feature information. In the k-th group of feature information, the m+1th to the knth feature information use the first kn-m of the m types of feature information.

[0168] The above-mentioned quantum kernel method can introduce parameterized quantum circuits to optimize the form of the kernel function. By training the parameterized quantum circuits, a kernel function that is more optimized for specific tasks can be achieved, thereby improving the performance of the overall method. For each set of feature information selection steps for m-dimensional data, dynamic feature selection techniques based on classical machine learning or quantum machine learning can be used to encode only the most representative features, thereby improving computational efficiency. This method can be combined with classical algorithms to form a hybrid quantum-classical method. For example, classical machine learning techniques are first used for preliminary screening or classification, and then a quantum computer is used for precise calculation. In practical applications, this technical solution can be extended to multimodal data processing. For example, in the financial field, there may be not only digital data, but also text, images, and other data. Fusion of these different types of data and use of quantum coding can provide richer information. Although this will undoubtedly result in a very high dimensionality of each data, this method is particularly suitable for encoding high-dimensional data and quantum kernel inner product calculation, which can precisely give full play to the computational advantages of this method.

[0169] The quantum kernel method of compressing the number of qubits effectively represents complex multi-dimensional data feature information by reducing the number of qubits, and then accurately calculates the quantum kernel inner product in Hilbert space to generate an accurate quantum kernel matrix. It can improve the computing efficiency and data processing speed while preserving all feature information, and is particularly suitable for scenarios that need to process large amounts of high-dimensional feature data, such as complex financial analysis and prediction models. Currently, quantum computing technology faces challenges in operation efficiency and memory usage when processing high-dimensional data. For example, in the financial field, interest rate prediction models often need to process more than 50 features, resulting in slow and inefficient operation of existing quantum kernel methods on simulators. In addition, the current quantum computing framework does not have an effective kernel method to handle such problems. The quantum kernel method provided in this embodiment effectively encodes high-dimensional data features into a limited number of qubits through innovative quantum bit compression encoding technology. Each quantum bit can encode multiple feature information, such as sequentially and cyclically encoding feature information into a predetermined number of quantum bits. In the case of an uneven division, the padding strategy is used to supplement the original data feature information to the required length, ensuring that each quantum bit performs feature encoding consistently, such as cyclically using the original feature information to fill the length required by the number of bits, thereby accurately calculating the quantum kernel inner product in Hilbert space.

[0170] Compared with traditional quantum kernel methods, the running time of the quantum kernel method of compressing the number of qubits is only about half of that of the traditional scheme when processing the same task and data volume, significantly shortening the operation time and improving the computing efficiency, demonstrating its significant efficiency advantage. Through the above compression encoding strategy, the number of qubits required can be significantly reduced while maintaining the integrity of the data feature information. The padding strategy effectively handles the mismatch between the number of features m and the number of bits n, ensuring the accuracy and efficiency of the quantum kernel method.

[0171] This technical solution can be widely applied to quantum computers or quantum simulators, and is particularly suitable for scenarios that need to process large amounts of high-dimensional feature data. By effectively compressing the number of qubits, this scheme not only significantly improves the computing efficiency and data processing speed, but also avoids memory overflow and other problems while preserving all feature information, ensuring the accuracy and stability of the calculation. In addition, the flexibility and scalability of this scheme make it easily adaptable to different types and sizes of data processing tasks, with wide application prospects and great commercial value, which is conducive to promoting the application of quantum computing in finance, bioinformatics, artificial intelligence, and other fields. Its unique compression technology and high-efficiency computing performance will make the processing of complex high-dimensional data more rapid and accurate, helping enterprises and research institutions achieve a qualitative leap in data analysis, prediction model establishment, complex system simulation, and other aspects.

[0172] (Classification method)

[0173] See also Figure 3 , Figure 3 It is a flow chart of a classification method provided in an embodiment of the present application.

[0174] The embodiment of the present application also provides a classification method, the specific implementation method of which is consistent with the implementation method and the technical effects achieved in the above method embodiment, and some contents will not be repeated here.

[0175] The classification method is applied to a classical computer, and includes steps S201 to S202.

[0176] Step S201: training a classifier according to a quantum kernel matrix; during the training of the classifier, a kernel function in an objective function is determined according to a corresponding quantum kernel inner product in the quantum kernel matrix.

[0177] Step S202: Use the trained classifier to perform a classification task.

[0178] The quantum kernel matrix is ​​obtained by using any of the above-mentioned quantum kernel methods for compressing the number of bits.

[0179] Training a classifier based on a quantum kernel matrix refers to using the quantum kernel matrix obtained through quantum computing to train the classifier model in machine learning. For example, the support vector machine (SVM) is a commonly used classifier that can be trained using a quantum kernel matrix.

[0180] The embodiments of the present application do not limit the type of classifier. In addition to SVM, it can also be decision tree, random forest, logistic regression, neural network, k-nearest neighbor, naive Bayes, gradient boosting machine, deep learning network, support vector data description (SVDD), etc.

[0181] The classifier training process involves optimizing its parameters using a training dataset. Through continuous iteration, the classifier's predictions gradually approach the actual labels. Training a classifier helps it capture patterns and regularities in the data, enabling it to achieve good predictions on unknown data.

[0182] The objective function includes a kernel function, which is used in machine learning to calculate the similarity between two inputs. By using the kernel function, the similarity between data can be calculated in a high-dimensional space, so that data that is linearly inseparable in the original space becomes linearly separable or approximately linearly separable in the high-dimensional space. The kernel function in the objective function is determined based on the corresponding quantum kernel inner product in the quantum kernel matrix, which means that the calculation of the kernel function is based on the value of the quantum kernel matrix. This method combines the advantages of quantum computing and can calculate the kernel function value more accurately and efficiently. In this embodiment, the kernel function can be expressed as: k(x, x′) = |<φ(x)|φ(x′)>|. This kernel function is called a quantum kernel or quantum kernel inner product. In this kernel function, k(x, x′) represents the inner product between two input samples x and x′, where <φ(x)| represents the mapping of sample x to the quantum state φ(x) in a certain high-dimensional feature space, and <φ(x′)| represents the mapping of sample x′ to the quantum state φ(x′) in the same feature space. Then, taking the modulus of the inner product of these two quantum states, the value of the kernel function is obtained. The benefit of this kernel function is that it maps input samples into a high-dimensional feature space while leveraging the inner product and superposition properties of quantum computing, making computations in high-dimensional feature spaces more efficient and applicable to solving complex problems in classical computing, such as classification, regression, and clustering. This kernel function can be used in quantum machine learning, where the properties of quantum computing are leveraged to improve the performance of data analysis and pattern recognition tasks. Quantum kernel methods can more efficiently process high-dimensional data and improve model performance.

[0183] A classification task is the task of predicting the category of data with unknown labels. After completing a classification task, it can provide a basis for decision-making, such as risk assessment in the financial sector. The present application embodiments are not limited to classification tasks; for example, classification tasks can be performed in scenarios such as finance, medical diagnosis, biopharmaceutical research and development, transportation, weather forecasting, and energy exploration.

[0184] In this embodiment, quantum computing technology is used to efficiently obtain a quantum kernel matrix on a quantum computer or quantum simulator. Subsequently, the quantum kernel matrix is ​​used to train a classifier on a classical computer. During the training process of the classifier, the calculation of the kernel function is based on the value of the quantum kernel inner product in the quantum kernel matrix. In this way, even in high-dimensional space, the similarity between data points can be efficiently calculated. This method that combines quantum computing and classical machine learning fully utilizes the advantages of both to achieve efficient and accurate classification tasks. This method combines quantum computing technology with classical machine learning, which not only greatly improves the efficiency of data classification, but also improves the accuracy of classification. For example, in the financial field, large amounts of complex transaction data can be quickly analyzed and market trends or customer credit risks can be accurately predicted. In addition, this method can also be extended to other fields such as medical care, energy and transportation, bringing broad economic and social value.

[0185] Taking the financial sector as an example, a financial institution has a large amount of 12-dimensional data on its customers, such as their annual income, credit history, and employment status. The institution hopes to quickly and accurately determine the credit risk of its customers. Using the above method, each 12-dimensional data is first encoded into 6 quantum bits through a specific quantum circuit on a quantum simulator. After obtaining the quantum kernel matrix, the quantum kernel matrix is ​​used to train an SVM classifier on a classical computer, where the kernel function is calculated based on the inner product of the quantum kernel matrix. The trained classifier can be used to predict the credit risk of new customers. For example, if a new customer's 12-dimensional data includes an annual income of 70,000, a good credit history, and 5 years of work experience, the classifier will predict that the new customer is a "low-risk" customer.

[0186] Taking the medical field as an example, in a medical imaging diagnostic scenario, the goal is to accurately classify a patient's medical imaging data, such as MRI, X-ray, or CT scans, as a tumor, and further determine whether the tumor is benign or malignant. For example, after processing the medical imaging data, 12-dimensional patient data is obtained, including: image brightness uniformity, tumor size, tumor shape, tumor boundary clarity, tumor texture, tumor location, relationship with surrounding tissue, tumor color, image contrast, tumor growth rate (derived from sequential scans), presence of hemorrhage or necrosis, and tumor uniformity. First, a preliminary classification is performed to determine whether the patient has a tumor. Then, for patients diagnosed with a tumor, the trained classifier is used to determine whether the tumor is benign or malignant. To train the classifier, a large number of patient medical imaging data are rapidly analyzed, key features are extracted, and quantum encoding and measurement are performed to obtain a quantum kernel matrix. The resulting quantum kernel matrix is ​​then used to train the classifier, where the kernel function is calculated using the quantum kernel inner product. Due to the high accuracy of the classifier, the classification task is more accurate.

[0187] Traditional medical imaging diagnostics can be limited by computing power and data processing speed, especially when dealing with very large data volumes or high-dimensional features. Applying quantum kernel methods can significantly accelerate this process and improve classification accuracy. Furthermore, accurate classification not only provides doctors with more diagnostic information but also enables more timely and accurate treatment recommendations for patients, thereby improving treatment outcomes and patient survival rates.

[0188] (Data encoding method for reducing the number of bits)

[0189] See also Figure 4 , Figure 4 This is a flow chart of a data encoding method for compressing the number of bits provided in an embodiment of the present application.

[0190] An embodiment of the present application provides a data encoding method for compressing the number of bits, which is applied to a quantum chip system or a quantum simulator. The method includes step S301.

[0191] Step S301: Encode m-dimensional data into n quantum bits through a quantum circuit, where m and n are positive integers and m>n.

[0192] In this embodiment, the bit-compressed data encoding method is a data representation method used in quantum computing. It is used to reduce the number of bits required to represent m-dimensional data while minimizing the loss of the data's characteristic information. For example, if the m-dimensional data is [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], this method can fully represent it using only 6 qubits.

[0193] A quantum chip system is a hardware system that integrates a quantum processor and other necessary components to perform quantum computing tasks. For example, Company A's quantum chip system is a quantum chip system with 5 qubits.

[0194] This method uses specialized quantum circuits to encode multidimensional data onto a smaller number of qubits. Leveraging the properties of quantum superposition and entanglement, the characteristic information of high-dimensional data can be represented on a smaller set of qubits. This encoding method not only reduces the resources and computational time required for quantum computing, but also enables efficient representation of multidimensional data with minimal or no loss of data features, providing greater efficiency for the execution of complex quantum algorithms.

[0195] For example, suppose there is an 8-dimensional data [2.3, 4.5, 1.1, 3.2, 5.5, 6.7, 7.8, 8.9] that needs to be encoded on 4 qubits. Through the quantum circuit design of this method, this 8-dimensional data can be encoded into a 4-qubit quantum state, satisfying the conditions m = 8, n = 4, and 8>4.

[0196] In some embodiments, the m-dimensional data includes m different types of feature information;

[0197] The encoding process of the m-dimensional data includes:

[0198] Applying the i-th group of quantum gates corresponding to the m-dimensional data to the n quantum bits according to the parameters of the i-th group of quantum gates corresponding to the m-dimensional data in the quantum circuit;

[0199] The number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to n quantum bits. The parameters of the i-th group of quantum gates corresponding to the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data. The i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data. The value range of i is 1 to k, where k is an integer greater than 1, and the types of characteristic information in different groups of characteristic information corresponding to the m-dimensional data are not exactly the same.

[0200] In some embodiments, in the set formed by the 1st group of feature information to the kth group of feature information of the m-dimensional data, each type of feature information in the m types of feature information appears 0 times, 1 time, or multiple times.

[0201] In some embodiments, when m / n is an integer, k=m / n, and the i-th group of feature information corresponds to the (i-1)n+1-th feature information to the in-th feature information.

[0202] In some embodiments, when m / n is a non-integer, k is the result of rounding up m / n, and the i-th group of feature information corresponds to the (i-1)n+1th feature information to the inth feature information. In the k-th group of feature information, the m+1th feature information to the knth feature information use any kn-m of the m types of feature information.

[0203] In some embodiments, in the kth group of feature information, the (m+1)th feature information to the (kn)th feature information adopt the first (kn-m) of the m types of feature information.

[0204] In some embodiments, the quantum circuit includes one or more of an H-gate, a controlled RY-gate, and a controlled Z-gate.

[0205] For example, for 8-dimensional data [2.3, 4.5, 1.1, 3.2, 5.5, 6.7, 7.8, 8.9], the first 4 characteristic information of this 8-dimensional data is encoded into the quantum state of 4 quantum bits, and the last 4 characteristic information is encoded into the quantum state of 4 quantum bits.

[0206] In this embodiment, after quantum encoding, a step can be introduced to verify the accuracy of the quantum data to ensure that the quantum state has been correctly encoded. In addition to H-gates, controlled RY-gates, and controlled Z-gates, other types of quantum gates, such as T-gates and CNOT-gates, can be introduced to increase the expressiveness and complexity of quantum circuits. In practical applications, in addition to selecting feature information in a specific order, the combination of feature groups can also be dynamically adjusted based on the actual data characteristics and scenarios. Before quantum encoding, the m-dimensional data can be preprocessed and standardized to ensure data standardization and improve the accuracy of quantum encoding. In addition to direct encoding methods, it is also possible to consider embedding the m-dimensional data into a high-dimensional quantum state space and then operating and transforming it through quantum circuits. Based on specific application scenarios, corresponding experiments can be designed to verify the effectiveness and superiority of quantum data encoding. Before practical application, the entire quantum encoding process can be simulated on a classical computer to identify potential problems and optimize them.

[0207] (Quantum chip system)

[0208] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a quantum chip system provided in an embodiment of the present application.

[0209] The embodiment of the present application also provides a quantum chip system, the specific implementation of which is consistent with the implementation and technical effects recorded in the above-mentioned data encoding method embodiment, and some contents will not be repeated here.

[0210] The quantum chip system includes at least one quantum processor, and the at least one quantum processor is used to execute quantum operations corresponding to the quantum program to implement the following steps:

[0211] Through the quantum circuit corresponding to the preset kernel function, any two m-dimensional data among multiple m-dimensional data are encoded into n quantum bits, where m and n are positive integers and m>n.

[0212] A quantum chip system is a miniature device for processing quantum information, which can execute quantum operations corresponding to quantum programs. In this embodiment, the quantum chip system is used as a core computing component for performing data encoding, taking advantage of its parallel processing capabilities to bring efficiency to quantum kernel methods. As an example, the quantum chip system can be a superconducting quantum chip system, an ion trap quantum chip system, a photonic quantum chip system, etc., including quantum processors and peripherals that provide quantum chip packaging, etc.

[0213] A quantum processor is a specific hardware device that uses principles of quantum mechanics to perform computations. Unlike traditional classical computer processors, a quantum processor processes quantum bits, not classical bits. A quantum processor is, for example, a quantum processor with 72 quantum bits. The core advantage of a quantum processor is its superposition ability and quantum entanglement properties, which make it more efficient than traditional computers for certain tasks, such as factorization and search problems.

[0214] A quantum program is a series of instructions written for a quantum computer to guide the quantum processor to perform specific quantum operations. As an example of a simple quantum operation, apply the Hadamard gate to the first quantum bit. Quantum programs allow researchers and engineers to manipulate and control quantum computers in detail, providing efficient solutions to complex problems.

[0215] A quantum operation is a basic operation performed on a quantum bit, including various quantum gates and measurements. For example, apply the Pauli-X gate to a quantum bit to flip it from the |0> state to the |1> state. Quantum operations form the basis of quantum computing, allowing users to manipulate and read quantum information to implement quantum algorithms.

[0216] The quantum processor in the quantum chip system is a device that operates based on the principles of quantum mechanics. When multiple m-dimensional data needs to be encoded, the quantum program controls the quantum processor to perform operations through the corresponding quantum circuit of the preset kernel function. Specifically, any two m-dimensional data are encoded into n quantum bits, and the core of this encoding process is to map classical data to quantum states through specific quantum operations (such as quantum gates). Since m is greater than n, this method effectively implements data compression encoding. Next, by performing a series of quantum operations and measurements on the encoded quantum bits, the relevant information or properties of the encoded data can be obtained, such as its quantum kernel inner product in Hilbert space.

[0217] With the principles of quantum computing, it is possible to achieve computing speed and efficiency beyond traditional computers. In this embodiment, the quantum kernel method can efficiently encode, process and extract key information from m-dimensional data. This compressed representation not only reduces the complexity of data processing, but also provides new possibilities for finance, physics and other fields that require processing large amounts of data. In addition, this method also provides a new perspective for machine learning and data analysis, which can capture and understand the subtle differences and complexities of data from a quantum level. In the long run, it brings more accurate data analysis, faster transaction speed and higher data security to the financial field.

[0218] For example, in the financial field, assume that the data to be classified is 12-dimensional data, including the opening price, highest price, lowest price, closing price, trading volume, trading volume, 5-day average price, 10-day average price, 30-day average price, 5-day average trading volume, 10-day average trading volume and 30-day average trading volume of the stock, i.e. m = 12. Two 12-dimensional data (data A and data B) are encoded into a quantum system composed of 6 qubits, i.e. n = 6. According to the given quantum program, the quantum processor first performs a predetermined quantum operation, for example, the information of the opening price and 5-day average price of data A (i.e. features 1, 7) is encoded into the first quantum bit, the information of the highest price and 10-day average price of data A (i.e. features 2, 8) is encoded into the second quantum bit, and so on. The information of the 5-day average price and opening price of data B (i.e. features 7, 1) is encoded into the first quantum bit, the information of the 10-day average price and highest price of data B (i.e. features 8, 2) is encoded into the second quantum bit, and so on. After a series of quantum operations, the state of the quantum system is measured multiple times to obtain the probability value of one of the ground states. This probability value can be used to calculate the quantum kernel inner product of the two 12-dimensional data in the Hilbert space.

[0219] (quantum computer)

[0220] See Figure 6 , Figure 6 is a structural diagram of a quantum computer provided by an embodiment of the present application.

[0221] The embodiment of the present application also provides a quantum computer, and the specific implementation and the technical effects achieved by the embodiment are consistent with those described in the quantum kernel method embodiment. Some content will not be repeated.

[0222] The quantum computer includes any of the quantum chip systems 1, the measurement and control system 2, the support system 3 and the operating system 4 described above. For example, a superconducting quantum computer includes a 24-bit superconducting quantum chip system 1, a quantum computing measurement and control system 2, a quantum computer operating system 3 and a quantum computing environment support system 4, as shown in Figure 6 .

[0223] The quantum chip system 1 includes at least one quantum processor, which is used to execute quantum operations corresponding to the quantum program to process quantum bits, thereby encoding any two m-dimensional data from multiple m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, where m and n are positive integers and m>n. For example, in a superconducting quantum computer, the superconducting quantum chip system 1 based on the superconducting quantum processor is the computing core of the quantum computer and can realize the execution of the quantum program. The embodiment of the present application does not limit the number of quantum processors in the quantum chip system 1, which can be one or more, for example.

[0224] The measurement and control system 2 includes a control device and a measuring device. The control device is used to convert the quantum program corresponding to the quantum circuit into a corresponding control signal and send it to the quantum processor. The measuring device is used to measure the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in Hilbert space, thereby obtaining the quantum kernel matrix corresponding to the multiple m-dimensional data. Quantum computing measurement and control system 2 is the control system of the quantum computer, used to control the operation of the quantum chip system. Quantum chip system 1 receives the control signal from measurement and control system 2 and executes the quantum operation corresponding to the quantum program to process the quantum bits, thereby realizing the execution of the quantum program.

[0225] The present application does not limit the measuring device, which may be, for example, any one or a combination of the following devices.

[0226] Superconducting measurement devices: Utilizing the properties of superconducting materials at low temperatures, they measure the state of quantum bits. This device can accurately detect changes in quantum states in a very short time.

[0227] Optical interferometer: measures quantum states through the interference of light, especially suitable for photon qubits.

[0228] Ion trap detector: For trapped ion qubit systems, this device can detect the quantum state of ions by measuring their electromagnetic frequencies.

[0229] Magnetic resonance measurement device: Using magnetic resonance technology, the state of specific quantum bits, such as spin-based quantum bits, can be measured.

[0230] Charge measurement devices: These devices can detect the charge state in quantum dots or other tiny structures, thereby understanding their quantum state.

[0231] Quantum dot measurement devices: For quantum dot-based quantum computing systems, this device can measure the electronic states in the quantum dots.

[0232] Quantum state identifier: can identify and classify a given quantum state to determine the specific state.

[0233] Environmental monitor: Since quantum computing needs to be performed under specific environmental conditions (such as low temperature and low noise), this device can monitor and control the computing environment in real time to ensure the accuracy of measurements.

[0234] Error correction module: Since errors may occur in quantum computing, the error correction module can correct and optimize the measurement results.

[0235] Each of the measurement devices listed above can be used independently or in combination with other devices to meet specific quantum computing needs.

[0236] The support system 3 is used to provide working environment conditions to ensure the operation of the quantum chip system. The support system 3 can include an ultra-low temperature refrigeration system and a host active vibration reduction system to provide a working environment guarantee for the stable operation of the quantum computer.

[0237] The operating system 4 is used to provide a software system to enable user interaction with the quantum chip system and the measurement and control system. For example, the quantum computer operating system 4 can adopt the Sinan system, providing a quantum computing software framework for the quantum computer, with functions such as parallel execution of multiple quantum computing tasks, automatic calibration of quantum chips, and efficient management of quantum resources.

[0238] (Quantum Memory)

[0239] The embodiment of the present application further provides a quantum memory, the specific implementation of which is consistent with the implementation and technical effects achieved in the above method embodiment, and some contents are not repeated here.

[0240] The quantum memory stores a quantum program, which, when executed by at least one quantum processor, implements the functions of any of the aforementioned quantum chip systems or the steps of any of the aforementioned data encoding methods.

[0241] By introducing quantum memory, quantum computers can store complex numbers of quantum programs and execute them by quantum processors, which greatly expands the functionality and application scope of quantum computing. Compared to classical memory, quantum memory can store and process large amounts of quantum state information, meaning quantum computers can perform more complex and advanced quantum algorithms and tasks. Due to the characteristics of quantum programs, quantum processors can handle multiple computing tasks simultaneously, significantly accelerating computation compared to classical computing. Quantum memory can store quantum keys and other information related to quantum communication and quantum cryptography, providing a higher level of security than classical technologies. The design of quantum memory allows for dynamic expansion of memory capacity to accommodate growing computing needs. Quantum memory can work alongside traditional classical memory and other computing resources, enabling collaborative operation between quantum and classical computers. Because quantum memory can store multiple quantum states at super-locations, it can effectively reduce data redundancy and improve storage efficiency. By storing quantum programs designed specifically for quantum processors, the potential of quantum computing, such as quantum machine learning and quantum simulation, can be better utilized. Users can load and execute different quantum programs according to their needs, enabling quantum computers to perform a wide variety of tasks. Effective management and allocation of quantum storage resources can ensure the efficient operation of quantum computers. The introduction of quantum memory creates conditions for further research and application of quantum computing, quantum communication, and other quantum technologies, thereby promoting technological progress in the entire field of quantum information science.

[0242] (Quantum Program Product)

[0243] The embodiments of the present application also provide a quantum program product, the specific implementation of which is consistent with the implementation and technical effects recorded in the above method embodiments, and some contents will not be repeated here.

[0244] The quantum program product includes a quantum program, which, when executed by at least one quantum processor, implements the functions of any of the above-mentioned quantum chip systems or the steps of any of the above-mentioned data encoding methods.

[0245] Quantum program products provide specific operation and functional guidelines for quantum computers, allowing quantum processors to efficiently perform complex tasks, making various quantum computing tasks able to be performed in a modular and repeatable manner; similar to classical software applications, quantum programs can be shared and deployed by multiple users or devices, thereby expanding their scope of application; optimized quantum programs can improve the computing efficiency of quantum processors, reduce error rates, and ensure accurate computing results; quantum program products can include complex algorithms and processes, supporting various advanced quantum computing tasks such as optimization, simulation, encryption, and machine learning; users can customize or adjust quantum programs according to their needs to meet specific computing tasks or business needs; quantum programs can be used to create a complete and reliable quantum computer system, and can be used to create a complete and reliable quantum computer system. Quantum program products can work in conjunction with classical computing programs, allowing seamless integration between quantum computers and classical computers; for non-professional users, quantum program products provide a simple and easy-to-use interface, allowing users to easily utilize the powerful functions of quantum computing without having to deeply understand the complex principles behind it; quantum program products can include various testing and verification tools to help users ensure the accuracy and reliability of quantum computing; with the development of quantum computing technology, more and more quantum program products are entering the market, providing users with various functions and services, thereby promoting the commercialization process of the entire quantum computing field; quantum program products can also be used as education and training tools to help students and researchers better understand and master the principles and applications of quantum computing.

[0246] This application does not limit the users. Taking the financial sector as an example, users may include banks, investment institutions, securities firms, insurance companies, fund management companies, private equity funds, hedge funds, FinTech companies, financial consulting firms, individual investors, corporate finance departments, pension funds, university endowments, non-governmental organizations, universities, research institutes, financial training centers, economics schools, financial market-related regulatory agencies, rating agencies, and auditing agencies. These users can use the above-mentioned quantum computing technology solutions to perform various financial calculations and analyses, such as interest rate forecasting, portfolio optimization, risk assessment, pricing modeling, investment strategy analysis, financial simulation, and time series analysis. Whether it is a bank or a securities firm, they can leverage the powerful capabilities of quantum computing to improve the quality and efficiency of their financial decision-making.

[0247] (Classical Computer)

[0248] An embodiment of the present application also provides a classical computer, comprising a memory and at least one processor.

[0249] The memory is used to store computer programs;

[0250] The at least one processor is used to execute the computer program to implement the following steps: selecting n quantum bits to encode any two m-dimensional data from a plurality of m-dimensional data, where m and n are positive integers and m>n; and calculating the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space based on the measurement results of the encoded n quantum bits, thereby obtaining a quantum kernel matrix corresponding to the plurality of m-dimensional data.

[0251] Selecting n qubits means setting the number of qubits used to represent two m-dimensional data sets to n. For example, n = 5 means that 5 qubits are selected to represent or encode any two m-dimensional data sets. The primary purpose of selecting n qubits to represent two m-dimensional data sets is to achieve data compression and efficient parallel processing. Leveraging the characteristics of quantum computing, a smaller number of qubits can be used to represent and process high-dimensional data, thereby accelerating the computational process. Furthermore, quantum superposition provides the ability to perform parallel processing, making quantum computing faster than classical computing for certain problems.

[0252] For example, consider a project in the financial sector focused on credit scoring. First, 51-dimensional data is obtained for each user. To quickly assess each user's credit risk, five qubits are selected to represent this 51-dimensional data. For example, user A's 51-dimensional data is as follows: [50000, 2000, 0.2, 0, ...] (including annual income, monthly consumption, debt ratio, number of defaults, etc.). Using a specific quantum circuit, the 51-dimensional data of user A and user B is encoded onto the five qubits. After measurement, the corresponding quantum kernel inner product of user A and user B is obtained. Similar processing is performed for other user combinations. Finally, the quantum kernel inner products of all user data are calculated, resulting in a large quantum kernel matrix. This quantum kernel matrix is ​​then used to train a classifier to predict whether a new user is likely to default in the future.

[0253] It should be understood that the specific examples in this article are only intended to help those skilled in the art better understand the implementation methods of the present application, rather than to limit the scope of the present application.

[0254] It can be understood that in the various implementation methods of this application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation method of this application.

[0255] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.

[0256] Unless otherwise indicated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art in the technical field of the present application. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "and / or" used in this application includes any and all combinations of one or more related listed items. The singular forms "a", "above", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.

[0257] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0258] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the quantum computer, performance improvement method, quantum memory, and quantum program product described above can refer to the corresponding processes in the aforementioned quantum chip system implementation method and will not be repeated here.

[0259] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0260] The units described as separate components may or may not be physically separate, and 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 may be selected according to actual needs to achieve the purpose of this embodiment.

[0261] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0262] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer (e.g., a classical computer or a quantum computer) readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0263] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A quantum kernel method for compressing the number of bits, characterized in that: Applied to a quantum computer or a quantum simulator, the method comprises: Encoding any two m-dimensional data from a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, where m and n are positive integers and m>n, and the m-dimensional data includes m different types of feature information; Measuring the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space, thereby obtaining a quantum kernel matrix corresponding to the multiple m-dimensional data; Taking any two m-dimensional data among a plurality of m-dimensional data as first m-dimensional data and second m-dimensional data, the encoding process of the first m-dimensional data and the second m-dimensional data includes: Applying the i-th group of quantum gates corresponding to the first m-dimensional data to the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit; performing a conjugate transpose operation of the i-th group of quantum gates corresponding to the second m-dimensional data on the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the quantum circuit; The number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to n quantum bits. The parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data. The i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data. The value range of i is 1 to k, where k is an integer greater than 1. The types of characteristic information in different groups of characteristic information corresponding to the same m-dimensional data are not exactly the same, and the types and order of characteristic information in a group of characteristic information with the same sequence number corresponding to any two m-dimensional data are exactly the same.

2. The quantum kernel method for compressing the number of bits according to claim 1, characterized in that During the encoding process of the first m-dimensional data and the second m-dimensional data, the order of action of each group of quantum gates is as follows: First, apply the conjugate transpose operation of the first group of quantum gates corresponding to the first m-dimensional data to the k-th group of quantum gates, and then apply the conjugate transpose operation of the k-th group of quantum gates corresponding to the second m-dimensional data to the first group of quantum gates; or, Conjugate transposition operations of the first group of quantum gates to the kth group of quantum gates corresponding to the first m-dimensional data and the first group of quantum gates to the kth group of quantum gates corresponding to the second m-dimensional data are alternately applied.

3. The quantum kernel method for compressing the number of bits according to claim 1, characterized in that: In the set formed by the first group of feature information to the kth group of feature information of the m-dimensional data, each type of feature information in the m types of feature information appears 0 times, 1 time, or multiple times.

4. The quantum kernel method for compressing the number of bits according to claim 1, characterized in that: When m / n is an integer, k=m / n, and the i-th group of feature information corresponds to the (i-1)n+1-th feature information to the in-th feature information.

5. The quantum kernel method for compressing the number of bits according to claim 1, characterized in that: When m / n is a non-integer, k is the result of rounding up m / n, the i-th group of feature information corresponds to the (i-1)n+1th feature information to the inth feature information, and in the k-th group of feature information, the m+1th feature information to the knth feature information use any kn-m of the m types of feature information.

6. The quantum kernel method for compressing the number of bits according to claim 5, characterized in that: In the kth group of feature information, the (m+1)th feature information to the (kn)th feature information use the first (kn-m) of the m types of feature information.

7. The quantum kernel method for compressing the number of bits according to claim 1, characterized in that: The step of measuring the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space includes: The encoded n quantum bits are measured multiple times to obtain the probability value of one of the ground states as the quantum kernel inner product of the two encoded m-dimensional data.

8. A classification method, characterized in that Applied to a classical computer, the method comprises: Training a classifier according to the quantum kernel matrix; during the training process of the classifier, a kernel function in an objective function is determined according to a corresponding quantum kernel inner product in the quantum kernel matrix; Using the trained classifier, performing a classification task; The quantum kernel matrix is ​​obtained by using the quantum kernel method for compressing the number of bits as described in any one of claims 1 to 7.

9. A quantum chip system, characterized in that: The system includes at least one quantum processor configured to execute quantum operations corresponding to a quantum program to implement the following steps: Encoding any two m-dimensional data from a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, where m and n are positive integers and m>n, and the m-dimensional data includes m different types of feature information; Taking any two m-dimensional data among a plurality of m-dimensional data as first m-dimensional data and second m-dimensional data, the encoding process of the first m-dimensional data and the second m-dimensional data includes: Applying the i-th group of quantum gates corresponding to the first m-dimensional data to the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit; performing a conjugate transpose operation of the i-th group of quantum gates corresponding to the second m-dimensional data on the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the quantum circuit; The number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to n quantum bits. The parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data. The i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data. The value range of i is 1 to k, where k is an integer greater than 1. The types of characteristic information in different groups of characteristic information corresponding to the same m-dimensional data are not exactly the same, and the types and order of characteristic information in a group of characteristic information with the same sequence number corresponding to any two m-dimensional data are exactly the same.

10. A quantum computer, characterized in that: The quantum computer comprises: A quantum chip system, the quantum chip system comprising at least one quantum processor, the at least one quantum processor being configured to execute quantum operations corresponding to a quantum program, thereby encoding any two m-dimensional data from a plurality of m-dimensional data into n quantum bits through a quantum circuit corresponding to a preset kernel function, wherein m and n are positive integers and m>n, and the m-dimensional data include m different types of characteristic information; using any two m-dimensional data from the plurality of m-dimensional data as first m-dimensional data and second m-dimensional data, the encoding process of the first m-dimensional data and the second m-dimensional data comprising: acting an i-th group of quantum gates corresponding to the first m-dimensional data on the n quantum bits according to parameters of an i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit; and encoding an i-th group of quantum gates corresponding to the first m-dimensional data according to parameters of the quantum circuit. Parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the circuit, applying a conjugate transpose operation of the i-th group of quantum gates corresponding to the second m-dimensional data to the n quantum bits; wherein the number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to n quantum bits, and the parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data, the i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data, the value range of i is 1 to k, k is an integer greater than 1, and the types of characteristic information in different groups of characteristic information corresponding to the same m-dimensional data are not completely the same, and the types and order of characteristic information in a group of characteristic information with the same sequence number corresponding to any two m-dimensional data are completely the same; A measurement and control system, comprising a control device and a measuring device, wherein the control device is used to convert the quantum program corresponding to the quantum circuit into a corresponding control signal and send it to the quantum processor, and the measuring device is used to measure the encoded n quantum bits to obtain the quantum kernel inner product of the two encoded m-dimensional data in Hilbert space, thereby obtaining the quantum kernel matrix corresponding to the multiple m-dimensional data; A support system for providing a working environment to ensure the operation of the quantum chip system; An operating system is used to provide a software system to enable interaction between the user and the quantum chip system and the measurement and control system.

11. A classical computer, characterized in that The classical computer includes: memory for storing computer programs; At least one processor is configured to execute the computer program to implement the following steps: Selecting n quantum bits to encode any two m-dimensional data from a plurality of m-dimensional data, where m and n are positive integers and m>n, and the m-dimensional data includes m different types of feature information; Taking any two m-dimensional data among a plurality of m-dimensional data as first m-dimensional data and second m-dimensional data, the encoding process of the first m-dimensional data and the second m-dimensional data includes: Applying the i-th group of quantum gates corresponding to the first m-dimensional data to the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the first m-dimensional data in the quantum circuit; performing a conjugate transpose operation of the i-th group of quantum gates corresponding to the second m-dimensional data on the n quantum bits according to parameters of the i-th group of quantum gates corresponding to the second m-dimensional data in the quantum circuit; The number of quantum gates in each group is n, and each group of quantum gates corresponds one-to-one to n quantum bits. The parameters of the i-th group of quantum gates of the m-dimensional data are determined according to the i-th group of characteristic information of the m-dimensional data. The i-th group of characteristic information of the m-dimensional data includes n types of characteristic information selected from m types of characteristic information of the m-dimensional data. The value range of i is 1 to k, where k is an integer greater than 1. The types of characteristic information in different groups of characteristic information corresponding to the same m-dimensional data are not completely the same. The types and order of characteristic information in a group of characteristic information with the same sequence number corresponding to any two m-dimensional data are completely the same. According to the measurement results of the encoded n quantum bits, the quantum kernel inner product of the two encoded m-dimensional data in the Hilbert space is calculated, thereby obtaining the quantum kernel matrix corresponding to the multiple m-dimensional data.

Citation Information

Patent Citations

  • Method and device for encoding complex vector to quantum circuit

    CN112633507A

  • Compact quantum classifier based on kernel method

    CN115860130A