A quantum-classical hybrid image classification method based on group equivariant and delayed aggregation

By preserving the rotation group dimension and delaying aggregation in the classic network, and combining nonlinear processing of the group-equal variable sub-circuits, the problem of loss of rotation direction feature information in existing hybrid models is solved, and more accurate image classification is achieved.

CN121962777BActive Publication Date: 2026-06-09NANJING UNIV OF INFORMATION SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF INFORMATION SCI & TECH
Filing Date
2026-03-31
Publication Date
2026-06-09

Smart Images

  • Figure CN121962777B_ABST
    Figure CN121962777B_ABST
Patent Text Reader

Abstract

The application discloses a quantum-classical hybrid image classification method based on group homomorphism and delay aggregation, which comprises the following steps: a lifting convolution module is used to input a target image, initialize a convolution kernel and rotate, and then the target image is convolved and stacked to obtain an output image; a group convolution module is used to convert the output image of the convolution module into an image sample, and then convolution and inverse reshaping operations are performed to obtain an output image; a group pooling and flattening module is used to perform adaptive average pooling on the output image of the group convolution module, and the output image is compressed into a feature vector to obtain an output feature vector; a group homomorphism quantum feature processing module is used to encode the feature vector output by the group pooling and flattening module into a quantum bit; and a delay aggregation and output module is used to measure the quantum bit, aggregate and classify the measurement results, and complete the classification of the target image. The method has strong nonlinear feature fusion capability and can realize more accurate image classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification and visual recognition, specifically to a quantum classical hybrid image classification method based on group equivariance and delayed aggregation. Background Technology

[0002] In visual recognition tasks such as image classification, the rotational changes of target objects are a long-standing and unavoidable practical problem. Due to uncertainties in imaging angle, object pose, and acquisition environment, targets of the same category often exhibit significantly different pixel distribution characteristics at different rotation angles. How to ensure classification accuracy while enabling the model to have a stable response to rotational changes has become one of the important research directions in the field of image classification.

[0003] To address the aforementioned issues, deep learning methods based on rotation equivariance or rotation invariance have been proposed in the industry. One typical approach involves introducing a rotation group structure into the classic convolutional neural network, extracting feature representations in multiple rotation directions by rotating the input or convolutional kernel in multiple directions. To obtain outputs insensitive to rotational changes, these methods typically perform aggregation operations such as summation and averaging on features from different rotation directions in earlier or middle stages of the network, thereby achieving overall rotation invariance. This strategy improves the robustness of the model to some extent and reduces the dependence on large-scale rotational data augmentation, thus finding widespread application in image classification tasks.

[0004] However, the aforementioned "pre-aggregation" approach also introduces new technical challenges. Because features from different rotational directions are merged before entering the deep network, the model can only perceive the presence of a feature during subsequent computations, but cannot distinguish the specific rotational direction or the relative relationship between directions. This information compression makes it difficult for the network to model complex geometric relationships, especially in tasks requiring the differentiation of relative component orientations or structural layouts, easily leading to limited discriminative capabilities.

[0005] In recent years, with the interdisciplinary development of quantum computing and machine learning, quantum neural networks and quantum-classical hybrid models have been introduced into the field of image classification. Existing research typically employs a hybrid architecture of "classical feature extraction + quantum variational circuit processing," whereby image features are first extracted using a classical network, and then mapped to quantum circuits for nonlinear processing. Some works have attempted to introduce symmetry constraints into the quantum circuits to obtain rotationally invariant or equivalent output results.

[0006] However, in existing hybrid models, the classical network stage has often already completed the aggregation of rotation direction features, and the quantum circuits receive mostly compressed feature representations, lacking explicit directional structural information. This makes it difficult for quantum circuits, despite their potential advantages such as entanglement and high-dimensional state space, to play a role at the rotation group structure level, and the correlation between features of different rotation directions cannot be effectively modeled at the quantum computing stage.

[0007] Therefore, how to reasonably preserve the rotation group structure between classical feature extraction and quantum processing, so that features with different rotation directions are not prematurely fused before entering the quantum circuit, and how to make full use of their structural relationships in the quantum computing stage, has become a key technical problem that urgently needs to be solved in current rotation-equal variable sub-image classification methods. Summary of the Invention

[0008] The purpose of this invention is to provide a quantum classical hybrid image classification method based on group equivariance and delayed aggregation. This method has a strong nonlinear feature fusion capability and can achieve more accurate image classification.

[0009] To achieve the above functions, this invention designs a quantum classical hybrid image classification method based on group equivariance and delayed aggregation. For the target image in the hybrid image, the following steps S1-S5 are performed to complete the classification of the target image:

[0010] Step S1: Construct a lifting convolution module. Input a single-channel target image, initialize a convolution kernel, rotate the convolution kernel in four directions to obtain four rotated convolution kernels, use each rotated convolution kernel to convolve the target image, stack the convolution results to obtain the output image of the lifting convolution module.

[0011] Step S2: Construct a group convolution module, input the output image of the lifting convolution module, convert the output image of the lifting convolution module into multiple independent image samples, process each image sample with convolution using the same convolution kernel weights, and perform an inverse reshaping operation on each image sample after convolution processing to obtain the output image of the group convolution module.

[0012] Step S3: Construct a group pooling and flattening module. Perform adaptive average pooling on the output image of the group convolution module to compress the output image of the group convolution module into a structured feature vector containing information of four rotation directions, and obtain the feature vector output by the group pooling and flattening module.

[0013] Step S4: Construct a group-equal variable sub-feature processing module. For the feature vectors output by the group pooling and flattening module, use four sets of qubits to encode the feature vectors onto each set of qubits according to the rotation direction information. Utilize the shared rotation gates and inter-group cyclic entanglement of each set to extract group-invariant features in the quantum state space through nonlinear transformation.

[0014] Step S5: Construct a delayed aggregation and output module to measure all qubits in the quantum circuit, obtain the corresponding measurement results, aggregate the measurement results, obtain aggregated feature values, and classify them to complete the classification of the target image in the mixed image.

[0015] The present invention also designs an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned quantum classical hybrid image classification method based on group equivariance and delayed aggregation.

[0016] The present invention also designs a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned quantum classical hybrid image classification method based on group equivariance and delayed aggregation.

[0017] Beneficial effects: Compared with the prior art, the advantages of the present invention include:

[0018] This invention overcomes the information loss problem caused by premature averaging in traditional methods by employing a delayed aggregation strategy. This invention maintains sensitivity to feature orientation (e.g., distinguishing between "left edge" and "top edge") even in deep networks and utilizes this relative positional information for more accurate classification.

[0019] Furthermore, the design of the group-equal variable sub-circuit cleverly utilizes quantum entanglement. Through inter-group entanglement, the quantum system in a superposition state can simultaneously explore feature combinations in different rotation directions, providing a more powerful nonlinear feature fusion capability than classical linear averaging. At the same time, parameter sharing greatly reduces the optimization difficulty, enabling the model to converge quickly even with limited training data and exhibiting better resistance to overfitting. Attached Figure Description

[0020] Figure 1 This is an architecture diagram of a quantum classical hybrid image classification method based on group equivariance and delayed aggregation provided by an embodiment of the present invention;

[0021] Figure 2 This is a quantum circuit diagram provided according to an embodiment of the present invention;

[0022] Figure 3 This is a graph showing the loss and accuracy of the training and test sets provided according to an embodiment of the present invention. Detailed Implementation

[0023] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0024] Current techniques employ an "immediate averaging" strategy in classic convolutional layers. Because the output of each layer is an average of the orientation dimension, the network irreversibly discards the "orientation" dimension in the first layer. Subsequent layers can only see that "a certain feature exists," but cannot determine "in which direction the feature is located." This causes the network to degenerate into a simple texture detector, losing its ability to identify the relative positions of object parts and reducing classification accuracy.

[0025] Furthermore, existing quantum circuits only utilize the symmetry of spatial location. The entanglement between qubits is arbitrarily connected or confined to a spatial neighborhood, and is not grouped according to the structure of the rotation group. Therefore, even if the classical layer extracts features, the quantum layer cannot distinguish whether these features come from the "top left corner" of the image or the rotated "top right corner." Quantum entanglement cannot transmit information between "rotation transformations," resulting in insufficient nonlinear expressive power.

[0026] To address the aforementioned shortcomings, this invention provides a quantum-classical hybrid image classification method based on group equivariance and delayed aggregation, aiming to achieve the following objectives:

[0027] Maximize geometric information preservation: Lifting convolution and group convolution are used to explicitly preserve the rotation group dimension in the deep layers of the network, and aggregation is not performed until the last layer of the network (i.e., delayed aggregation), thereby preserving rich relative geometric features.

[0028] Constructing group-cooperative quantum circuits: Designing grouped quantum circuit structures and utilizing the inter-group entanglement mechanism enables quantum states to interact nonlinearly between feature subspaces with different rotation directions, thereby enhancing the expressive power and robustness of the model.

[0029] This invention provides a quantum classical hybrid image classification method based on group equivariance and delayed aggregation, referring to... Figure 1 For the target image in the mixed image, perform the following steps S1-S5 to complete the classification of the target image:

[0030] Step S1: Construct a lifting convolution module. Input a single-channel target image, initialize a convolution kernel, rotate the convolution kernel in four directions to obtain four rotated convolution kernels, use each rotated convolution kernel to convolve the target image, stack the convolution results to obtain the output image of the lifting convolution module.

[0031] Boosting convolution is a convolution operation that maps low-dimensional data (such as a two-dimensional image) onto a high-dimensional group structure. The boosting convolution module described in step S1 is as follows:

[0032] Input a single-channel target image Target image The form is The first dimension The first dimension represents the batch size, which is the number of images input to the model for training / inference in one operation; the second dimension represents the output channel number, which is the number of feature maps extracted after the convolution operation; the third dimension represents the height of the target image; and the fourth dimension represents the width of the target image. All dimensions are in pixels.

[0033] Initialize a convolution kernel , shape ,in, This indicates the number of output channels of the convolutional layer. This indicates the kernel size; the kernel is square. This indicates its side length, in pixels. In the example, , representing an 11×11 convolution kernel; generating convolution kernels exist Four rotated convolution kernels under the rotation group :

[0034] ;

[0035] ;

[0036] ;

[0037] ;

[0038] In the formula, , , , They represent the convolution kernels respectively. Convolution kernels rotated by 0°, 90°, 180°, and 270°; This indicates that the image is rotated 90° counterclockwise. The numbers 1, 2, and 3 in parentheses represent the number of times the image is rotated 90° counterclockwise.

[0039] In one embodiment, it can also be targeted at the convolution kernel. Using the D4 rotation group (which includes rotations and mirror flips in four directions, totaling 8 elements), the number of channels in the boost convolution module and the group convolution module will become 8, and the number of qubits and the number of groups will also be doubled accordingly.

[0040] Using four convolution kernels , , , For the input target image respectively To perform convolution, call the standard two-dimensional convolution operator as follows:

[0041] ;

[0042] in, The output tensor of the convolution operation represents the feature map data containing the rotation group dimension obtained after the convolution operation. Represents a two-dimensional convolution operation; This indicates the convolution kernel used in the convolution operation. The convolution stride represents the number of pixels the convolution kernel slides across the input tensor in both the height and width directions. That is, the convolution kernel slides 1 pixel at a time; This indicates convolution padding, representing the number of layers that pad the edges of the input tensor with zero pixels. That is, the edges of the input tensor are not padded, and the size of the feature map after convolution will be reduced according to the size of the convolution kernel.

[0043] Stack the convolution results corresponding to the four convolution kernels to output an image with the shape of... The first dimension The first dimension represents the batch size; the second dimension represents the number of channels; the third dimension represents the image height; and the fourth dimension represents the image width. The changes in image height and width are as follows:

[0044] ;

[0045] ;

[0046] in, , These represent the height and width of the target image, respectively. , These represent the height and width of the image after the convolution operation, respectively. Indicates the size of the convolution kernel; in the embodiment, , , , ; ;

[0047] Then the dimensions are transformed again, and the image shape is reshaped. The first dimension The first dimension represents the batch size, the second dimension represents the group dimension (0°, 90°, 180°, 270°), the third dimension represents the number of channels, the fourth dimension represents the image height, and the fifth dimension represents the image width.

[0048] Step S2: Construct a group convolution module. Input the output image of the lifting convolution module, convert the output image of the lifting convolution module into multiple independent image samples, process each image sample with convolution using the same convolution kernel weights, and perform an inverse reshaping operation on each image sample after convolution processing to obtain the output image of the group convolution module.

[0049] The group convolution module mentioned in step S2 is as follows:

[0050] The format of the output image of the boosting convolution module is changed from Transform into , are considered as B×4 independent image samples;

[0051] Using the same convolution kernel weights The standard two-dimensional convolution processes B×4 image samples respectively, which is mathematically equivalent to applying the exact same feature extraction logic to the four rotation channels, thus ensuring equivariance and parameter sharing.

[0052] Equivariance refers to the predictable transformation of a network's feature output in response to a certain transformation (such as rotation) of the input data. Formula: ;in, Represents the target image. The feature mapping function represents the feature extraction and transformation operations performed by the model on the input data in a neural network. Indicates the target image The geometric transformation operation, in this embodiment, is the rotation transformation of the image; The corresponding geometric transformation operation on the output features, and For transformations of the same type, representing the input after... After the transformation, the output features will also change. The corresponding predictable transformation means that extracting features after rotating the input image yields the same result as extracting features first and then performing the same rotation transformation on the features. In other words, the group equivariant sub-feature processing module constructed in this invention ensures the equivariance of the model to rotation.

[0053] Parameter sharing (or weight sharing) refers to the forced use of the same variable as weights by neurons or quantum gates in different parts of a network. In this embodiment of the invention, it is used to ensure that the processing logic for different rotation directions is consistent (equivariance).

[0054] After the convolution output, an inverse reshaping operation is performed, splitting the B×4 dimension back into two dimensions, B and 4, while preserving the shape of the output image. );

[0055] After three convolutions, the final image shape is ;

[0056] In the first convolution, the kernel size k=11, and the convolution stride is... Convolution filling ;

[0057] In the second convolution, the kernel size k=3, and the stride is... Convolution filling ;

[0058] In the third convolution, the kernel size k=3, and the stride is... Convolution filling .

[0059] Step S3: Construct a group pooling and flattening module. Perform adaptive average pooling on the output image of the group convolution module to compress the output image of the group convolution module into a structured feature vector containing information of four rotation directions, and obtain the feature vector output by the group pooling and flattening module.

[0060] The pooling and flattening module described in step S3 is as follows:

[0061] Adaptive average pooling is performed independently on each group channel to transform the shape of the output image of the group convolution module. ;

[0062] By flattening, the image form is reshaped into The flattening operation not only facilitates the transmission of data to quantum circuits for processing, but also retains spatial orientation information; the flattened image is used as the feature vector output by the pooling and flattening module; the 16 in the feature vector represents 16 features, specifically including feature groups in four rotation directions: 0°, 90°, 180°, and 270°, with each rotation direction feature group containing 4 features.

[0063] Step S4: Construct a group-equal variable sub-feature processing module. For the feature vectors output by the group pooling and flattening module, use four sets of qubits to encode the feature vectors onto each set of qubits according to the rotation direction information. Utilize the shared rotation gates and inter-group cyclic entanglement of each set to extract group-invariant features in the quantum state space through nonlinear transformation.

[0064] The specific execution steps of the group and other variable sub-feature processing module in step S4 are as follows:

[0065] Step S4.1: Apply the hyperbolic tangent function to the feature vector output by the pooling and flattening module and scale it to ensure that all input data is mapped to an effective quantum rotation angle range, as shown in the following equation:

[0066] ;

[0067] in, This represents the encoded feature vector, which is The result after normalization meets the input range requirements of quantum angle encoding, and the tensor shape remains unchanged. Each component is the input angle of the quantum rotation gate. Represents the hyperbolic tangent function. The feature vector output by the pooling and flattening module has the following shape: ;

[0068] Step S4.2: Use 16 qubits and divide them into 4 logical groups, each containing 4 qubits, as follows:

[0069] ;

[0070] ;

[0071] ;

[0072] ;

[0073] in, This represents the first of the four rotation directions: 0°, 90°, 180°, and 270°. A logical group, Indicates a logical group index. Indicates the first One quantum bit, Indicates the index of qubits;

[0074] Step S4.3: Employ angle encoding and a re-uploading strategy to encode the feature vector. Revolving gate mapped as a quantum gate ;

[0075] The re-upload strategy is a technique to enhance nonlinearity in quantum circuits. It involves repeatedly encoding classical input data at different layers of the quantum circuit, similar to increasing the number of layers in a classical neural network.

[0076] In one embodiment, amplitude encoding can be used instead of angle encoding to compress more dimensional group features into fewer qubits, although this may increase the depth of the encoding circuit.

[0077] For each qubit , apply Revolving door; the rotation angle of the revolving door is the encoded feature vector. The Each component, ultimately, is expressed as follows:

[0078] ;

[0079] in, The initial quantum state of a quantum circuit is a superposition state of qubits obtained by angular encoding of classical features, representing the initial state of the quantum circuit before processing. Represents the encoded feature vector The One component; This represents the ground state (spin-down state) of a qubit. The initial ground state for 16 qubits is... ; Represents the tensor product;

[0080] through After the rotation gate operation, each qubit returns to its ground state. Transformed into a superposition state, ultimately It is the direct product of the superposition states of 16 qubits, and is the input quantum state of the group-equal variable sub-circuit.

[0081] Among them, variational quantum circuits are a type of parameterized quantum computing model, whose parameters can be updated using classical optimization algorithms such as gradient descent.

[0082] Set the variational parameter matrix The shape is (L, 4, 3), where the first dimension L is the number of layers, the second dimension is the number of qubits in each logical group, and the third dimension represents the number of rotation axes. Three revolving doors;

[0083] For the variational parameter matrix, the first Layer, extracting a subset of parameters from the variational parameter matrix , The shape is (4×3), which means that three rotation gates are applied to each of the four qubits in a logic group;

[0084] Four of the logic groups share the same set of revolving doors. The The rotating gate used for each qubit, and The Each qubit is completely identical; this guarantees the rotational symmetry of the quantum operation itself.

[0085] Step S4.4: For each logic group, perform intra-group entanglement to form a ring-shaped CNOT connection within the logic group. The first logical group 1 quantum bit With the The first logical group The next qubit of 1 qubit Perform a CNOT connection, where... This represents the logical group index, corresponding to the four rotation directions of 0°, 90°, 180°, and 270° respectively; This represents a modulo-4 operation, used to implement a ring connection of qubits within a group; This represents the qubit index, corresponding to the four qubits within each logical group; when hour, ,correspond ;when hour, ,correspond This enables a ring connection between the last qubit and the first qubit within the group.

[0086] For the four logical groups, inter-group entanglement is performed, establishing cyclic entanglement between the qubits at corresponding positions; specifically as follows:

[0087] Interaction between 0° and 90° rotation directions: ;

[0088] Interaction between 90° and 180° rotation directions: ;

[0089] Interaction between 180° and 270° rotation directions: ;

[0090] Interaction between 270° and 0° rotation directions: ;

[0091] in, This indicates a CNOT connection.

[0092] This design allows information to flow in the group space (in different directions), enabling the network to distinguish the relative rotational relationships of features.

[0093] The quantum circuit diagrams in steps S2-S4 refer to Figure 2 .

[0094] Step S5: Construct a delayed aggregation and output module to measure all qubits in the quantum circuit, obtain the corresponding measurement results, aggregate the measurement results, obtain aggregated feature values, and classify them to complete the classification of the target image in the mixed image.

[0095] Delayed aggregation is a network design strategy that refers to reducing transformation-sensitive dimensions (such as rotations) only at deeper layers or the ends of the network to retain as much intermediate state information as possible. The specific execution steps of the delayed aggregation and output module in step S5 are as follows:

[0096] Step S5.1: Measure the Pauli-Z expectation values ​​of all 16 qubits, forming an output vector of form (B, 16) with values ​​ranging from [-1, 1]. The distribution of the 16 Pauli-Z expectation values ​​corresponding to the 16 qubits is as follows:

[0097] Indexes 0-3: Logic groups corresponding to the 0° rotation direction;

[0098] Indexes 4-7: Logic groups corresponding to a 90° rotation direction;

[0099] Indexes 8-11: Logic groups corresponding to 180° rotation directions;

[0100] Indexes 12-15: Logic groups corresponding to a 270° rotation direction;

[0101] Pauli-Z measurement is a standard measurement operation in quantum computing used to read the state of a qubit (spin up or spin down), and the result is usually mapped to +1 or -1.

[0102] Step S5.2: Reshape the output vector from (B, 16) to (B, 4, 4), where the first dimension B represents the batch size, the second dimension represents the logical group, and the third dimension represents the feature; perform summation or averaging operations on the logical group dimensions to obtain the aggregated feature values:

[0103] ;

[0104] in, Indicates the first The first image sample Each aggregated feature value represents a globally rotation-invariant prediction feature after delayed aggregation. This represents the batch index of the image sample, corresponding to the first image sample in the batch. One image sample; the value range is 0 to B-1; This represents the aggregated feature index, corresponding to the four global features output after delayed aggregation, with a value range of 0 to 3; This represents the first of the four rotation directions: 0°, 90°, 180°, and 270°. One logical group; Indicates the first The feature mapping function of each logical group represents the... The four measured values ​​are mapped to one feature value. In this embodiment, the feature value at the corresponding position within the group is directly taken, i.e. (The f-th eigenvalue of the g-th group).

[0105] Aggregate eigenvalues It exhibits strict invariance to global rotation of the input image while utilizing all relative geometric information from the intermediate process.

[0106] In one embodiment, in addition to summation or averaging, aggregated feature values ​​can also be calculated using maximum aggregation. Maximum aggregation may perform better in certain feature detection tasks (such as those that only need to detect the presence of something, regardless of its orientation).

[0107] Step S5.3: Aggregate eigenvalues The form is (B,4), for aggregated eigenvalues Perform binary classification to obtain the classification result of the target image.

[0108] In one embodiment, the quantum layer can be replaced with a classical group fully connected layer, which simulates parameter sharing and inter-group mixing operations on a classical computer. However, this would lose the potential advantages of quantum computing in high-dimensional Hilbert spaces (such as the implicit correlations resulting from entanglement).

[0109] Hilbert space is the mathematical space in which quantum states reside. It has extremely high dimensions and is the theoretical basis for quantum computing to handle complex feature maps.

[0110] The following is an application example of the present invention:

[0111] The quantum framework of this invention is implemented based on the pennylane+PyTorch framework. Taking a 28×28 single-channel image from the Fashion-MNIST dataset as an example, the loss and accuracy curves of this invention on the training and test sets are shown in the figure. Figure 3 The performance indicators are shown in Table 1 below:

[0112] Table 1. Performance metrics of the method of the present invention on the Fashion-MNIST dataset

[0113]

[0114] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned quantum classical hybrid image classification method based on group equivariance and delayed aggregation.

[0115] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned quantum classical hybrid image classification method based on group equivariance and delayed aggregation.

[0116] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A quantum-classical hybrid image classification method based on group equivariance and delayed aggregation, characterized in that, For the target image in the mixed image, perform the following steps S1-S5 to complete the classification of the target image: Step S1: Construct a lifting convolution module. Input a single-channel target image, initialize a convolution kernel, rotate the convolution kernel in four directions to obtain four rotated convolution kernels, use each rotated convolution kernel to convolve the target image, stack the convolution results to obtain the output image of the lifting convolution module. Step S2: Construct a group convolution module, input the output image of the lifting convolution module, convert the output image of the lifting convolution module into multiple independent image samples, process each image sample with convolution using the same convolution kernel weights, and perform an inverse reshaping operation on each image sample after convolution processing to obtain the output image of the group convolution module. Step S3: Construct a group pooling and flattening module. Perform adaptive average pooling on the output image of the group convolution module to compress the output image of the group convolution module into a structured feature vector containing information of four rotation directions, and obtain the feature vector output by the group pooling and flattening module. Step S4: Construct a group-equal variable sub-feature processing module. For the feature vectors output by the group pooling and flattening module, use four sets of qubits to encode the feature vectors onto each set of qubits according to the rotation direction information. Utilize the shared rotation gates and inter-group cyclic entanglement of each set to extract group-invariant features in the quantum state space through nonlinear transformation. Step S5: Construct a delayed aggregation and output module to measure all qubits in the quantum circuit, obtain the corresponding measurement results, aggregate the measurement results, obtain aggregated feature values, and classify them to complete the classification of the target image in the mixed image; The specific execution steps of the delayed aggregation and output module in step S5 are as follows: Step S5.1: Measure the Pauli-Z expectation values ​​of all 16 qubits, forming an output vector of form (B, 16) with values ​​ranging from [-1, 1]. The distribution of the 16 Pauli-Z expectation values ​​corresponding to the 16 qubits is as follows: Indexes 0-3: Logic groups corresponding to the 0° rotation direction; Indexes 4-7: Logic groups corresponding to a 90° rotation direction; Indexes 8-11: Logic groups corresponding to 180° rotation directions; Indexes 12-15: Logic groups corresponding to a 270° rotation direction; Step S5.2: Reshape the output vector from (B, 16) to (B, 4, 4), where the first dimension B represents the batch size, the second dimension represents the logical group, and the third dimension represents the feature; perform summation or averaging operations on the logical group dimensions to obtain the aggregated feature values: ; in, Indicates the first The first image sample One aggregated feature value, This represents the batch index of the image sample, with a value range of 0 to B-1. This represents the aggregate feature value index, with a value range of 0 to 3; This represents the first of the four rotation directions: 0°, 90°, 180°, and 270°. One logical group; Indicates the first Feature mapping functions for each logical group; Step S5.3: Aggregate eigenvalues The form is (B,4), for aggregated eigenvalues Perform binary classification to obtain the classification result of the target image.

2. The quantum classical hybrid image classification method based on group equivariance and delayed aggregation as described in claim 1, characterized in that, The specific details of the boosting convolution module mentioned in step S1 are as follows: Input a single-channel target image Target image The form is The first dimension The first dimension represents the batch size, the second dimension represents the number of channels, the third dimension represents the height of the target image, and the fourth dimension represents the width of the target image. Initialize a convolution kernel , shape ,in, This indicates the number of output channels of the convolutional layer. Indicates the size of the convolution kernel; generates the convolution kernel. exist Four rotated convolution kernels under the rotation group : ; ; ; ; In the formula, , , , They represent the convolution kernels respectively. Convolution kernels rotated by 0°, 90°, 180°, and 270°; This indicates that the image is rotated 90° counterclockwise. The numbers 1, 2, and 3 in parentheses represent the number of times the image is rotated 90° counterclockwise. Using four convolution kernels , , , For the input target image respectively To perform convolution, call the standard two-dimensional convolution operator as follows: ; in, This represents the output tensor of the convolution operation. Represents a two-dimensional convolution operation; This indicates the convolution kernel used in the convolution operation. Indicates the convolution stride. Indicates convolution padding; Stack the convolution results corresponding to the four convolution kernels to output an image with the shape of... Then, the dimensions are transformed again, and the image shape is reshaped. The first dimension The first dimension represents the batch size, the second dimension represents the group dimension, the third dimension represents the number of channels, the fourth dimension represents the image height, and the fifth dimension represents the image width.

3. The quantum classical hybrid image classification method based on group equivariance and delayed aggregation according to claim 2, characterized in that, The group convolution module mentioned in step S2 is as follows: The format of the output image of the boosting convolution module is changed from Transform into , are considered as B×4 independent image samples; Using the same convolution kernel weights The standard two-dimensional convolution processes B×4 image samples respectively; after the convolution output, an inverse reshaping operation is performed to maintain the shape of the output image as ( ); After three convolutions, the final image shape is ; In the first convolution, the kernel size k=11, and the convolution stride is... Convolution filling ; In the second convolution, the kernel size k=3, and the stride is... Convolution filling ; In the third convolution, the kernel size k=3, and the stride is... Convolution filling .

4. The quantum classical hybrid image classification method based on group equivariance and delayed aggregation as described in claim 3, characterized in that, The pooling and flattening module described in step S3 is as follows: Adaptive average pooling is performed independently on each group channel to transform the shape of the output image of the group convolution module. ; By flattening, the image form is reshaped into As the feature vector output by the pooling and flattening module; features The 16 in the vector represents 16 features, specifically including feature groups in four rotation directions: 0°, 90°, 180°, and 270°. Each feature group in the rotation direction contains 4 features.

5. The quantum classical hybrid image classification method based on group equivariance and delayed aggregation according to claim 4, characterized in that, The specific execution steps of the group and other variable sub-feature processing module in step S4 are as follows: Step S4.1: Apply the hyperbolic tangent function to the feature vector output by the pooling and flattening module and scale it, as shown in the following formula: ; in, This represents the encoded feature vector. Represents the hyperbolic tangent function. This represents the feature vector output by the pooling and flattening module; Step S4.2: Use 16 qubits and divide them into 4 logical groups, each containing 4 qubits, as follows: ; ; ; ; in, This represents the first of the four rotation directions: 0°, 90°, 180°, and 270°. A logical group, Indicates a logical group index. Indicates the first One quantum bit, Indicates the index of qubits; Step S4.3: Employ angle encoding and re-upload strategies to encode the feature vector. Revolving gate mapped as a quantum gate ; For each qubit , apply Revolving door; the rotation angle of the revolving door is the encoded feature vector. The Each component, ultimately, is expressed as follows: ; in, Represents the initial quantum state of a quantum circuit; Represents the encoded feature vector The One component; Represents the ground state of a quantum bit; Represents the tensor product; Set the variational parameter matrix The shape is (L, 4, 3), where the first dimension L is the number of layers, the second dimension is the number of qubits in each logical group, and the third dimension represents the number of rotation axes. Three revolving doors; For the variational parameter matrix, the first Layer, extracting a subset of parameters from the variational parameter matrix , The shape is (4×3), which means that three rotation gates are applied to each of the four qubits in a logic group; Four of the logic groups share the same set of revolving doors. The The rotating gate used for each qubit, and The Each quantum bit is completely identical; Step S4.4: For each logic group, perform intra-group entanglement to form a ring-shaped CNOT connection within the logic group. The first logical group 1 quantum bit With the The first logical group The next qubit of 1 qubit Perform a CNOT connection, where... This represents the logical group index, corresponding to the four rotation directions of 0°, 90°, 180°, and 270° respectively; Indicates modulo 4 operation; This represents the qubit index, corresponding to the four qubits within each logical group; For the four logical groups, inter-group entanglement is performed, establishing cyclic entanglement between the qubits at corresponding positions; specifically as follows: Interaction between 0° and 90° rotation directions: ; Interaction between 90° and 180° rotation directions: ; Interaction between 180° and 270° rotation directions: ; Interaction between 270° and 0° rotation directions: ; in, This indicates a CNOT connection.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a quantum classical hybrid image classification method based on group equivariance and delayed aggregation as described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a quantum classical hybrid image classification method based on group equivariance and delayed aggregation as described in any one of claims 1-5.