UNet-based quantum classical hybrid model and design method thereof

By introducing quantum neural networks into the UNet structure, the entanglement and encoding capabilities of qubits are used to solve the problem of insufficient channel information interaction in the UNet structure, and the model's expression ability and the dimensionality reduction effect of channel data are improved.

CN119250221APending Publication Date: 2025-01-03中电信量子信息科技集团有限公司

Patent Information

Application Number
CN202411344254.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing UNet structure connects the convolutional layer behind the encoder and decoder, resulting in less information interaction between different channels and weak model expression capabilities.

Method used

The quantum classic hybrid model based on UNet structure is adopted, features are extracted through the encoder, upsampled by the decoder, and dimensionality reduction is achieved by quantum neural networks, and the entanglement and encoding capabilities of qubits are used to enhance channel information interaction and improve model expression capabilities.

Benefits of technology

The interaction and learning ability of different channel information is enhanced, the expression ability of the model is improved, and the efficient dimensionality reduction of channel data is achieved. The number of output channels is lower than the number of channels in the input image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250221A_ABST
    Figure CN119250221A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum classical hybrid model based on a UNet structure and a design method of the quantum classical hybrid model. The quantum classical hybrid model comprises an encoder, a decoder and a quantum neural network, and the encoder is configured to extract features of an input image to obtain a feature image; the decoder is configured to perform up-sampling processing on the feature image to obtain a classic feature image, and the classic feature image comprises a plurality of channels; the quantum neural network is configured to perform dimension reduction on the classic feature image to obtain a target result and output the target result, and the number of channels of the target result is lower than that of channels of the processed image. According to the quantum classical hybrid model, the extraction of the features is completed through the encoder, the recovery of the features is completed through up-sampling by using the decoder, the processed image is obtained, and the dimension reduction is performed by using the quantum neural network, so that the information interaction of different channels is enhanced, and the screening and learning capabilities of the model on the information of different channels are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and more specifically, to a quantum-classical hybrid model based on a UNet structure and a design method for the quantum-classical hybrid model. Background Art

[0002] Convolutional neural networks are a powerful type of neural network that is widely used in many fields such as image, audio processing, and video processing. UNet is a convolutional neural network structure that consists of an encoder that continuously downsamples features and a decoder that upsamples features. This "encoder-decoder" structure allows the network to integrate contextual information at multiple scales.

[0003] In the related art, UNet connects a convolution layer after the encoder and decoder to reduce the dimension of the decoder output to obtain the target output. However, achieving dimensionality reduction through the convolution layer will result in less information interaction between different channels and weaker expression ability of the model. Summary of the invention

[0004] The embodiments of the present application provide a quantum-classical hybrid model based on a UNet structure and a design method for the quantum-classical hybrid model.

[0005] An embodiment of the present application provides a quantum-classical hybrid model based on a UNet structure, wherein the quantum-classical hybrid model includes an encoder, a decoder, and a quantum neural network, wherein the encoder is configured to extract features of an input image to obtain a feature image; the decoder is configured to upsample the feature image to obtain a classical feature image, wherein the classical feature image includes multiple channels; the quantum neural network is configured to reduce the dimension of the classical feature image to obtain a target result and output it, wherein the number of channels of the target result is lower than the number of channels of the processed image.

[0006] In this way, the quantum classical hybrid model and the design method of the quantum classical hybrid model of the implementation mode of the present invention use an encoder to complete the extraction of features, and then use a decoder to complete the recovery of features through upsampling to obtain a processed image, and then use a quantum neural network to reduce the dimension, thereby strengthening the information interaction of different channels and enhancing the model's ability to screen and learn information from different channels.

[0007] In some embodiments, the quantum neural network includes an encoding unit, which is used to encode the channel data of the classical feature image into a quantum state.

[0008] In this way, the channel data of the classical feature image is encoded into a quantum state through the encoding unit, thereby realizing the conversion of the classical feature image into a quantum state.

[0009] In some embodiments, the encoding unit is configured to encode the channel data onto multiple quantum bits according to an enhanced dense angular coding circuit to convert the channel data into a quantum state, and the enhanced dense angular coding circuit includes a CNOT gate, and the CNOT gate is configured to introduce entanglement to at least two of the quantum bits.

[0010] In this way, channel data is encoded onto multiple quantum bits according to the enhanced dense angle coding circuit, and in the strong dense angle coding circuit, a CNOT gate is introduced so that one quantum bit can encode at least two channel data.

[0011] In certain embodiments, the enhanced dense angle coding circuit includes an RZ gate, an RY gate, and a CNOT gate, wherein one CNOT gate is configured to introduce entanglement into two of the quantum bits, and the circuit where the quantum bits into which the entanglement is introduced by the CNOT gate includes two of the RZ gates and two of the RY gates, and the RZ gates and the RY gates can be used to encode the channel data onto the quantum bits.

[0012] In this way, channel data can be encoded on quantum bits through RZ gates and RY gates. By introducing entanglement between two quantum bits through CNOT, four channel data can be encoded on one quantum bit, further improving the utilization rate of quantum bits.

[0013] In some embodiments, the number of the qubits is an even number, and every two qubits are entangled by the CNOT gate.

[0014] In this way, when the number of quantum bits is an even number, the introduction of entanglement between every two quantum bits through the CNOT gate can double the amount of channel data that the quantum bits can encode.

[0015] In some embodiments, n of the quantum bits can encode 4n of the channel data.

[0016] In this way, by introducing the CNOT gate, more than 2 channel data can be encoded on each quantum bit, thereby improving the utilization rate of the quantum bit.

[0017] In some embodiments, if n qubits are entangled by the CNOT gate, one qubit can encode 2 n The channel data.

[0018] In this way, by introducing the CNOT gate to entangle multiple quantum bits, multiple channel data can be encoded on one quantum bit, thereby improving the utilization rate of the quantum bit.

[0019] In some embodiments, the quantum neural network further includes a quantum circuit and a measurement unit, wherein the quantum circuit includes a simulated unit, and the simulated unit is used to process the channel data of the quantum state to obtain quantum data; the measurement unit is configured to convert the quantum data into a classical state to obtain the target result.

[0020] In this way, the channel data of the quantum state can be processed and output according to the proposed unit and the measurement unit, thereby achieving dimensionality reduction of the classical feature image to obtain the target result with a lower number of channels.

[0021] In some embodiments, the number of channels of the classical feature image is proportional to the number of quantum bits of the quantum neural network.

[0022] The embodiment of the present application provides a design method of a quantum classical hybrid model as in any of the above embodiments, characterized in that the design method comprises:

[0023] Providing an encoder to extract features of an input image to obtain a feature image;

[0024] Providing a decoder to perform upsampling processing on the feature image to obtain a classic feature image, wherein the classic feature image includes multiple channels;

[0025] A quantum neural network is provided to reduce the dimension of the classical feature image to obtain a target result and output it, wherein the number of channels of the target result is lower than the number of channels of the processed image.

[0026] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0028] Figure 1 is a schematic diagram of a quantum classical hybrid model according to an embodiment of the present application;

[0029] Figure 2 It is a schematic diagram of the UNet structure of the prior art;

[0030] Figure 3 is a schematic diagram of a quantum classical hybrid model according to an embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a quantum neural network according to an embodiment of the present application;

[0032] Figure 5is a schematic diagram of a quantum circuit according to an embodiment of the present application;

[0033] Figure 6 It is a flowchart of the design method of the implementation method of the present application;

[0034] Figure 7 It is a flowchart of a data processing method according to an embodiment of the present application;

[0035] Figure 8 is a schematic diagram of regression task indicators in an implementation mode of the present application;

[0036] Fig. 9 It is a schematic diagram of the classification task indicators of the implementation mode of the present application. DETAILED DESCRIPTION

[0037] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0038] Convolutional neural networks are a powerful type of neural network that is widely used in many fields such as image, audio processing, and video processing. UNet is a convolutional neural network structure that consists of an encoder that continuously downsamples features and a decoder that upsamples features. This "encoder-decoder" structure allows the network to integrate contextual information at multiple scales.

[0039] In the related art, UNet connects a convolution layer after the encoder and decoder to reduce the dimension of the decoder output to obtain the target output. However, achieving dimensionality reduction through the convolution layer will result in less information interaction between different channels and weaker expression ability of the model.

[0040] Quantum computing is a technology that uses quantum mechanical principles such as entanglement and superposition to process information. As a new computing model, it shows potential revolutionary changes in many fields compared to classical computing. For example, quantum computing provides significant computing power in the field of machine learning. On the one hand, it can accelerate the training speed of complex neural network models. On the other hand, quantum computing also shows excellent potential in abstracting and modeling information. These advantages are that quantum machine learning provides new ideas and directions for solving many display problems.

[0041] Based on the above possible problems, please refer to Figure 1The embodiment of the present application provides a quantum classical hybrid model 1000 based on the UNet structure. The quantum classical hybrid model 1000 includes an encoder 100, a decoder 200 and a quantum neural network 300. The encoder 100 is configured to extract features of an input image to obtain a feature image; the decoder 200 is configured to upsample the feature image to obtain a classical feature image, and the classical feature image includes multiple channels; the quantum neural network 300 is configured to reduce the dimension of the classical feature image to obtain a target result and output it, and the number of channels of the target result is lower than the number of channels of the processed image.

[0042] Specifically, the UNet structure is a popular convolutional neural network architecture, which consists of a contraction path (encoder 100) and an expansion path (decoder 200) to form a "U"-shaped structure. Since UNet can integrate contextual information while maintaining spatial information, it is widely used in high-precision image segmentation, and its derivative network structures also have a large number of applications.

[0043] Furthermore, the UNet structure includes a multi-layer encoder 100 and a multi-layer decoder 200. The first layer encoder 100 is used to perform convolution processing on the input image to extract features to obtain the feature image of the first layer. The feature image of the first layer encoder 100 is downsampled, reduced in size and input into the second layer encoder 100. The second layer encoder 100 convolves the downsampled image to obtain the feature image of the second layer, and so on to obtain the feature images of the remaining layer encoders 100. The feature images obtained by each layer encoder 100 are fed back to the decoder 200 after skip connection, and are spliced ​​and upsampled in the decoder 200 to restore the features and obtain the classic feature image.

[0044] The size of the feature image obtained by convolution of each layer of encoder 100 may be different, for example, it may be gradually reduced from top to bottom to form a U-shaped structure. It is worth noting that Figure 1 The number of layers and the size of the feature map of the encoder 100 and the decoder 200 are for illustration only, and the actual number of layers and the actual size can be set as required.

[0045] See also Figure 2 In the related art, after the encoder and decoder of the UNet structure, a 1*1 convolution layer is also included, which is used to reduce the dimension of features and then output them. However, since the 1*1 convolution layer simply multiplies the features of multiple channels by weights to achieve dimensionality reduction, there is little interaction between the information of multiple channels, which makes the expression ability of the conventional UNet structure model weak.

[0046] See also Figure 3In the embodiment of the present invention, the 1*1 convolution layer is quantized, and a quantum neural network 300 is added after the encoder 100 and the decoder 200 of the UNet structure, and the quantum neural network 300 is used to replace the 1*1 convolution layer to reduce the dimension of the classical feature image to obtain the target result and output it. The high expression ability of the quantum neural network 300 for features is used to improve the interaction between the features of multiple channels, thereby improving the expression ability of the model of the UNet structure.

[0047] Furthermore, the quantum classical hybrid model 1000 of the embodiment of the present invention can be implemented based on various derivative neural networks of the UNet structure, for example, it can be implemented based on the UNet++ model, or based on the SmaAt-UNet model.

[0048] In one embodiment, the quantum-classical hybrid model 1000 is implemented based on the SmaAt-UNet model, that is, the last 1*1 convolutional layer of the conventional SmaAt-UNet model is replaced with the quantum neural network 300 to obtain the quantum-classical hybrid model 1000 .

[0049] In this way, the encoder 100 is used to extract the features, and then the decoder 200 is used to restore the features through upsampling to obtain a processed image, and then the quantum neural network 300 is used to reduce the dimension, thereby strengthening the information interaction between different channels and enhancing the model's ability to screen and learn information from different channels.

[0050] See also Figure 4 In some embodiments, the quantum neural network 300 includes an encoding unit 10, which is used to encode channel data of a classical feature image into a quantum state.

[0051] Specifically, the encoding unit 10 encodes the channel data of the classical feature image into a quantum state to achieve the conversion from the classical state to the quantum state, so that the channel data can be processed in the quantum neural network 300.

[0052] In this way, the channel data of the classical feature image is encoded into a quantum state through the encoding unit 10, thereby realizing the conversion of the classical feature image into a quantum state.

[0053] See also Figure 5 In some embodiments, the encoding unit 10 is configured to encode the channel data onto a plurality of quantum bits according to an enhanced dense angular coding circuit to convert the channel data into a quantum state, wherein the enhanced dense angular coding circuit includes a CNOT gate configured to introduce entanglement to at least two quantum bits.

[0054] Specifically, the encoding unit 10 can encode the channel data onto multiple quantum bits, so that the multiple quantum bits can carry the channel data of the classical characteristic image, thereby converting the channel data into a quantum state.

[0055] In the related art, density angle coding includes an Ry gate and an Rz gate, and two channel data can be encoded on one quantum bit according to the density angle coding circuit. Due to the scarcity of quantum resources, only two channel data are encoded on one quantum bit, which limits the size of the classical feature image, resulting in a limitation on the modeling ability of the classical part (encoder and decoder) for the feature.

[0056] In the embodiment of the present invention, encoding is performed according to an enhanced dense angle coding circuit, which introduces a CNOT gate to entangle multiple quantum bits together, so that the quantum bits can encode more channel data.

[0057] In one embodiment, see Figure 5 In a quantum circuit composed of enhanced density-angle coding circuits, the CNOT gate entangles two quantum bits together, allowing one quantum bit to encode four channel data.

[0058] In this way, channel data is encoded onto multiple quantum bits according to the enhanced dense angle coding circuit, and in the strong dense angle coding circuit, a CNOT gate is introduced so that one quantum bit can encode at least two channel data.

[0059] In certain embodiments, an enhanced dense angle coding circuit includes an RZ gate, an RY gate, and a CNOT gate, wherein a CNOT gate is configured to introduce entanglement into two quantum bits, and the circuit where the quantum bits entangled by the CNOT gate are located also includes two RZ gates and two RY gates, and the RZ gates and RY gates can be used to encode channel data onto the quantum bits.

[0060] Specifically, in the enhanced dense angle coding circuit, the circuit where a quantum bit is located includes RY gate, RZ gate, CNOT gate, RY gate and RZ gate in sequence. Among them, RZ gate and RY gate can be used to encode channel data on the quantum bit, that is, four channel data can be encoded on a quantum bit that is entangled by the CNOT gate.

[0061] In this way, channel data can be encoded on quantum bits through RZ gates and RY gates. By introducing entanglement between two quantum bits through CNOT, four channel data can be encoded on one quantum bit, further improving the utilization rate of quantum bits.

[0062] In some embodiments, the number of qubits is an even number, and every two qubits are entangled by a CNOT gate.

[0063] Specifically, the number of quantum bits can be multiple, for example, 2, 4, 8, etc. Every two quantum bits are entangled through a CNOT gate, and each line through which the quantum bits are located includes only one CNOT gate. By introducing entanglement between two quantum bits through a CNOT gate, the amount of channel data that can be encoded by each quantum bit can be doubled.

[0064] In one embodiment, the number of quantum bits is four, including Q1, Q2, Q3 and Q4, wherein Q1 and Q2 are entangled through a CNOT gate, and Q3 and Q4 are entangled through a CNOT gate.

[0065] It is worth noting that the two qubits entangled by the CNOT gate can be two adjacent qubits or two non-adjacent qubits in logical arrangement. For example, Q1 and Q3 are entangled by the CNOT gate.

[0066] Preferably, the two entangled quantum bits introduced by the CNOT gate may be two adjacent quantum bits in physical arrangement.

[0067] In this way, when the number of quantum bits is an even number, the introduction of entanglement between every two quantum bits through the CNOT gate can double the amount of channel data that the quantum bits can encode.

[0068] In some embodiments, n qubits can encode 4n channels of data.

[0069] Specifically, since channel data can be encoded onto quantum bits through RZ gates and RY gates, and entanglement is introduced between every two quantum bits through CNOT gates, so that the circuit where each quantum bit is located includes two RZ gates and two RY gates, each quantum bit can encode 4 channel data, and n quantum bits can encode 4n channel data.

[0070] In this way, by introducing the CNOT gate, more than 2 channel data can be encoded on each quantum bit, thereby improving the utilization rate of the quantum bit.

[0071] In some embodiments, if n qubits are entangled together by a CNOT gate, then one qubit can encode 2 n Channel data.

[0072] Specifically, in the related technology, one quantum bit can only encode 2 channel data. Due to the limitation of quantum resources, the output size of the classical part is limited, which is not conducive to the effective extraction of features.

[0073] In the embodiment of the present invention, the enhanced dense angle coding circuit introduces a CNOT gate to entangle some quantum bits together, so that the channel data that can be encoded by each entangled quantum bit is doubled, so that one quantum bit can encode more channel data, reducing the limitation of the classical part by quantum resources. If n quantum bits are entangled by the CNOT gate together, then one quantum bit can encode 2 n Channel data.

[0074] In one embodiment, the number of quantum bits is three, and the three quantum bits are entangled together through a CNOT gate, so each quantum bit can encode 8 channel data.

[0075] In this way, by introducing the CNOT gate to entangle multiple quantum bits, multiple channel data can be encoded on one quantum bit, thereby improving the utilization rate of the quantum bit.

[0076] In some embodiments, the quantum neural network 300 further includes a simulated unit 20 and a measurement unit 30. The simulated unit 20 is used to process the channel data of the quantum state to obtain quantum data; the measurement unit 30 is configured to convert the quantum data into a classical state to obtain a target result.

[0077] Specifically, the quantum neural network 300 is implemented based on a quantum circuit, and a pseudo circuit (Ansatz) is added to the quantum circuit to construct a variational quantum circuit, which can be used to learn the channel data of the quantum state and process it to obtain quantum data. The pseudo unit 20 has a trainable weight, and the trainable weight can be continuously adjusted with training. The measurement unit 30 can be used to measure to convert quantum data from a quantum state to a classical state to obtain and output a target result, and the number of channels of the target result is less than the number of channels of the classical feature image, thereby achieving dimensionality reduction processing.

[0078] In this way, according to the proposed unit 20 and the measuring unit 30, the channel data of the quantum state can be processed and output, thereby achieving dimensionality reduction of the classical feature image to obtain a target result with a lower number of channels.

[0079] In some embodiments, the number of channels of the classical feature image is limited by the number of quantum bits of the quantum neural network 300.

[0080] Specifically, since the number of channel data that can be encoded by a quantum bit is limited, the number of channels of the classical feature image output by the decoder 200 is limited by the number of quantum bits of the quantum neural network 300. For example, when the number of quantum bits is 8 and every two quantum bits are entangled by the CNOT gate, the number of channels of the classical feature image is at most 32.

[0081] In this way, according to the number of quantum bits of the quantum neural network 300 and the enhanced dense angle coding circuit, the maximum number of channels of the classical feature image that the encoder 100 can output can be determined.

[0082] See also Figure 6 The embodiment of the present application provides a design method of a quantum classical hybrid model 1000, the design method comprising:

[0083] 011: providing an encoder 100 to extract features of an input image to obtain a feature image;

[0084] 012: providing a decoder 200 to perform upsampling processing on the feature image to obtain a classic feature image, where the classic feature image includes multiple channels;

[0085] 013: Provide a quantum neural network 300 to reduce the dimension of the classical feature image to obtain a target result and output it, and the number of channels of the target result is lower than the number of channels of the processed image.

[0086] The explanation of the quantum classical hybrid model 1000 of the embodiment of the present invention is also applicable to the design method of the embodiment of the present invention, and will not be repeated here.

[0087] In this way, the encoder 100 is used to extract the features, and then the decoder 200 is used to restore the features through upsampling to obtain a processed image, and then the quantum neural network 300 is used to reduce the dimension, thereby strengthening the information interaction between different channels and enhancing the model's ability to screen and learn information from different channels.

[0088] See also Figure 7 The embodiment of the present application provides a data processing method, which is implemented based on the quantum classical hybrid model 1000 based on the UNet structure as any of the above embodiments, and the data processing method includes:

[0089] 021: Input the meteorological image into the encoder 100 and extract the features of the input image to obtain a feature image;

[0090] 022: Input the feature image into the decoder 200 and perform upsampling processing to obtain a classical processed image, where the classical processed image includes multiple channels;

[0091] 023: Input the classical feature image into the quantum neural network 300, and obtain the prediction result after reducing the dimension of the classical feature image and output it. The number of channels of the prediction result is lower than the number of channels of the classical processing image.

[0092] The embodiment of the present application provides a computer device, which includes one or more processors and a memory. The memory can be used to input a meteorological image into an encoder 100 and extract features of the input image to obtain a feature image; and to input the feature image into a decoder 200 and perform upsampling processing to obtain a classical processing image, which includes multiple channels; and can also be used to input a classical feature image into a quantum neural network 300, and obtain a prediction result after dimensionality reduction of the classical feature image and output it, and the number of channels of the prediction result is lower than the number of channels of the classical processing image.

[0093] An embodiment of the present application provides a data processing device, which includes a first module, a second module and a third module. The first module is used to input a meteorological image into an encoder 100 and extract features of the input image to obtain a feature image; the second module is used to input the feature image into a decoder 200 and perform upsampling processing to obtain a classical processed image, and the classical processed image includes multiple channels; the third module is used to input the classical feature image into a quantum neural network 300, and obtain and output a prediction result after dimensionality reduction of the classical feature image, and the number of channels of the prediction result is lower than the number of channels of the classical processed image.

[0094] Specifically, the meteorological image includes multiple images containing precipitation data for a specified time period in the past. The meteorological image may include grid point data containing longitude and latitude, and each point represents the rainfall in a certain hour at the intersection of the longitude and latitude. For example, the meteorological image may be an image obtained by testing the rainfall in a certain place every hour for several consecutive months.

[0095] In some embodiments, hourly precipitation data from May to September in a certain place is collected as an image dataset, with a total of about 3,600 consecutive hours of rainfall data, that is, about 3,600 images. Three days of data are extracted from the image dataset as a test set, and the remaining images are divided into a training set and a validation set in a ratio of 8:2.

[0096] Furthermore, the meteorological images are preprocessed to avoid the appearance of zero values. The values ​​contained in the training set and the validation set are added with preset values ​​and then the logarithm is taken. Then the data are normalized according to the maximum and minimum values ​​so that the data values ​​are distributed in (0, 1]. The preset value is a preset smaller value, for example, it can be 0.001. The preset value can also be other values, which are not limited here.

[0097] For the prediction result, a sunny or rainy day threshold can be set. If the prediction result is greater than the sunny or rainy day threshold, it is predicted to be a rainy day. If it is less than the sunny or rainy day threshold, it is predicted to be a sunny day. In one embodiment, the sunny or rainy day threshold is set to 0.5, and the prediction result is greater than 0.5 and is considered to be a rainy day.

[0098] Mean Squared Error (MSE) is a commonly used indicator to measure the difference between the model prediction value and the actual observation value, and is used to evaluate the degree of fit of the model on the given data. MSE is obtained by taking the average of the squares of the difference between the preset meteorological results and the predicted meteorological results.

[0099] Mean Absolute Error (MAE) is a commonly used indicator to measure the difference between the model prediction value and the actual observation value, and is used to evaluate the degree of fit of the model on the given data. MAE is obtained by averaging the absolute value of the difference between the preset meteorological results and the predicted meteorological results.

[0100] Accuracy can be used to measure the performance of the quantum classical hybrid model 1000. Accuracy can indicate the proportion of correct predictions made by the model among all predictions. Accuracy is applicable to classification problems, especially when the class distribution is relatively balanced. It can be used to evaluate the performance of the quantum classical hybrid model 1000 in predicting sunny and rainy day classification.

[0101] In one embodiment, the quantum classical hybrid model 1000 is implemented based on the SmaAt-UNet model. The quantum classical hybrid network is trained using the Adam optimizer with a learning rate of 0.01. The comparison between the quantum classical hybrid network and the conventional SmaAt-UNet model in the regression task and classification task of weather forecasting is shown in Figure 1. Figure 8 and Fig. 9 As shown. Among them, Figure 8 It can reflect the comparison between the quantum classical hybrid model 1000 and the classical model on the regression task. The effect of processing the regression task can be evaluated by the mean absolute error and the mean square error. Fig. 9 The results show the comparison between the quantum classical hybrid model 1000 and the classical model in the classification task. The effect of processing the classification task can be evaluated by accuracy, recall and F1 score. It can be seen that the quantum model has achieved better prediction results in the regression task. In the classification task, the accuracy and recall of the quantum classical hybrid model 1000 are higher than those of the conventional SmaAt-UNet model.

[0102] In this way, the encoder 100 is used to extract the features, and then the decoder 200 is used to restore the features through upsampling to obtain a processed image, and then the quantum neural network 300 is used to reduce the dimension, thereby strengthening the information interaction between different channels and enhancing the model's ability to screen and learn information from different channels.

[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0104] In addition, the term "connection" should be understood in a broad sense, for example, it can include fixed connection, detachable connection, or integral connection; it can include direct connection, indirect connection through an intermediate medium, and internal communication between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0105] In addition, 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. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0106] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0107] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A quantum classical hybrid model based on UNet structure, characterized in that: The quantum classical hybrid model includes: An encoder configured to extract features of an input image to obtain a feature image; A decoder, wherein the decoder is configured to perform upsampling processing on the feature image to obtain a classic feature image, wherein the classic feature image includes multiple channels; A quantum neural network, wherein the quantum neural network is configured to obtain a target result after reducing the dimension of the classical feature image and output the target result, and the number of channels of the target result is lower than the number of channels of the classical feature image.

2. The quantum classical hybrid model according to claim 1, characterized in that The quantum neural network comprises: An encoding unit is used to encode the channel data of the classical feature image into a quantum state.

3. The quantum classical hybrid model according to claim 2, characterized in that: The encoding unit is configured to encode the channel data onto a plurality of quantum bits according to an enhanced dense angle coding circuit to convert the channel data into a quantum state. The enhanced dense angle coding circuit includes a CNOT gate configured to introduce entanglement to at least two of the quantum bits.

4. The quantum classical hybrid model according to claim 3, characterized in that: The enhanced dense angle coding circuit includes an RZ gate, an RY gate and a CNOT gate. One of the CNOT gates is configured to introduce entanglement into the two quantum bits. The circuit where the quantum bits entangled by the CNOT gate are located also includes two RZ gates and two RY gates. The RZ gates and the RY gates can be used to encode the channel data onto the quantum bits.

5. The quantum classical hybrid model according to claim 3, characterized in that: The number of the quantum bits is an even number, and every two quantum bits are entangled through the CNOT gate.

6. The quantum classical hybrid model according to claim 5, characterized in that: The n quantum bits can encode 4n channel data.

7. The quantum classical hybrid model according to claim 3, characterized in that: If n qubits are entangled by the CNOT gate, then one qubit can encode 2 n The channel data.

8. The quantum classical hybrid model according to claim 1, characterized in that: The quantum neural network also includes: A proposed unit, the proposed unit is used to process the channel data of the quantum state to obtain a quantum neural network; A measuring unit, wherein the measuring unit is configured to convert the quantum neural network into a classical state to obtain the target result.

9. The quantum classical hybrid model according to claim 1, characterized in that: The number of channels of the classical feature image is proportional to the number of quantum bits of the quantum neural network.

10. A method for designing a quantum classical hybrid model according to any one of claims 1 to 9, characterized in that: The design method comprises: Providing an encoder to extract features of an input image to obtain a feature image; Providing a decoder to perform upsampling processing on the feature image to obtain a classic feature image, wherein the classic feature image includes multiple channels; A quantum neural network is provided to reduce the dimension of the classical feature image to obtain a target result and output it, wherein the number of channels of the target result is lower than the number of channels of the processed image.

Citation Information

Patent Citations

  • Design method and system of quantum convolutional neural network based on quantum circuit

    CN116341666A

  • Image segmentation method and device based on quantum classical hybrid neural network

    CN116740343A

  • Quantum data generation method and system, storage medium, computer equipment and terminal

    CN117035104A

  • Quantum neural network for noisy medium-sized quantum device

    CN117642752A

  • Dynamic magnetic resonance imaging method, model training method, device, equipment and medium

    CN117710514A

Cited By

  • Three-dimensional cloud structure prediction system based on quantum enhanced neural operator

    CN121746590A