Single-target detection method and system based on quantum interaction, storage medium and terminal

CN117011832BActive Publication Date: 2026-09-08UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311106514.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2026-09-08
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

[0005]本发明的目的在于克服现有交通道路图像的单目标检测过程中的精度低、效率低的问题,提供了基于量子交互的单目标检测方法、系统、存储介质及终端

Benefits of technology

[0034] (1) This invention establishes the connection between quantum neural networks and traffic road images, and proposes a quantum neural network with a novel interaction layer. This network has the minimum circuit depth and trainable parameters, and can adapt to diverse targets. The three-qubit interaction increases the network's expressive power and entanglement ability, thereby improving the accuracy and efficiency of single target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011832B_ABST
    Figure CN117011832B_ABST
Patent Text Reader

Abstract

The application discloses a single-target detection method and system based on quantum interaction, a storage medium and a terminal, and belongs to the field of automatic driving, and comprises the following steps: encoding traffic road images according to rows and columns to obtain row quantum states and column quantum states; inputting the row quantum states and the column quantum states into a quantum layer to obtain four row qubits and four column qubits; inputting the four row qubits and the four column qubits into a quantum interaction layer and three auxiliary qubits to entangle the four row qubits and the four column qubits, and obtaining final row quantum states and column quantum states; and inputting the final quantum states into a full connection layer to output target positions. The application establishes the connection between a quantum neural network and traffic road images, proposes a quantum neural network with a novel interaction layer, the network has the smallest circuit depth and trainable parameters, the three-qubit interaction is used to increase the expression capacity and entanglement capacity of the network, and the precision and efficiency of single-target detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and in particular to a single-target detection method, system, storage medium, and terminal based on quantum interaction. Background Technology

[0002] Traffic and road images refer to images captured of scenes related to traffic and roads. These images can come from various data sources, such as traffic surveillance cameras, cameras from autonomous vehicles, and satellite imagery. These images have wide applications in many fields, including traffic management, intelligent transportation systems, autonomous driving technology, urban planning, and environmental monitoring. The rapid development of autonomous driving technology in recent years has made target detection in traffic scenes a research hotspot. In traffic and road images, single-target detection typically refers to detecting and locating individual traffic participants on the road from the image. However, due to the rich content of traffic scene images, such as buses, traffic lights, traffic signs, people, bicycles, trucks, trains, and cars, and the varying shapes, sizes, and appearances of these targets, the detection operation becomes increasingly difficult. With the increasing influence of the actual environment, shooting equipment, and data volume, this detection work is time-consuming and requires a huge investment of effort. Therefore, using computers for single-target detection in traffic images not only reduces the workload of human staff but also promotes the intelligentization and informatization of the transportation and policing industries.

[0003] Previous researchers have proposed many methods to handle object detection in traffic scenarios. One method is to propose candidate regions based on selective search or region proposal networks using deep learning technology, and then send the proposals to subsequent networks for classification and regression. This method has high accuracy but is slow. Another method is to directly generate class probabilities and location coordinates, and then detect the sampled possible regions to obtain the final result. This method achieves real-time performance but sacrifices accuracy.

[0004] Quantum computing, as a fast computation method in computing systems, has been widely studied in recent years. For various machine learning tasks, the inclusion of quantum systems not only brings faster computation speeds to algorithms but also plays a significant role in practical applications. In recent years, many quantum counterparts of classical machine learning models have been proposed, all claiming superior performance in various aspects such as accuracy and speed. For example, quantum neural networks can significantly reduce parameters, improve speed, and achieve higher accuracy. However, a key aspect of designing parameterized quantum circuits in quantum neural networks is maintaining sufficient quantum expressive power and entanglement, which is crucial for target detection in traffic environments. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems of low accuracy and low efficiency in the existing single-target detection process of traffic road images, and to provide a single-target detection method, system, storage medium and terminal based on quantum interaction.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] In a first aspect, a single-target detection method based on quantum interaction is provided for use in traffic road images, the method comprising the following steps:

[0008] S1. Encode the traffic road image by row and column respectively to obtain row quantum state and column quantum state;

[0009] S2. Input the row quantum state and column quantum state into the quantum layer respectively to obtain four row qubits and four column qubits;

[0010] S3. Simultaneously input the four row qubits and four column qubits into the quantum interaction layer and entangle them with the three auxiliary qubits to obtain the final row quantum state and column quantum state.

[0011] S4. Input the quantum state obtained in step S3 into the fully connected layer to output the target position.

[0012] In a single-target detection method based on quantum interaction provided in some embodiments, a preprocessing step of the traffic road image is included before step S1. The preprocessing step includes:

[0013] The traffic road image is processed into a grayscale image and downsampled to a 16*16 pixel matrix;

[0014] Labels are set at the locations of detected targets in traffic road images, and the labels are encoded.

[0015] In a single-target detection method based on quantum interaction provided in some embodiments, encoding the tag includes:

[0016] One-hot encoding is performed on the row and column labels of the image respectively.

[0017] In a single-target detection method based on quantum interaction provided in some embodiments, the quantum layer includes quantum gate G1 and quantum gate G2. The quantum gate G1 is composed of single-qubit rotation gates Rx and Rz and a dual-quantum-controlled rotation gate Rx. The quantum gate G2 is composed of a Pauli X gate, a dual-quantum-controlled rotation gate Rx, and a dual-quantum-controlled rotation gate Rz.

[0018] In a single-target detection method based on quantum interaction provided in some embodiments, Toffoli gates are cascaded with quantum gates in the quantum interaction layer.

[0019] In a single-target detection method based on quantum interaction provided in some embodiments, step S4 includes:

[0020] After taking the eigenvalues ​​of the final quantum state and inputting them into the fully connected layer, multiple eigenvalue probability values ​​are output.

[0021] The index of the maximum value among the feature probability values ​​is taken as the location information obtained from the detection.

[0022] In some embodiments, a single-target detection method based on quantum interaction is provided, which further includes:

[0023] After calculating the corresponding feature probability values ​​for row or column positions, the row vector formed by the feature probability values ​​is squared with the encoded row and column labels respectively to obtain their respective loss functions;

[0024] Each loss function is input into the optimizer, and the gradient descent algorithm optimizer is used to update the quantum gate parameters in the quantum layer.

[0025] Secondly, a single-target detection system based on quantum interaction is provided for use in traffic road images, the system comprising:

[0026] The quantum coding module is configured to encode traffic road images by row and column respectively, to obtain row quantum states and column quantum states;

[0027] The qubit processing module is configured to input row quantum states and column quantum states into the quantum layer respectively, resulting in four row qubits and four column qubits.

[0028] The quantum interaction module is configured to simultaneously input the four row qubits and four column qubits into the quantum interaction layer and entangle them with three auxiliary qubits, thereby obtaining the final row quantum state and column quantum state.

[0029] The target detection location output module is configured to input the final obtained quantum state into the fully connected layer to output the target location.

[0030] Thirdly, a computer storage medium is provided, on which computer instructions are stored, wherein the computer instructions, when executed, perform the relevant steps in any one of the quantum interaction-based single-target detection methods described above.

[0031] Fourthly, a terminal is provided, including a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, and the processor executes the relevant steps in any one of the quantum interaction-based single-target detection methods described above when executing the computer instructions.

[0032] It should be further noted that the technical features corresponding to the above options can be combined or substituted to form new technical solutions if there is no conflict.

[0033] Compared with the prior art, the beneficial effects of the present invention are:

[0034] (1) This invention establishes the connection between quantum neural networks and traffic road images, and proposes a quantum neural network with a novel interaction layer. This network has the minimum circuit depth and trainable parameters, and can adapt to diverse targets. The three-qubit interaction increases the network's expressive power and entanglement ability, thereby improving the accuracy and efficiency of single target detection.

[0035] (2) In one example, by using a reasonable quantum computing method and the reasonable application of target location features, specifically, the optimizer of the gradient descent algorithm is used to update the quantum gate parameters in the quantum layer. As the single target detection process on the traffic road is repeated, the obtained quantum gate parameters are continuously updated, the detection results are continuously updated, and thus the squared difference loss function is continuously updated. By using the principle that the squared difference loss function is continuously reduced, the most accurate optimization model for single target detection can be obtained, realizing the simulation that the accuracy of single target detection on the road is continuously increased and the detection process is continuously accelerated. Attached Figure Description

[0036] Figure 1 The flowchart illustrates a single-target detection method based on quantum interaction, as shown in an embodiment of the present invention.

[0037] Figure 2 This is a schematic diagram of a quantum layer shown in an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram of quantum interaction shown in an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram illustrating the detection position output in an embodiment of the present invention. Detailed Implementation

[0040] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0041] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0042] Reference Figure 1 In one exemplary embodiment, a single-target detection method based on quantum interaction is provided for use in traffic road images. The method includes the following steps:

[0043] S1. Encode the traffic road image by row and column respectively to obtain row quantum state and column quantum state;

[0044] S2. Input the row quantum state and column quantum state into the quantum layer respectively to obtain four row qubits and four column qubits;

[0045] S3. Simultaneously input the four row qubits and four column qubits into the quantum interaction layer and entangle them with the three auxiliary qubits to obtain the final row quantum state and column quantum state.

[0046] S4. Input the quantum state obtained in step S3 into the fully connected layer to output the target position.

[0047] Specifically, this invention establishes a connection between quantum neural networks and traffic road images, and proposes a quantum neural network with a novel interaction layer. This network has minimal circuit depth and trainable parameters, and can adapt to diverse targets. The three-qubit interaction increases the network's expressive power and entanglement ability, improving the accuracy and efficiency of single-target detection. This single-target detection task is of great significance for traffic management, driver assistance systems, and autonomous driving technology.

[0048] Furthermore, before step S1, a preprocessing step for the traffic road images is included. Our obtained traffic road dataset consists of a training set and a test set. However, individual traffic road images may have unequal dimensions and pixel sizes (RGB). To facilitate single-object detection, we need to process these images. The preprocessing steps include:

[0049]

[0050] The image is downsampled to a 16x16 pixel matrix;

[0051] For each traffic road image in the training set, a label is created to indicate the location of the target to be detected. This label is limited to a 5x5 area. The label is then encoded.

[0052] Further, encoding the tag includes:

[0053] One-hot encoding is performed on the row and column labels of the image. The basic definition of one-hot encoding is: if the number is X, then the number of the X number is 1, and the rest are 0. For example, if the position of the target to be detected in the whole image is (3, 5), then the position label is encoded as (00100, 00001).

[0054] Furthermore, the process of converting image information into quantum information in step S1 can be specifically represented as follows:

[0055] Classical data mapped to Hilbert space results in a state that is determined by… This means, that is:

[0056]

[0057] Among them, basis functions Corresponding to the quantum state of a pixel in the image feature vector, the coefficient x i It is a non-negative real number, obtained by normalizing the pixels of the traffic road image, and satisfies the following relationship:

[0058]

[0059] The quantum state preparation process encodes classical values ​​into input qubits, and then utilizes the unique properties of superposition, entanglement and interference to achieve superior performance.

[0060] After preprocessing, the traffic road image is converted to grayscale and downsampled to a 16*16 array. The image is then unfolded row by row into a vector of size 256, and normalized to ensure that the sum of the squares of the vector data is 1. This vector is denoted as image. row The image is then expanded column-wise into a set of vectors of size 256, and normalized to ensure that the sum of the squares of the vector data is 1. This normalized vector is denoted as image. col We choose Hilbert space as a basis to represent the normalized classical vectors of the traffic image as the amplitudes of the 8 input qubits of the quantum feature encoding layer. This exhibits a special quantum advantage because the size is 2... n The standardized feature vector can only be encoded into n qubits. Therefore, a traffic image, after undergoing the above amplitude encoding operation, will obtain the following two quantum states:

[0061]

[0062]

[0063] Furthermore, referring to Figure 2The quantum layer is composed of parameterized quantum circuits, and the quantum gates used in the quantum circuits consist of different configurations of single-gate and multi-gate operations. The quantum layer includes quantum gate G1 and quantum gate G2. Quantum gate G1 uses the quantum gates used by Sim et al. in their research; this quantum gate is a simplified version with optimal expressive power, consisting of single-qubit rotation gates Rx and Rz, and a dual-quantum-controlled rotation gate Rx. To reduce the space size of the data representation, lower the computational cost of the network, and improve the network's generalization ability, we also used quantum gate G2. This quantum gate can trace the information of one qubit from two qubits, thus reducing the state of two qubits to one qubit. Quantum gate G2 consists of a Pauli X gate, a dual-quantum-controlled rotation gate Rx, and a dual-quantum-controlled rotation gate Rz. The parameters in these gates are all trainable. Therefore, the quantum layer obtains a four-qubit output from an eight-qubit input.

[0064] Furthermore, referring to Figure 3 In the quantum interaction layer, Toffoli gates are cascaded with quantum gates in the quantum layer. In the era of quantum computing, implementing two-qubit gates is more difficult than implementing single-qubit gates. However, with recent advancements in quantum hardware and the prospect of near-error-free quantum computers in the near future, the use of multi-qubit gates in quantum computers is expected to become more widespread. Using two-qubit gates in quantum neural networks can increase the entanglement and expressiveness of the network, which helps in learning more complex features of classical data. Therefore, it is essential to study the effectiveness of three-qubit gates in various quantum networks. To further introduce broader entanglement and expressiveness into the quantum neural network structure, Toffoli gates can be cascaded with quantum gates in the quantum layer to establish the interaction of three qubits. In the interaction layer, an auxiliary qubit with an initial quantum state of |0> is used to store the entangled state. Initially, the three auxiliary qubits are entangled with the qubit obtained from quantum gate block G2 in the quantum layer through the CNOT gate shown in the figure, and then through the three rotation gates at the end of the quantum network. Finally, the final quantum state after quantum gate transformation is obtained on the current auxiliary quantum state.

[0065] Specifically, detection using the aforementioned quantum layer and quantum interaction layer includes:

[0066] Line position detection output: We obtain the amplitude encoding The input is fed into the quantum layer, resulting in four qubit outputs. These four qubit outputs are simultaneously input into the quantum layer and entangled with three auxiliary qubits, yielding... The nine eigenvalues.

[0067] Column position detection output: We obtain the amplitude encoding The input is fed into the quantum layer, resulting in four qubit outputs. These four qubit outputs are then simultaneously input into the quantum interaction layer and entangled with three auxiliary qubits, yielding... The nine eigenvalues.

[0068] Further, step S4 includes:

[0069] After taking the eigenvalues ​​of the final quantum state and inputting them into the fully connected layer, multiple eigenvalue probability values ​​are output; specifically, refer to... Figure 4 What we obtained at the quantum interaction layer It is a 2 3 To obtain the detection coordinates from the vector of data, we use the coordinates obtained from the auxiliary qubits. The input is fed into a fully connected layer for position output. Specifically, the nine feature values ​​from row position detection and the nine feature values ​​from column position detection are processed separately for position detection output, and these features are mapped to the sample label space. The application of a fully connected layer is essential in this process. Simultaneously, the output quantum state of the measurement auxiliary qubit, after passing through the fully connected layer, needs to be input into a Softmax function to add nonlinearity.

[0070] The output y = [y1, y2, y3, y4, y5] is the feature probability value. The index of the maximum value among the feature probability values ​​is taken as the detected location information.

[0071] Furthermore, after calculating the corresponding feature probability values ​​for row positions or column positions, the row vector formed by the feature probability values ​​is squared with the encoded row labels and column labels respectively to obtain their respective loss functions;

[0072] The respective loss functions are input into the optimizer, which uses the gradient descent algorithm to update the quantum gate parameters in the quantum layer. As the single-object detection process on the traffic road is repeated, the obtained quantum gate parameters are continuously updated, as are the detection results, thus continuously updating the squared difference loss function. Utilizing the principle that the squared difference loss function continuously decreases, the most accurate optimized model for single-object detection can be obtained. In practice, a traffic road test image is input. After image loading and preprocessing, the above training set process can obtain the specific location of the target in the entire traffic road image, thereby completing and outputting the single-object detection result.

[0073] In another exemplary embodiment, the present invention provides a single-target detection system based on quantum interaction for use in traffic road images, the system comprising:

[0074] The quantum coding module is configured to encode traffic road images by row and column respectively, to obtain row quantum states and column quantum states;

[0075] The qubit processing module is configured to input row quantum states and column quantum states into the quantum layer respectively, resulting in four row qubits and four column qubits.

[0076] The quantum interaction module is configured to simultaneously input the four row qubits and four column qubits into the quantum interaction layer and entangle them with three auxiliary qubits, thereby obtaining the final row quantum state and column quantum state.

[0077] The target detection location output module is configured to input the final obtained quantum state into the fully connected layer to output the target location.

[0078] In another exemplary embodiment, the present invention provides a computer storage medium storing computer instructions thereon, which, when executed, perform relevant steps in the multi-target tracking method for an autonomous driving scenario.

[0079] Based on this understanding, the technical solution of this embodiment, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0080] In another exemplary embodiment, the present invention provides a terminal including a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, and the processor executes relevant steps in the multi-target tracking method for an autonomous driving scenario when executing the computer instructions.

[0081] The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.

[0082] The embodiments of the subject matter and functional operation described in this specification can be implemented in: tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing device or for controlling the operation of a data processing device. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing device.

[0083] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.

[0084] Suitable processors for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0085] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.

[0086] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0087] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.

Claims

1. A single-target detection method based on quantum interaction for use in traffic road images, characterized in that, The method includes the following steps: S1. Encode the traffic road image by row and column respectively. Represent the normalized classical vector of the traffic image as the amplitude of the eight input qubits of the quantum feature coding layer, and obtain eight row quantum states and eight column quantum states respectively. S2. The row quantum state and column quantum state are input into the quantum layer respectively, resulting in four row qubits and four column qubits. The quantum layer is composed of parameterized quantum circuits. The quantum gates used in the quantum circuits are composed of different configurations of single-gate and multi-gate operations. Specifically, the quantum gates include seven quantum gates G1 and four quantum gates G2, forming eight quantum circuits. A quantum gate G1 is set between two adjacent quantum circuits. Each quantum gate G1 is composed of single-qubit rotation gates Rx and Rz and a dual-quantum-controlled rotation gate Rx. Each quantum circuit in each quantum gate G1 is equipped with single-qubit rotation gates Rx and Rz and a dual-quantum-controlled rotation gate Rx. The dual-quantum-controlled rotation gate Rx on one quantum circuit is connected to another quantum circuit. Each pair of adjacent quantum circuits is grouped into four groups of quantum circuits. Each group of quantum circuits is controlled by a quantum gate G2. Each quantum gate G2 consists of a Pauli X-gate, a dual-quantum-controlled rotating gate Rx-gate, and a dual-quantum-controlled rotating gate Rz-gate. The first quantum circuit of the quantum gate G2 is connected in series with a Pauli X-gate, and the second quantum circuit is equipped with a dual-quantum-controlled rotating gate Rx-gate and a dual-quantum-controlled rotating gate Rz-gate. The dual-quantum-controlled rotating gate Rx-gate is connected to the output of the Pauli X-gate, and the dual-quantum-controlled rotating gate Rz-gate is connected to the input of the Pauli X-gate. The quantum gate G2 retains only the output of the second quantum circuit, tracing the information of one qubit from two qubits, thus reducing the two qubit states to one qubit. Inputting eight quantum states yields a four-qubit output, where the four qubits include qubits. Quantum bits Quantum bits Quantum bits ; S3. The four row qubits and four column qubits are simultaneously input into the quantum interaction layer and entangled with the three auxiliary qubits to obtain the final row quantum state and column quantum state respectively. In the quantum interaction layer, the Toffoli gate is cascaded with the quantum gate in the quantum layer to establish the interaction of the three auxiliary qubits. Specifically, in the quantum interaction layer, an auxiliary qubit with an initial quantum state of |0> is used to store the entangled state. The three auxiliary qubits are entangled with the qubits obtained by the quantum gate block G2 in the quantum layer through the CNOT gate, and the final quantum state after quantum gate transformation is obtained through the three rotation gates at the end of the quantum network. The three auxiliary qubits are entangled with the qubits obtained from quantum gate block G2 in the quantum layer through the CNOT gate, including: Quantum Bit Each is connected to a qubit via a CNOT gate. Quantum bits Entanglement, qubit Through a CNOT gate and qubit Entanglement, qubit Through a CNOT gate and qubit To become entangled; Quantum Bit The qubit is entangled with an auxiliary qubit through a CNOT gate. Entangled with one of the remaining two auxiliary qubits through a CNOT gate, the qubit... Entangled with the last auxiliary qubit through a CNOT gate; S4. Input the quantum state obtained in step S3 into the fully connected layer to output the target position.

2. The single-target detection method based on quantum interaction according to claim 1, characterized in that, Before step S1, a preprocessing step for the traffic road image is included, which includes: The traffic road image is processed into a grayscale image and downsampled to a 16*16 pixel matrix; Labels are set at the locations of detected targets in traffic road images, and the labels are encoded.

3. The single-target detection method based on quantum interaction according to claim 2, characterized in that, The encoding of the tag includes: One-hot encoding is performed on the row and column labels of the image respectively.

4. The single-target detection method based on quantum interaction according to claim 3, characterized in that, Step S4 includes: After taking the eigenvalues ​​of the final quantum state and inputting them into the fully connected layer, multiple eigenvalue probability values ​​are output. The index of the maximum value among the feature probability values ​​is taken as the location information obtained from the detection.

5. A single-target detection system based on quantum interaction for use in traffic road images, characterized in that, The system includes: The quantum coding module is configured to encode the traffic road image by row and column, respectively, and to represent the normalized classical vector of the traffic image as the amplitude of the eight input qubits of the quantum feature coding layer, thereby obtaining eight row quantum states and eight column quantum states. The qubit processing module is configured to input row quantum states and column quantum states into the quantum layer, respectively, resulting in four row qubits and four column qubits. The quantum layer consists of parameterized quantum circuits, and the quantum gates used in the quantum circuits are composed of different configurations of single-gate and multi-gate operations. Specifically, the quantum gates include seven quantum gates G1 and four quantum gates G2, forming eight quantum circuits. A quantum gate G1 is set between two adjacent quantum circuits. Each quantum gate G1 consists of single-qubit rotation gates Rx and Rz and a dual-quantum-controlled rotation gate Rx. Each quantum circuit in each quantum gate G1 is equipped with single-qubit rotation gates Rx and Rz and a dual-quantum-controlled rotation gate Rx. The dual-quantum-controlled rotation gate Rx on one quantum circuit is connected to another quantum circuit. Each pair of adjacent quantum circuits is grouped into four groups of quantum circuits. Each group of quantum circuits is controlled by a quantum gate G2. Each quantum gate G2 consists of a Pauli X-gate, a dual-quantum-controlled rotating gate Rx-gate, and a dual-quantum-controlled rotating gate Rz-gate. The first quantum circuit of the quantum gate G2 is connected in series with a Pauli X-gate, and the second quantum circuit is equipped with a dual-quantum-controlled rotating gate Rx-gate and a dual-quantum-controlled rotating gate Rz-gate. The dual-quantum-controlled rotating gate Rx-gate is connected to the output of the Pauli X-gate, and the dual-quantum-controlled rotating gate Rz-gate is connected to the input of the Pauli X-gate. The quantum gate G2 retains only the output of the second quantum circuit, tracing the information of one qubit from two qubits, thus reducing the two qubit states to one qubit. Inputting eight quantum states yields a four-qubit output; the four-qubit output includes qubits. Quantum bits Quantum bits Quantum bits ; The quantum interaction module is configured to simultaneously input the four row qubits and four column qubits into the quantum interaction layer and entangle them with three auxiliary qubits, respectively, to obtain the final row quantum state and column quantum state. In the quantum interaction layer, Tooffoli gates are cascaded with quantum gates in the quantum layer to establish the interaction between the three auxiliary qubits. Specifically, in the quantum interaction layer, an auxiliary qubit with an initial quantum state of |0> is used to store the entangled state. The three auxiliary qubits are entangled with the qubits obtained by quantum gate block G2 in the quantum layer through CNOT gates, and the final quantum state after quantum gate transformation is obtained through three rotation gates at the end of the quantum network. The three auxiliary qubits are entangled with the qubits obtained from quantum gate block G2 in the quantum layer through the CNOT gate, including: Quantum Bit Each is connected to a qubit via a CNOT gate. Quantum bits Entanglement, qubit Through a CNOT gate and qubit Entanglement, qubit Through a CNOT gate and qubit To become entangled; Quantum Bit The qubit is entangled with an auxiliary qubit through a CNOT gate. Entangled with one of the remaining two auxiliary qubits through a CNOT gate, the qubit... Entangled with the last auxiliary qubit through a CNOT gate; The target detection location output module is configured to input the final obtained quantum state into the fully connected layer to output the target location.

6. A computer storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed, they perform the relevant steps in the single-target detection method based on quantum interaction as described in any one of claims 1-4.

7. A terminal, comprising a memory and a processor, wherein the memory stores computer instructions executable by the processor, characterized in that, When the processor executes computer instructions, it performs the relevant steps in the single-target detection method based on quantum interaction as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Quantum circuit-based graph attention mechanism implementation method

    CN114511092A

  • Image classification method and device, electronic equipment and computer readable storage medium

    CN115908943A