A method for constructing a hybrid quantum-classical UNet++ neural network and related devices
Patent Information
- Application Number
- CN202411036078.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2044-07-31
AI Technical Summary
[0005]本发明的目的是提供一种混合量子经典UNet++神经网络的构建方法,以解决现有技术中的技术问题
[0029]与现有技术相比,本发明通过构建混合量子经典UNet++神经网络,不仅能够有效降低模型的参数量,且能够借助量子的并行性有效进行遥感图像分割,提高了目标分割的准确性。
Smart Images

Figure CN119005254B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum computing technology, and in particular to a method and apparatus for constructing a hybrid quantum classical UNet++ neural network. Background Technology
[0002] Building extraction in remote sensing images refers to the automatic identification process of building and non-building pixels in remote sensing images. Building extraction plays an important role in many applications, such as urban planning, population estimation, economic activity distribution, and disaster reporting.
[0003] In response to the problem that buildings occupy a very small proportion of remote sensing satellite images, with individual buildings typically only making up a small fraction of the image pixels, and the explosive growth of high-resolution remote sensing image data, resulting in massive remote sensing image datasets, these issues are attracting increasing attention from academia and industry.
[0004] Given the rapid growth of data and the complexity of machine learning models used for analysis, the required computing power has become a major obstacle to automatically understanding image tasks using machine learning algorithms. Summary of the Invention
[0005] The purpose of this invention is to provide a method for constructing a hybrid quantum classical UNet++ neural network to solve the technical problems in the prior art.
[0006] In a first aspect, the present invention provides a method for constructing a hybrid quantum classical UNet++ neural network, comprising:
[0007] Construct a quantum convolution kernel, which comprises n qubits, by constructing a parameterized quantum circuit of n qubits;
[0008] The image is segmented to obtain several target regions, each of which includes at least one pixel, and each pixel provides its own pixel feature information.
[0009] Each target region is traversed sequentially, and the quantum convolution feature map corresponding to each target region is obtained based on the quantum convolution kernel;
[0010] The quantum convolution feature maps are sequentially concatenated to obtain quantum input convolutional layers, and the output of multiple quantum input convolutional layers is a three-dimensional array;
[0011] The three-dimensional array is fused with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network.
[0012] In the method for constructing a hybrid quantum classical UNet++ neural network as described above, preferably, the quantum convolution kernel includes a quantum state encoding unit, an evolution unit, and a measurement unit, wherein:
[0013] The quantum state encoding unit is used to encode the feature information of n pixels in the target region onto the corresponding quantum bits;
[0014] The evolution unit is used to associate the quantum state information of the qubit and extract the pixel feature information carried by the quantum state information as the output quantum state;
[0015] The measurement unit is used to perform measurement operations on the qubit.
[0016] In the above-described method for constructing a hybrid quantum classical UNet++ neural network, preferably, the quantum state encoding unit includes n H gates and n first quantum rotation gate units arranged sequentially along the action time sequence, each H gate and each first quantum rotation gate unit corresponds to one qubit, and the rotation control parameters of the first quantum rotation gate unit are adjusted according to the pixel feature information.
[0017] In the method for constructing a hybrid quantum classical UNet++ neural network as described above, preferably, the first quantum rotation gate unit includes one or more of a first RX gate, a first RY gate, and a first RZ gate.
[0018] In the method for constructing a hybrid quantum classical UNet++ neural network as described above, preferably, the first quantum rotation gate unit includes a first RY gate and a first RZ gate arranged sequentially along the action time sequence, and the rotation control parameters of the first RY gate and the first RZ gate are adjusted individually according to the pixel feature information.
[0019] In the above-described method for constructing a hybrid quantum classical UNet++ neural network, preferably, the evolution unit includes several sub-evolution units arranged sequentially along the action time sequence. Each sub-evolution unit includes n second quantum rotation gate units and n-1 CNOT gates arranged sequentially along the action time sequence, and each second quantum rotation gate unit and each CNOT gate corresponds to one qubit.
[0020] In the method for constructing a hybrid quantum classical UNet++ neural network as described above, preferably, the second quantum rotation gate unit includes one or more of a second RX gate, a second RY gate, and a second RZ gate.
[0021] In the method for constructing a hybrid quantum classical UNet++ neural network as described above, preferably, the first quantum rotation gate unit includes a second RY gate.
[0022] In a second aspect, the present invention provides a construction apparatus, the apparatus comprising:
[0023] The information acquisition module is used to segment the image to obtain several target regions. Each target region includes at least one pixel, and each pixel provides pixel feature information.
[0024] The processing module is used to obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel;
[0025] The splicing module splices the quantum convolution feature maps sequentially to obtain quantum input convolutional layers, and the output of multiple quantum input convolutional layers is a three-dimensional array;
[0026] The generation module fuses the three-dimensional array with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network.
[0027] Thirdly, the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the aforementioned method at runtime.
[0028] Fourthly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the aforementioned method.
[0029] Compared with existing technologies, this invention constructs a hybrid quantum classical UNet++ neural network, which not only effectively reduces the number of model parameters, but also leverages the parallelism of quantum mechanics to effectively segment remote sensing images, thereby improving the accuracy of target segmentation. Attached Figure Description
[0030] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of this application;
[0031] Figure 2 This is a schematic diagram of the structure of a hybrid quantum classical UNet++ neural network provided in an embodiment of this application;
[0032] Figure 3 This is a flowchart illustrating a method for constructing a hybrid quantum classical UNet++ neural network provided in an embodiment of this application;
[0033] Figure 4 A schematic diagram of a quantum convolution kernel provided in an embodiment of this application;
[0034] Figure 5 This is a schematic diagram of a construction device provided in an embodiment of this application. Detailed Implementation
[0035] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0036] [Structure of a quantum circuit construction system]
[0037] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of this application. The quantum circuit construction system may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.
[0038] Network 110 is a medium used to provide communication links between various devices and computers connected together within a quantum circuit construction system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.
[0039] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.
[0040] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the quantum circuit construction method provided in the embodiments of this application.
[0041] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.
[0042] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.
[0043] The aforementioned classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, the first device, including the classical processing system 160, runs a classical computer operating system that provides quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum applications using the quantum application development tools and services on the second device and send the quantum program to the second device, including the quantum processing system 170, via the network services. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.
[0044] In the classic silicon-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of these computing units in a silicon chip is sufficient; currently, a classic processor contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.
[0045] Unlike the logic units in the classical processing system 160, the basic computational unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logic function combinations to achieve computational effects.
[0046] Based on these differences, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit's use) is crucial to improving the computational performance of quantum computers and requires specialized design. The aforementioned design considerations for qubits are technical issues that ordinary computing devices do not need to address.
[0047] [Method for constructing a hybrid quantum classical UNet++ neural network]
[0048] The classic UNet++ neural network is a deep learning network architecture that improves and extends the original classic UNet neural network to enhance the accuracy and efficiency of image segmentation. The structure of the classic UNet++ neural network can be found in existing network architectures and will not be elaborated here.
[0049] like Figure 2 This is a schematic diagram of the structure of a UNet++ neural network with quantum input convolutional layers. The UNet++ neural network with quantum input convolutional layers provided in this embodiment replaces the classical input convolutional layers in the classic UNet++ neural network. The quantum input convolutional layers are prepared using parameterized quantum circuits, which perform feature extraction and quantum parallel computing. In feature extraction of remote sensing images, the advantages of quantum computing, such as quantum parallelism or interference and entanglement effects, are used as resources to improve the processing efficiency of the UNet++ neural network.
[0050] In the embodiments provided by the present invention, such as Figure 3 and Figure 4As shown, the method for constructing the hybrid quantum classical UNet++ neural network includes the following steps:
[0051] Step S101: Construct a quantum convolution kernel, which consists of n qubits. The quantum convolution kernel is obtained by constructing a parameterized quantum circuit with n qubits.
[0052] The number of corresponding qubits in the quantum convolution kernel is predetermined and can be determined based on the number of qubits supported by the quantum device. The number of qubits in the quantum convolution kernel is less than or equal to the number of qubits supported by the quantum device. In one feasible implementation, as shown in the figure, the quantum convolution kernel includes 4 qubits and 4 parameterized quantum circuits.
[0053] Step S102: The image is segmented to obtain several target regions. The image can be divided into multiple target regions according to longitude and latitude. Each target region includes at least one pixel. In this way, all pixels of the image are divided into multiple target regions arranged in a grid. The number of pixels in each target region corresponds to the number of qubits in the quantum convolution kernel.
[0054] Each pixel provides its own pixel feature information. The values of the pixel feature information provided by different pixels can be the same or different, which is not limited here. Each pixel corresponds to a qubit setting, thereby encoding the pixel feature information reflected by each pixel onto the quantum circuit where the corresponding qubit is located.
[0055] In one feasible implementation, the quantum convolution kernel includes 4 qubits, so the size of the target region obtained by image segmentation is 2*2, and the width and height of the target region are both 2. It includes 4 pixels. Since each pixel provides a pixel feature information, the pixel feature information is described by gray value. The gray value range is [0,1], where 0 represents black and 1 represents white. Thus, each target region can provide gray value information of 4 pixels. The 4 gray value information will be encoded into the quantum circuit where the 4 qubits are located.
[0056] Step S103: Iterate through each target region sequentially and obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel.
[0057] Optionally, the pixel feature information of each target region is quantum-encoded and transformed by a quantum convolution kernel to obtain the output quantum state corresponding to each target region. Based on the output quantum state, a quantum convolution feature map is obtained. The quantum convolution feature map includes the quantum state corresponding to each pixel in the target region, that is, the intrinsic feature relationship between the pixel feature information of each pixel. By changing the control parameters in the quantum convolution kernel, different output quantum states and quantum convolution feature maps can be obtained for each target region.
[0058] Step S104: The quantum convolution feature maps are sequentially concatenated to obtain quantum input convolutional layers, and the output of multiple quantum input convolutional layers is a three-dimensional array.
[0059] Optionally, the quantum convolution feature maps corresponding to each target region are arranged according to the latitude and longitude coordinates corresponding to the original image to obtain quantum convolution layers. Furthermore, by changing the control parameters within the quantum convolution kernel to obtain different quantum convolution feature maps, different quantum convolution layers can be obtained, thus outputting a three-dimensional array, as shown below. Figure 4 As shown, a total of six different quantum convolutional layers were obtained, and the six different quantum convolutional layers were combined into a three-channel three-dimensional array.
[0060] Step S105: Fuse the three-dimensional array with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network, referring to... Figure 2 As shown, a quantum convolutional layer replaces the input convolutional layer in the classic UNet++ to obtain the corresponding quantum convolutional neural network. QConv in the attached figure is the quantum convolutional layer output by the quantum convolutional kernel of this invention. By using a multi-faceted output fusion strategy to fuse features from different semantic layers, a hybrid quantum-classical remote sensing image semantic segmentation UNet++ neural network is completed. By leveraging the parallelism of quantum mechanics, remote sensing image segmentation is effectively performed, partially accelerating network computation, effectively reducing the number of model parameters, and thus improving the efficiency of feature extraction and data processing.
[0061] Regarding the specific structure of the quantum convolution kernel, this embodiment of the invention provides a quantum convolution kernel, referring to... Figure 4 As shown, the quantum convolution kernel includes quantum state encoding units, evolution units, and measurement units, which are arranged sequentially, wherein:
[0062] The quantum state encoding unit is used to encode the feature information of n pixels in the target area onto the corresponding qubit. In the embodiment provided by the present invention, four qubits are used to form a 2*2 filter. The quantum encoding adopts the angle encoding method to input the feature information of the four pixels in the target area (e.g., four gray values) into the RX gate, RY gate or RZ gate.
[0063] In the embodiments provided in this application, the quantum state encoding unit includes n H gates and n first quantum rotation gate units arranged sequentially along the action time sequence. Each H gate and each first quantum rotation gate unit corresponds to a qubit. The rotation control parameters of the first quantum rotation gate units are adjusted according to the pixel feature information, thereby enabling quantum state encoding of the n pixel feature information. Optionally, the n pixel feature information is used as the rotation control parameters of the n first quantum rotation gate units respectively.
[0064] The H gate can convert a qubit in the ground state into a superposition state. The first quantum rotation gate unit is a single-qubit rotation gate, including one or more of the first RX gate, the first RY gate, and the first RZ gate. After performing the operation of the first quantum rotation gate unit, only the amplitude of the quantum state changes.
[0065] Preferably, the first quantum rotation gate unit includes a first RY gate and a first RZ gate arranged sequentially along the activation time sequence. The rotation control parameters of the first RY gate and the first RZ gate are adjusted individually according to the pixel feature information. In one feasible embodiment, the rotation control parameter of the first RY gate is set to arctanx, and the rotation control parameter of the first RZ gate is set to arctanx. 2 x represents the pixel feature information of the pixel corresponding to the qubit of this quantum circuit, such as the gray value.
[0066] The evolution unit is used to associate the quantum state information of the qubit and extract the pixel feature information carried by the quantum state information as the output quantum state. In the embodiments provided in this application, a combination of rotation and entanglement gates is applied to the qubit after encoding to obtain the output quantum state.
[0067] In the embodiments provided by the present invention, the evolution unit includes several sub-evolution units arranged sequentially along the action time sequence. The sub-evolution units are repeated multiple times to increase the depth of evolution, thereby increasing the number of parameters, enhancing the expressive power of the model, capturing complex features, and improving the entanglement of quantum states.
[0068] The sub-evolutionary unit includes n second quantum rotation gate units and n-1 CNOT gates arranged sequentially along the action time sequence. Each second quantum rotation gate unit and each CNOT gate corresponds to a qubit. Except for the CNOT gate that acts on the least significant qubit, the control bit of the CNOT gate is the least significant qubit adjacent to the qubit it acts on, and the control bit of the CNOT gate of the least significant qubit is the most significant qubit.
[0069] The second quantum rotation gate unit is a single-qubit rotation gate, which includes one or more of the second RX gate, second RY gate, and second RZ gate. After performing a single-qubit rotation gate operation, only the amplitude of the quantum state changes. CNOT, on the other hand, is a two-qubit controlled NOT gate. CNOT gates are used to construct entanglement relationships between qubits, forming multi-qubit entanglement.
[0070] The rotation control parameters of the second quantum rotating gate unit are not fixed in advance. They need to be updated during the iterative optimization process based on the gradient descent method. The values of the rotation control parameters of the second quantum rotating gate unit are determined as follows: First, for multiple quantum input convolutional layers, each quantum input convolutional layer encodes the input image in a fixed way and initializes a set of parameters. Then, quantum circuits are constructed according to the initialized angles, and the output feature values are measured until multiple different three-dimensional arrays are output. Then, the UNet++ network is trained. The rotation parameters of the second quantum rotating gate unit are updated through backpropagation of the model loss function.
[0071] Preferably, the first quantum rotation gate unit includes a second RY gate.
[0072] The measurement unit is used to perform measurement operations on the qubits, taking into account the expected value of each qubit by computationally based measurements. The result is a fixed-length vector that needs to be further processed on a classical computer and is stored in the quantum convolution feature map.
[0073] In summary, the remote sensing image segmentation technique fused with hybrid classical-quantum UNet++ feature extraction provided in this invention can be used to solve real-world problems currently faced by quantum computers. The framework using quantum convolution and variational circuitry to update parameters maintains the nonlinearity of classical convolution, the locality of convolutional layers, and the ability to extend to deeper structures. Furthermore, the generalized feature map with parametric quantum circuitry can explore the correlation between adjacent data points in an exponentially large linear space, potentially enabling quantum computers to capture patterns in datasets more accurately. The framework using VQNet to automatically compute the gradient of the hybrid quantum-classical loss function offers the potential for achieving higher accuracy in the semantic segmentation of remote sensing satellite images.
[0074] [Structure of the construction device]
[0075] See Figure 5 As shown, the construction apparatus includes:
[0076] The information acquisition module is used to segment the image to obtain several target regions. Each target region includes at least one pixel, and each pixel provides pixel feature information.
[0077] The processing module is used to obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel.
[0078] The splicing module sequentially splices the quantum convolution feature maps to obtain quantum input convolutional layers, and the output of multiple quantum input convolutional layers is a three-dimensional array.
[0079] The generation module fuses the three-dimensional array with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network.
[0080] [Structure of storage media]
[0081] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to implement the steps in any of the above method embodiments when running.
[0082] Specifically, in this embodiment, the storage medium can be configured to store a computer program for implementing the following steps:
[0083] S101: Construct a quantum convolution kernel, which consists of n qubits. The quantum convolution kernel is obtained by constructing a parameterized quantum circuit with n qubits.
[0084] S102: The image is segmented to obtain several target regions. Each target region includes at least one pixel, and each pixel provides pixel feature information.
[0085] S103: Iterate through each target region sequentially and obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel.
[0086] S104: The quantum convolution feature maps are sequentially concatenated to obtain quantum input convolutional layers. The output of multiple quantum input convolutional layers is a three-dimensional array.
[0087] S105: The three-dimensional array is fused with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network.
[0088] Structure of electronic devices
[0089] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the steps in any of the above method embodiments.
[0090] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0091] Specifically, in this embodiment, the processor described above can be configured to implement the following steps via a computer program:
[0092] S101: Construct a quantum convolution kernel, which consists of n qubits. The quantum convolution kernel is obtained by constructing a parameterized quantum circuit with n qubits.
[0093] S102: The image is segmented to obtain several target regions. Each target region includes at least one pixel, and each pixel provides pixel feature information.
[0094] S103: Iterate through each target region sequentially and obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel.
[0095] S104: The quantum convolution feature maps are sequentially concatenated to obtain quantum input convolutional layers. The output of multiple quantum input convolutional layers is a three-dimensional array.
[0096] S105: The three-dimensional array is fused with the classical UNet++ neural network to obtain a hybrid quantum classical UNet++ neural network.
[0097] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. A method for constructing a hybrid quantum classical UNet++ neural network, characterized in that, include: Construct a quantum convolution kernel, which comprises n qubits, by constructing a parameterized quantum circuit of n qubits; The image is segmented to obtain several target regions, each containing n pixels, and each pixel provides its own feature information; wherein, the number of pixels in the target region is proportional to the number of qubits in the quantum convolution kernel. Correspondingly; Each target region is traversed sequentially, and the quantum convolution feature map corresponding to each target region is obtained based on the quantum convolution kernel; The quantum convolution feature maps are sequentially concatenated according to the latitude and longitude coordinates corresponding to the original image to obtain quantum input convolutional layers. Multiple quantum input convolutional layers are integrated and output into a three-dimensional array. The three-dimensional array is used as the input layer of the downsampling path of the classical UNet++ neural network to replace the classical first input convolutional layer in the classical UNet++ neural network, and a hybrid quantum classical UNet++ neural network is obtained by fusing them. The quantum convolution kernel includes a quantum state encoding unit, an evolution unit, and a measurement unit; the evolution unit is used to associate the quantum state information of the qubit and extract the pixel feature information carried by the quantum state information as the output quantum state; The evolution unit includes several sub-evolution units arranged sequentially along the action time sequence to increase the depth and number of parameters of the parameterized quantum circuit. The sub-evolution unit includes n second quantum rotation gate units arranged sequentially along the action time sequence, each acting on n qubits, and n CNOT gates for constructing multi-qubit entanglement between qubits. The control bit of each CNOT gate is the lower-order qubit adjacent to the qubit it acts on, and the control bit of the CNOT gate of the lowest-order qubit is the highest-order qubit.
2. The method according to claim 1, characterized in that, The quantum state encoding unit is used to encode the feature information of n pixels in the target region onto the corresponding quantum bits; The evolution unit is used to associate the quantum state information of the qubit and extract the pixel feature information carried by the quantum state information as the output quantum state; The measurement unit is used to perform measurement operations on the qubit.
3. The method according to claim 2, characterized in that, The quantum state encoding unit includes n H gates and n first quantum rotation gate units arranged sequentially along the action time sequence. Each H gate and each first quantum rotation gate unit corresponds to one quantum bit. The rotation control parameters of the first quantum rotation gate unit are adjusted according to the pixel feature information.
4. The method according to claim 3, characterized in that, The first quantum rotation gate unit includes one or more of a first RX gate, a first RY gate, and a first RZ gate.
5. The method according to claim 4, characterized in that, The first quantum rotating gate unit includes a first RY gate and a first RZ gate arranged sequentially along the operating time sequence. The rotation control parameters of the first RY gate and the first RZ gate are adjusted individually according to the pixel feature information.
6. The method according to claim 1, characterized in that, The second quantum rotation gate unit includes one or more of the second RX gate, the second RY gate, and the second RZ gate.
7. The method according to claim 3, characterized in that, The first quantum rotation gate unit includes a second RY gate.
8. A device for constructing a hybrid quantum classical UNet++ neural network, characterized in that, The device includes: An information acquisition module is used to construct a quantum convolution kernel, wherein the quantum convolution kernel comprises n qubits, and the quantum convolution kernel is obtained by constructing a parameterized quantum circuit of n qubits; and to segment an image to obtain several target regions, each target region comprising n pixels, each pixel providing pixel feature information; wherein the number of pixels in the target region is related to the number of qubits in the quantum convolution kernel. Correspondingly; The processing module is used to sequentially traverse each target region and obtain the quantum convolution feature map corresponding to each target region based on the quantum convolution kernel; The stitching module is used to stitch the quantum convolution feature map sequentially according to the latitude and longitude coordinates corresponding to the original image to obtain a quantum input convolutional layer. Multiple quantum input convolutional layers are integrated and output into a three-dimensional array. The generation module is used to take the three-dimensional array as the input layer of the downsampling path of the classical UNet++ neural network, so as to replace the classical first input convolutional layer in the classical UNet++ neural network and fuse them to obtain a hybrid quantum classical UNet++ neural network. The quantum convolution kernel includes a quantum state encoding unit, an evolution unit, and a measurement unit; the evolution unit is used to associate the quantum state information of the qubit and extract the pixel feature information carried by the quantum state information as the output quantum state; The evolution unit includes several sub-evolution units arranged sequentially along the action time sequence to increase the depth and number of parameters of the parameterized quantum circuit. The sub-evolution unit includes n second quantum rotation gate units arranged sequentially along the action time sequence, each acting on n qubits, and n CNOT gates for constructing multi-qubit entanglement between qubits. The control bit of each CNOT gate is the lower-order qubit adjacent to the qubit it acts on, and the control bit of the CNOT gate of the lowest-order qubit is the highest-order qubit.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Quantum convolution model, quantum circuit and construction method of quantum circuit
CN114548412A
Remote sensing image quantum recognition method and device, storage medium and electronic device
CN116403019A
Dynamic magnetic resonance imaging method, model training method, device, equipment and medium
CN117710514A