A granular-based quantum-enhanced clustering method

CN122132857APending Publication Date: 2026-06-02CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2026-02-11
Publication Date
2026-06-02

Smart Images

  • Figure CN122132857A_ABST
    Figure CN122132857A_ABST
Patent Text Reader

Abstract

This invention relates to a quantum-enhanced clustering method based on spheres, belonging to the field of quantum computing technology. This method addresses the problems of high computational complexity, difficulty in capturing intrinsic geometric features, and sensitivity to noise in traditional clustering algorithms when processing large-scale, high-dimensional, nonlinear data. The technical solution includes obtaining a compressed set of spheres from the original dataset and extracting the center vector; encoding the center vector into a quantum state through quantum feature mapping; constructing a quantum kernel matrix using quantum circuits to calculate fidelity; calculating cohesion based on the quantum kernel matrix to identify and remove noisy spheres; performing hierarchical clustering on the core sphere set; and mapping the results back to the original data points. This invention improves clustering accuracy, robustness, and the ability to handle complex data structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology and relates to a quantum-enhanced clustering method based on spheres. Background Technology

[0002] Clustering algorithms, as a core technology in data mining and machine learning, are widely used in scenarios such as pattern recognition, image analysis, and bioinformatics. However, traditional clustering methods face significant challenges when dealing with large-scale, high-dimensional, and non-linearly distributed data, such as high computational complexity, sensitivity to noise, and difficulty in capturing the inherent geometric features of complex data structures.

[0003] To reduce computational burden, particle sphere computation generates a set of particles through data compression, effectively reducing the number of objects to be processed. However, existing particle sphere merging stages typically use Euclidean distance as a metric, which has significant limitations when processing non-convex or manifold data, failing to fully express the essential relationships within the data. On the other hand, quantum kernel methods utilize the high-dimensional Hilbert space properties of quantum states to effectively separate highly entangled data. However, in the era of Noisy Intermediate-Scale Quantum (NISQ), directly calculating the quantum kernel matrix from the original samples faces resource bottlenecks, resulting in low practical feasibility.

[0004] Therefore, current technology lacks a robust clustering method that can combine the data compression advantages of particle sphere computing with the high-dimensional feature extraction capabilities of quantum computing, while also possessing strong noise resistance. Innovative solutions are urgently needed to address these shortcomings. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a quantum-enhanced clustering method based on spheres.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A quantum-enhanced clustering method based on spheres, comprising the following steps: S1: Obtain the set of particles after compression of the original dataset, and extract the center vector of each particle; S2: Encode the center vector of each particle into a quantum state in a high-dimensional Hilbert space through quantum feature mapping; S3: Calculate the fidelity between each pair of particle-sphere quantum states using quantum circuits to construct a quantum core matrix; S4: Calculate the cohesion of each sphere based on the quantum core matrix, and identify and remove noisy spheres according to the cohesion threshold to obtain the core sphere set; S5: Construct a distance metric based on the core particle set and quantum kernel matrix, and perform hierarchical clustering to obtain the category labels of the particles; S6: Map the clustering results of the spheres back to the original data points they contain, completing the final data clustering.

[0007] Furthermore, in S2, the quantum feature mapping employs angle encoding, for d The center vector of the sphere in dimension, preparation d The qubit, for the qubit i Applying a rotating gate to each qubit ,in For the vector of the first k Each component maps classical data to quantum states. .

[0008] Furthermore, in S3, constructing the quantum core matrix includes: S31: For any two quantum states corresponding to the centers of the spheres and Parallel measurements are performed using a Swap Test circuit with auxiliary qubits. S32: Measurement auxiliary qubit is in The probability P(0) of the state is given by the formula. Calculate the elements of the quantum kernel matrix, where Indicates the first i The first ball and the first j The similarity of individual spheres in high-dimensional space.

[0009] Furthermore, in S4, the formula for calculating cohesion is: ,in K For quantum nuclear matrix; Indicates granules of k Nearest neighbor set; k A positive integer, representing the number of nearest neighbors; The average quantum similarity between a quantized particle and its local neighborhood is used to define the quantum similarity of a particle. Noise particles refer to particles whose cohesion is below a preset percentile threshold.

[0010] Furthermore, the construction of distance metric and the execution of clustering in S5 include: S51: Construct the directed nearest neighbor matrix W If the granules It is a ball One of its nearest neighbors, ,otherwise ; S52: Yes W After symmetry processing, the similarity matrix is ​​obtained. ; S53: Convert the similarity matrix to a distance matrix D =1- A ; S54: Using the distance matrix D A bottom-up agglomerative hierarchical clustering algorithm is used on the core particle set until the preset number of clusters is reached.

[0011] Furthermore, step S6 also includes a step of processing the noise particles: assigning the noise particles removed in step S4 to the cluster of the clustered core particles with the highest quantum similarity.

[0012] The beneficial effects of this invention are as follows: (1) This invention utilizes a set of spheres to compress the original data, significantly reducing computational complexity and making the method applicable to large-scale datasets. Simultaneously, by encoding the center of the spheres into quantum states through quantum feature mapping, it effectively leverages the high-dimensional properties of quantum Hilbert space, enabling the capture of complex nonlinear relationships within the data, thereby improving the clustering accuracy for non-convex or manifold data. For example, in complex structures such as bi-monthly datasets, this invention can accurately separate entangled data distributions.

[0013] (2) The introduction of a cohesion mechanism based on quantum kernel matrix to filter noisy particles enhances the robustness of the method. This mechanism effectively identifies and removes outliers by quantizing the quantum similarity between the particles and their local neighborhoods, avoiding the interference of noise on the clustering results, thereby improving stability and reliability in real-world scenarios.

[0014] (3) This invention employs a hierarchical clustering method combined with a distance metric constructed from quantum kernels, enabling the clustering process to adapt to the intrinsic geometric structure of the data. This not only avoids the limitations of traditional Euclidean distance but also optimizes cluster formation through a bottom-up aggregation strategy, making it particularly suitable for processing high-dimensional sparse data.

[0015] (4) The entire method achieves a balance between feasibility and efficiency on NISQ equipment. Through logical connections between steps (such as from quantum kernel computation to noise filtering and then to clustering mapping), the overall process is ensured to be coherent and scalable. Experiments show that the present invention significantly improves clustering accuracy and noise resistance while maintaining low computational resource consumption.

[0016] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0017] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is an overall flowchart of the method in the embodiments of the present invention; Figure 2 This is a circuit diagram of quantum angle encoding in this invention; Figure 3 This is the circuit diagram for Swap Test in this invention; Figure 4 This is a diagram showing the effect of cohesive clustering on a bi-monthly dataset in this invention. Detailed Implementation

[0018] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0019] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0020] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0021] Please see Figures 1-4 This is a quantum-enhanced clustering method based on spheres. Figure 1 The method includes the following steps: S1: Obtain the compressed set of particles from the dataset. This step serves as the input stage for the algorithm. First, obtain the set of particles after compression processing by the particle generation algorithm. ,in This represents the total number of particles, which is much smaller than the total number of samples in the original dataset. From each sphere Extract its center vector As input features for subsequent quantum computing.

[0022] S2: Mapping the center of the particle to a quantum state using quantum angle encoding. This is done to leverage the high-dimensional mapping capabilities of quantum computing to capture nonlinear features, such as... Figure 2 As shown, this step uses angle encoding to map the classical particle center vector to the quantum Hilbert space. For a d-dimensional particle center vector, d qubits are prepared, and a parameterized rotation gate is applied to the k-th qubit. This operation encodes the eigenvalues ​​of classical data into rotation angles of qubit amplitudes, generating quantum states. Through this mapping, linearly inseparable data in the original space becomes more distinguishable in the quantum feature space.

[0023] S3: Calculate the intergranular quantum nucleus matrix using the Swap Test circuit. For example... Figure 3 As shown, to measure the similarity between particles, a quantum kernel matrix is ​​constructed using a Swap Test quantum circuit. This circuit contains two input quantum registers and one auxiliary qubit. The auxiliary qubit is measured by applying a Hadamard gate and a controlled swap gate. Based on the measurement results, the auxiliary qubit is in a certain state. The probability P(0) of a state has a linear relationship with the squared modulus of the inner product of the two quantum states. Based on this, the elements of the quantum kernel matrix K can be calculated. This value accurately reflects the fidelity of the two spheres in a high-dimensional quantum characteristic space.

[0024] S4: Calculate and filter the local cohesion of each sphere. To enhance the robustness of clustering, this step introduces a "cohesion" mechanism to identify noise. For each sphere... Based on the quantum nuclear matrix K, find its k nearest neighbors and calculate the cohesion coh(i), using the formula: .like Figure 4 As shown in the histogram on the left and the distribution of spheres in the middle, agglomeration measures the degree of quantum similarity between spheres and their local neighborhoods. Spheres with agglomeration below a preset threshold are marked as potential noise or boundary outliers and assigned to the noise sphere set. These highly cohesive spheres are temporarily removed during the current clustering phase; the remaining highly cohesive spheres form the core sphere set. .

[0025] S5: Perform hierarchical aggregation and clustering on the core spheres. In the core sphere set... Clustering operations are performed. First, a directed nearest neighbor matrix W is constructed based on the quantum kernel matrix. Only the strong connections of the k nearest neighbors are retained, and then symmetry processing is performed to obtain the similarity matrix. The similarity was then converted into a distance metric. .like Figure 4 As shown on the right, a bottom-up agglomerative hierarchical clustering algorithm is employed using the distance matrix D. Initially, each core particle is treated as an independent cluster. The algorithm iteratively merges the two closest clusters until the number of clusters reaches a preset target value. This process leverages the high-dimensional properties of quantum nuclei, enabling efficient processing of clusters such as... Figure 4 The complex structures shown are non-convex shapes such as "double moons" or spirals.

[0026] S6: Classify and map the noisy particles to the original data. After clustering the core particles, process the noisy particles removed in step S4. Calculate the average quantum similarity between each noisy particle and each of the generated clusters, and assign it to the cluster with the highest similarity. Finally, based on the particle's affiliation with the original data, assign each particle... The final cluster label assigns a label to all the original data points contained within it. This completes the classification of the entire original dataset and outputs the final result.

[0027] Example 1: Clustering of a Double-Moon-Shaped Dataset This embodiment uses a classic double-crescent-shaped nonlinear separable dataset to verify the invention's ability to handle complex geometric structures. This dataset contains 2000 sample points, presented in two staggered crescent-shaped distributions.

[0028] First, data preprocessing is performed. The original dataset is compressed using a sphere generation algorithm to form a set of 150 spheres, and the center vector of each sphere is extracted. Then, the center vector is encoded into a quantum state through quantum feature mapping, specifically using an angle encoding method, such as... Figure 2 The quantum circuit shown performs an RY rotating gate operation on each feature component.

[0029] Next, the SwapTest circuit is used to calculate the quantum nucleus matrix between the particles, such as... Figure 3 The circuit structure shown obtains fidelity by measuring the auxiliary qubits. The cohesion of each particle is calculated based on the quantum core matrix, and a percentile threshold of 15% is set to identify and eliminate 12 low-cohesion noise particles.

[0030] A similarity matrix was constructed for the remaining 138 core spheres and converted into a distance matrix. An agglomerative hierarchical clustering algorithm was then used to map the clustering results back to the original data points. For example... Figure 4 As shown, the present invention successfully and accurately separates the two crescent-shaped structures, demonstrating its effective processing capability for non-convex data.

[0031] Example 2: Clustering of High-Dimensional Image Data This embodiment uses a subset of the MNIST handwritten digit dataset, containing 500 28×28 pixel images each of the digits "3" and "8", for a total of 1000 samples. Each image is flattened into a 784-dimensional vector and then PCA is used to reduce the dimensionality to 50 dimensions.

[0032] according to Figure 1 The process begins with generating 80 spheres for data compression. In the quantum feature mapping stage, a hierarchical angular encoding strategy is used to efficiently encode the 50-dimensional feature vector, assigning each of the 50 feature components to 25 qubits. Quantum kernel computation employs an improved SwapTest circuit to compute the similarity of all sphere pairs in parallel.

[0033] In the cohesion calculation, the k-nearest neighbor parameter k=5 and the percentile threshold is 20%. After noise removal, clustering is performed on the core spheres, ultimately yielding two clearly separated clusters, corresponding to the numbers "3" and "8" respectively. This embodiment demonstrates the effectiveness of the present invention in high-dimensional data feature extraction and clustering.

[0034] Example 3: Clustering of Noisy Real-World Data This embodiment uses the Wine dataset from the UCI Machine Learning Library, which contains 13-dimensional features from 178 samples, to simulate noise interference present in real-world scenarios. 10% Gaussian noise is added to the original data.

[0035] Implementation process as follows Figure 1 As shown in the overall flowchart, 30 spheres are generated during the sphere generation stage. After quantum encoding, the quantum core matrix is ​​calculated, and three noisy spheres that are significantly deviated from the main cluster are identified through cohesion analysis. During the hierarchical clustering stage, these noisy spheres are temporarily excluded from the core set. After the core cluster is formed, they are redistributed according to the principle of maximum quantum similarity.

[0036] The results of this embodiment demonstrate that even under noise interference, the present invention can maintain the stability of the clustering structure, and the three wine varieties are accurately distinguished, proving its strong robustness.

[0037] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A quantum-enhanced clustering method based on spheres, characterized in that: The method includes the following steps: S1: Obtain the set of particles after compression of the original dataset, and extract the center vector of each particle; S2: Encode the center vector of each particle into a quantum state in a high-dimensional Hilbert space through quantum feature mapping; S3: Calculate the fidelity between each pair of particle-sphere quantum states using quantum circuits to construct a quantum core matrix; S4: Calculate the cohesion of each sphere based on the quantum core matrix, and identify and remove noisy spheres according to the cohesion threshold to obtain the core sphere set; S5: Construct a distance metric based on the core particle set and quantum kernel matrix, and perform hierarchical clustering to obtain the category labels of the particles; S6: Map the clustering results of the spheres back to the original data points they contain, completing the final data clustering.

2. The quantum-enhanced particle clustering method based on cohesion and quantum kernel matrix according to claim 1, characterized in that: In S2, the quantum feature mapping uses angle encoding, for d The center vector of the sphere in dimension, preparation d The qubit, for the qubit i Applying a rotating gate to each qubit ,in For the vector of the first k Each component maps classical data to quantum states. .

3. The quantum-enhanced particle clustering method based on cohesion and quantum kernel matrix according to claim 1, characterized in that: In S3, constructing the quantum core matrix includes: S31: For any two quantum states corresponding to the centers of the spheres and Parallel measurements are performed using a Swap Test circuit with auxiliary qubits. S32: Measurement auxiliary qubit is in The probability P(0) of the state is given by the formula. Calculate the elements of the quantum kernel matrix, where Indicates the first i The first ball and the first j The similarity of individual spheres in high-dimensional space.

4. The quantum-enhanced particle clustering method based on cohesion and quantum kernel matrix according to claim 1, characterized in that: In S4, the formula for calculating cohesion is: ,in K For quantum nuclear matrix; Indicates granules of k Nearest neighbor set; k A positive integer, representing the number of nearest neighbors; The average quantum similarity between a quantized particle and its local neighborhood is used to define the quantum similarity of a particle. Noise particles refer to particles whose cohesion is below a preset percentile threshold.

5. The quantum-enhanced particle clustering method based on cohesion and quantum kernel matrix according to claim 1, characterized in that: The construction of distance metrics and the execution of clustering in S5 include: S51: Construct the directed nearest neighbor matrix W If the granules It is a ball One of its nearest neighbors, ,otherwise ; S52: Yes W After symmetry processing, the similarity matrix is ​​obtained. ; S53: Convert the similarity matrix to a distance matrix D =1- A ; S54: Using the distance matrix D A bottom-up agglomerative hierarchical clustering algorithm is used on the core particle set until the preset number of clusters is reached.

6. The quantum-enhanced particle clustering method based on cohesion and quantum kernel matrix according to claim 1, characterized in that: S6 further includes a step of processing noise particles: assigning the noise particles removed in step S4 to the cluster of the clustered core particles with the highest quantum similarity.