CN116521918A - Method for quickly searching similarity graph - Google Patents

Method for quickly searching similarity graph Download PDF

Info

Publication number
CN116521918A
CN116521918A CN202310515979.5A CN202310515979A CN116521918A CN 116521918 A CN116521918 A CN 116521918A CN 202310515979 A CN202310515979 A CN 202310515979A CN 116521918 A CN116521918 A CN 116521918A
Authority
CN
China
Prior art keywords
quantum
image
gate
searched
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310515979.5A
Other languages
Chinese (zh)
Other versions
CN116521918B (en
Inventor
杨青川
韦联福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN202310515979.5A priority Critical patent/CN116521918B/en
Publication of CN116521918A publication Critical patent/CN116521918A/en
Application granted granted Critical
Publication of CN116521918B publication Critical patent/CN116521918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/535Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of image searching, and discloses a method for quickly searching a similarity graph, which comprises the steps of firstly extracting feature vectors of an image to be searched through a neural network and carrying out normalization processing; then constructing a quantum circuit for generating a quantum state from the ground state; building a quantum circuit capable of realizing quantum state inner product; and carrying out quantum state inner product calculation on quantum state data corresponding to the image to be searched and quantum state data in a quantum feature database one by one, and realizing image matching search by taking an inner product result as cosine similarity.

Description

Method for quickly searching similarity graph
Technical Field
The invention belongs to the technical field of image searching, relates to a graph searching method based on a quantum algorithm, and particularly relates to a graph searching method designed by the quantum algorithm.
Background
Aiming at shopping software such as Taobao, the device has the function requirement of quickly searching similar objects by shooting object patterns. At present, an image search technology mainly adopts an image similarity comparison scheme, and mainly comprises a perceptual hash algorithm solution and a cosine similarity solution.
The perceptual hash algorithm is to compress an original picture into a gray level map with a specific dimension (such as 64 dimensions), calculate the average value of gray levels of all pixels, record information, and finally form 64 bits of binary numbers, namely the hash value of the picture, when each pixel is greater than the standard 1 of the average value and less than the standard 0 of the average value. This has the advantage that the storage space is greatly reduced. The final hash value is similar to: 1100000011000001111000011110100011111101111010011110100111100000. when the two images are subjected to similarity comparison, the aim is to compare the relative intensity of gray values. The more they are compared, the more similar if they are identical in 64 bits. In particular, it can be implemented by bitwise AND and re-summation.
The cosine similarity solving method is that an original picture is sent to a feature extraction algorithm model, and feature vectors with specific dimensions are extracted. For example, output a feature vector of the float type of 512 dimensions, [0.325,0.102,0.28,0.843,0.16,0.133,0.125,
0.189,……]the feature vector can reflect the features of the picture better than the hash value of the perceptual hash algorithm, so that the fidelity of the feature vector is better than that of the perceptual hash algorithm. When similarity comparison is carried out on two images, the similarity of the two images is measured through cosine similarity, and the specific formula is as follows: cosine similarityThe value range is [ -1.0,1.0]The closer cos (a) is to 1.0, the more similar the two graphs are. In fact, when the method is applied specifically, a two-norm normalization process is performed on the A, B vector in advance, i.e., a is performed. Therefore, the cosine similarity of the two images is calculated by calculating the vector inner product cos (a) =a·b.
The best effect of the current image searching technology is a cosine similarity solving method, the complexity of the vector inner product operation is O (N), and N is the dimension of the feature vector. When comparison and search are carried out in a large number of databases, the calculation amount is huge and the time is consumed. In order to improve the computing efficiency, a large cloud computing server cluster is adopted, large-scale distributed computing is performed to reduce the time of image comparison searching, the computing complexity is not reduced all the time, the problem is solved only by increasing the number of computing resources, computing resources and electric power resources are very consumed, and a rough computing mode belongs to the category of classical computing.
Disclosure of Invention
The invention aims to provide a method for quickly searching a similar graph, aiming at the problems of long time consumption, large calculated amount, high energy consumption and the like in a scurrying graph searching method, and the method utilizes a classical-quantum mixed calculation mode to reduce Sun Fa complexity of vector inner products, solves the problems of long time consumption, high calculation resource consumption and high energy consumption in massive image searching, and realizes efficient image searching.
In order to achieve the above purpose, the present invention is realized by adopting the following technical scheme.
The method for quickly searching the similarity graph provided by the invention comprises the following steps:
s1, extracting feature vectors of an image to be searched through a neural network, and carrying out normalization processing;
s2, constructing a quantum circuit for generating a quantum state from a ground state, and converting the normalized eigenvector into quantum state data
S3 is defined by the standard ground state |0>As control bits, based on quantum state data corresponding to the image to be searchedQuantum state data |phi in quantum feature database>Constructing a quantum circuit capable of realizing quantum state inner product;
s4, measuring the control bit by using the standard ground state |0 > to obtain the probability of 0, namely P 0 The method comprises the steps of carrying out a first treatment on the surface of the And further, the cosine similarity is calculated according to the following formula:
wherein f 1 ′·f 2 ' represents cosine similarity, f 1 ' represents the normalized feature vector of the image to be searched, f 2 ' represents the feature vector of the sample image normalized in the sample image database to be searched;
and (3) carrying out quantum state inner product calculation on the quantum state data obtained in the step (S2) and the quantum state data in the quantum feature database one by one according to the steps (S3) and S4) to obtain cosine similarity of the image to be searched and each sample image, and obtaining a similarity graph output result according to set requirements.
In the step S1, the feature extraction is performed on the image to be searched through the neural network, and the neural network used may be a classical artificial neural network, for example, a neural network composed of one or more convolution layers, pooling layers, flame layers and full connection layers, which are sequentially arranged. In the invention, the dimension of the feature vector output by the neural network is set to be 8. For the extracted feature vector f 1 Performing two-norm normalization processing, wherein the normalization processing formula is as follows:i.e. feature vector f 1 Divided by its own modulus 1 I. Thus, the generated normalized floating point feature vector f of the image to be searched 1 ' is: f (f) 1 ′=[e 1 ,e 2 ,e 3 ,e 4 ,e 5 ,e 6 ,e 7 ,e 8 ] T
In the step S2, 3 qucircuits of qbit are designed to correspond to q respectively 0 、q 1 、q 2 The method comprises the steps of carrying out a first treatment on the surface of the The rotation angle of 7 RY quantum logic gates (i.e., the angle at which the quantum state rotates on the Bulobz sphere about the Y-axis), includes θ 1 、θ 2 、θ 3 、θ 4 、θ 5 、θ 6 、θ 7 The method specifically comprises the following steps:
the quantum circuit for generating the quantum state from the ground state is specifically designed as follows:
wherein, |0 > and |1>Representing two ground states; qbit 0, qbit 1, qbit2, qbit 0,1, qbit 0,2, etc. above the arrow represent pairs, respectivelyA target bit that should be acted upon by a quantum gate; RY (θ) gate represents a revolving gate, in the form of a matrixX gate represents NOT gate, matrix form is +.>The operator acts on the ground state to turn the ground state over, which turns the ground state |0>Becomes |1>Or the ground state |1>Becomes |0>The method comprises the steps of carrying out a first treatment on the surface of the Ctrl qbit below the arrow represents the control bit; when one qubit is used as a control bit, a RY (theta) gate acts on the target bit, namely a CRY (theta) gate (controlled RY (theta) gate); if the control bit is |1>In the state, then RY (θ) gates are performed on the target bits; if the control bit is |0>The target bit does not do any operation; when two qubits are used as control bits, a RY (theta) gate acts on the target bit, namely a CCRY (theta) gate (double control RY (theta) gate); only when two control bits are simultaneously |1>Executing RY (theta) gate on the target bit if the state is in the state, otherwise, the target bit does not do any operation; CSWAP gate denotes friedel gold gate (Fredkin gate), which is a single control quantum gate acting on operating 3 qubits; performing a SWAP operation on the other 2 target bits with one qubit bit as a control bit (ctrl qbit); if the control bit qubit is |1>And if the state is in the state, the SWAP gate is used for acting on the quantum bits of 2 target bits, otherwise, the target bits do not do any operation. The CSWAP matrix form is:
thus, through the quantum circuit, the final product is obtained
Floating-point feature vector f normalized for two norms 1 ' corresponding quantum state data.
In the step S3, the quantum feature database QF is obtained by converting the image data in the sample image database to be searched into corresponding quantum state data according to the methods given in the step S1 and the step S2.
The step is performed by a standard ground state |0>As a control bit, based on the quantum state corresponding to the image to be searchedQuantum state data |phi in quantum feature database>The quantum circuit capable of realizing quantum state inner product is constructed, and the specific quantum circuit is constructed as follows:
wherein the quantum state subscript represents a position identification bit; i0 > 1 Representing a control bit; the H gate represents a Hadamard gate, and the matrix form is:it can convert the ground state |0>Become->
The quantum circuit can realize 3qbit quantum state dataAnd |phi>Is calculated by the inner product of (2).
In the above step S4, the standard ground state |0 is used>The probability P that the measurement control bit gets 0 0
Probability P 0 Can be obtained by conventional quantum measurement (e.g., by projection measurement methods, etc.), then can be obtained from the above equation,
therefore, the similarity degree of the image to be searched and the sample image can be measured according to the cosine similarity, and the output result of the similarity graph can be obtained according to the set requirement. For example, a graph with the highest cosine similarity is output as a searched sample image, or a sample image with the cosine similarity exceeding a set threshold is output. In this way, the vector inner product calculation with the most resource consumption in classical calculation can be converted into the implementation by quantum calculation. The image search can be realized rapidly and efficiently by utilizing the characteristic of quantum computing parallelism. In addition, the large-scale cloud computing cluster has huge energy consumption, and quantum computing only needs one quantum computer, so that the method has the characteristic of saving energy consumption.
In summary, the method for quickly searching the similarity graph provided by the invention mainly comprises the following steps: constructing a quantum circuit diagram, converting classical data into quantum state data, and realizing quantum state inner product calculation; converting the data of the classical feature database F into a quantum state feature database QF through a quantum circuit; and extracting feature vectors of the images to be searched through the neural network model, converting the feature vectors into quantum state data, and inquiring similar images in a quantum database QF through quantum state inner product operation. Compared with the prior art, the method for quickly searching the similarity graph has the following beneficial effects:
(1) The invention provides a brand new graph searching method based on a quantum algorithm, which respectively constructs a quantum circuit for generating a quantum state from a ground state and a quantum circuit for realizing the quantum state inner product, can convert floating point type feature vectors into quantum state data, realizes the quantum state inner product, and realizes image matching searching by taking an inner product result as cosine similarity.
(2) The invention uses the characteristic of quantum computing parallelism and adopts a quantum computing circuit to accelerate the computing process; compared with the classical method, the method realizes the exponential acceleration of the calculation performance, greatly shortens the searching time and improves the searching efficiency.
(3) The invention adopts quantum computing technology, fully utilizes the parallelism characteristic of quantum computing, can rapidly realize image search by only one quantum computer, and has the characteristic of low energy consumption compared with a large-scale cloud computing cluster.
Drawings
Fig.1 is a flow chart of a method for quickly searching a similarity graph provided by the invention.
Fig. 2 is a schematic flow chart of the neural network for extracting image features.
FIG. 3 is a schematic diagram of a quantum circuit constructed to generate a quantum state from a ground state; the two crossing line positions on the same line are two target positions for the CSWAP gate, and the round point is a control position.
FIG. 4 is a schematic diagram of constructing a quantum circuit capable of achieving quantum state inner products; the two crossing line positions on the same line are two target positions for the CSWAP gate, and the round point is a control position.
Fig. 5 shows images to be searched in an application example and images to be matched in an enumerated database.
Fig. 6 is a matching result obtained by the method for quickly searching the similarity map provided in embodiment 1 in fig. 5.
Detailed Description
The technical scheme of the invention is described in detail below with reference to the accompanying drawings and the embodiments.
Examples
The method for quickly searching the similarity graph provided in this embodiment, as shown in fig.1, includes the following steps:
s1, extracting feature vectors of images to be searched through a neural network, and carrying out normalization processing.
In the step, feature extraction is carried out on the image to be searched through a neural network. The neural network used here is a classical artificial neural network, as shown in fig. 2, and specifically comprises two layers of convolution layers, a pooling layer, a flame layer and a full connection layer which are sequentially arranged; the convolution kernel size of the convolution layer 1 is 3×3, the number of input channels is 3, and the number of convolution kernels is32; the convolution kernel size of the convolution layer 2 is 3×3, the number of input channels is 32, and the number of convolution kernels is 64; the pooling layer reduces 64-dimensional output of the convolution layer to 32-dimensional output, the flat layer is used for flattening the output of the pooling layer, and then the feature vector output by the neural network is obtained after the full-connection network, and the feature vector dimension is 8. For the extracted feature vector f 1 Performing two-norm normalization processing, wherein the normalization processing formula is as follows:i.e. feature vector f 1 Divided by its own modulus 1 I. Thus, the generated normalized floating point feature vector f of the image to be searched 1 ' is:
f 1 ′=[e 1 ,e 2 ,e 3 ,e 4 ,e 5 ,e 6 ,e 7 ,e 8 ] T
s2, constructing a quantum circuit for generating a quantum state from a ground state, and converting the normalized eigenvector into quantum state data
In this step, 3 qubits are respectively named q 0 、q 1 、q 2 The method comprises the steps of carrying out a first treatment on the surface of the The rotation angles of RY quantum logic gates are respectively theta 1 、θ 2 、θ 3 、θ 4 、θ 5 、θ 6 、θ 7 The method specifically comprises the following steps:
the quantum circuit for preparing the quantum state is designed, as shown in fig. 3, and the specific calculation is deduced as follows:
wherein 0>And |1>Representing two ground states; the qbit above the arrow (such as qbit:0, qbit:1, qbit:2, qbit:0,1, qbit:0,2, etc.) respectively represent the target bits of the quantum gate effect; RY (θ) gate represents a revolving gate, in the form of a matrixX gate represents NOT gate, matrix form is +.>The operator acts on the ground state to turn the ground state over, which turns the ground state |0>Becomes |1>Or the ground state |1>Becomes |0>The method comprises the steps of carrying out a first treatment on the surface of the The ctrl qbit (such as ctrl qbit:0, ctrl qbit:1, ctrl qbit2, ctrl qbit:1,2, ctrl qbit:0, 2) below the arrow represents the control bit of the controlled quantum gate; when one qubit is used as a control bit, a RY (theta) gate acts on the target bit, namely a CRY (theta) gate (controlled RY (theta) gate); if the control bit is |1>In the state, then RY (θ) gates are performed on the target bits; if the control bit is |0>The target bit does not do any operation; when two qubits are used as control bits, a RY (theta) gate acts on the target bit, namely a CCRY (theta) gate (double control RY (theta) gate); only when two control bits are simultaneously |1>Executing RY (theta) gate on the target bit if the state is in the state, otherwise, the target bit does not do any operation; CSWAP gate denotes friedel gold gate (Fredkin gate), which is a single control quantum gate acting on operating 3 qubits; performing a SWAP operation on the other 2 target bits with one qubit bit as a control bit (ctrl qbit); if the control bit qubit is |1>And if the state is in the state, the SWAP gate is used for acting on the quantum bits of 2 target bits, otherwise, the target bits do not do any operation. The CSWAP matrix form is:
thus, through the quantum circuit, the final product is obtained
Is a floating point type specialSign vector f 1 ' corresponding quantum state data.
S3 is defined by the standard ground state |0>As control bits, based on quantum state data corresponding to the image to be searchedQuantum state data |phi in quantum feature database>And constructing a quantum circuit capable of realizing quantum state inner product.
The quantum characteristic database QF is obtained by generating corresponding quantum state data from image data in a sample image database to be searched according to the methods given by the step S1 and the step S2.
The step is performed by a standard ground state |0>As a control bit, based on the quantum state corresponding to the image to be searchedQuantum state data |phi in quantum feature database>The quantum circuit capable of realizing quantum state inner product is constructed, and the specific quantum circuit is constructed as follows:
wherein the quantum state subscript represents a position identification bit; i0> 1 Representing a control bit; the H gate represents a Hadamard gate, and the matrix form is:it can convert the ground state |0>Become->
The quantum circuit can realize 3qbit quantum state dataAnd |phi>Is calculated by the inner product of (2). The number of CSWAP quantum gates in the figure is only related to the dimension of the feature vector, and the complexity of the quantum computation is O (log 2 N), N is the dimension of the feature vector. It can be seen that the computational complexity is exponentially reduced with respect to the complexity O (N) of classical inner product computation.
S4 utilizing the standard ground state |0>Measuring the control bit to obtain probability of 0 as P 0
Probability P 0 Can be obtained by quantum measurement; in this embodiment, the quantum state data corresponding to the image to be searched given above is obtainedQuantum state data |phi in quantum characteristic database>And the designed quantum circuit is input into a quantum computer, and the probability P is directly output by the quantum computer 0
It can be obtained from the above formula that,
wherein f 1 ′·f 2 ' represents cosine similarity, f 1 ' represents the normalized feature vector of the image to be searched, f 2 ' represents the feature vector normalized by the sample image in the sample database to be searched.
Carrying out quantum state inner product calculation on the quantum state data obtained in the step S2 and the quantum state data in the quantum feature database one by one according to the steps S3 and S4 to obtain cosine similarity between the image to be searched and each sample image; the graph with the highest cosine similarity is used as the searched similarity graph to be output.
Application example
As shown in fig. 5, an image to be searched (fig. 0) and images in a sample image database to be searched (fig. 1 to fig. 8) are given in this application example, which are processed according to steps S1 to S4 of the method for quickly searching for a similarity map provided in embodiment 1.
For different sample images in a sample database, the standard ground state |0 is passed>Measuring the control bit to obtain probability P of 0 0 The measurement results are shown in fig. 6.
And then according to the formulaAnd obtaining cosine similarity between the image to be searched and each sample image, and outputting the result with the highest cosine similarity as a matched image according to the result shown in fig. 5.
As can be seen from fig. 5 and 6, according to the present invention, it is possible to precisely match to a sample image similar to an image to be searched.
In summary, the feature vector of the floating point type is extracted through the AI model, the quantum state inner product calculation is realized through the quantum circuit, the characteristic of quantum calculation parallelism is fully utilized, the purpose of exponentially accelerating calculation is achieved, and the scheme with the highest calculation speed and highest search precision is known at present.

Claims (6)

1. A method for quickly searching for a similarity graph, comprising the steps of:
s1, extracting feature vectors of an image to be searched through a neural network, and carrying out normalization processing;
s2, constructing a quantum circuit for generating a quantum state from a ground state, and converting the normalized eigenvector into quantum state data
S3 is defined by the standard ground state |0>As control bits, based on quantum state data corresponding to the image to be searchedQuantumQuantum state data |phi in feature database>Constructing a quantum circuit capable of realizing quantum state inner product;
s4 utilizing the standard ground state |0>Measuring the control bit to obtain probability of 0 as P 0 The method comprises the steps of carrying out a first treatment on the surface of the And further, the cosine similarity is calculated according to the following formula:
wherein f 1 ′·f′ 2 Representing cosine similarity, f 1 'represents the feature vector after normalization of the image to be searched, f' 2 Representing the feature vector of the sample image in the sample image database to be searched after normalization;
and (3) carrying out quantum state inner product calculation on the quantum state data obtained in the step (S2) and the quantum state data in the quantum feature database one by one according to the steps (S3) and S4) to obtain cosine similarity of the image to be searched and each sample image, and obtaining a similarity graph output result according to set requirements.
2. The method for quickly searching for a similarity graph according to claim 1, wherein the neural network is a classical artificial neural network.
3. The method for quickly searching for a similarity graph according to claim 2, wherein the neural network is a neural network composed of one or more convolutional layers, pooling layers, flame layers and full-connection layers which are sequentially arranged.
4. A method for quickly searching for a similarity graph according to any one of claims 1 to 3, wherein the feature vector dimension of the neural network output is set to 8; for the extracted feature vector f 1 Performing two-norm normalization processing, wherein the normalization processing formula is as follows:i.e. feature vector f 1 Divided by its own modulus 1 I; thus, the generated normalized floating point feature vector f of the image to be searched 1 ' is: f (f) 1 ′=[e 1 ,e 2 ,e 3 ,e 4 ,e 5 ,e 6 ,e 7 ,e 8 ] T
5. The method of claim 4, wherein in step S2, 3 qubits are respectively named q 0 、q 1 、q 2 The method comprises the steps of carrying out a first treatment on the surface of the The rotation angles of RY quantum logic gates are respectively theta 1 、θ 2 、θ 3 、θ 4 、θ 5 、θ 6 、θ 7 The method specifically comprises the following steps:
the quantum circuit for generating the quantum state from the ground state is specifically designed as follows:
wherein 0>And |1>Representing two ground states; the qbit 0, the qbit 1, the qbit2, the qbit 0, the 1 and the qbit 0,2 bits above the arrow respectively represent target bits of the quantum gate effect; RY (θ) gate represents a revolving gate, in the form of a matrixX gate represents NOT gate, matrix form is +.>The operator acts on the ground state to turn the ground state over, which canWill be in the ground state |0>Becomes |1>Or the ground state |1>Becomes |0>The method comprises the steps of carrying out a first treatment on the surface of the The ctrl qbit bit under the arrow represents the control bit of the controlled quantum gate; the CSWAP matrix form is:
thus, through the quantum circuit, the final product is obtained
Is a floating point type feature vector f 1 ' corresponding quantum state data.
6. The method for quickly searching for a similarity graph according to claim 1, wherein in step S3, the similarity graph is represented by the standard ground state |0>As control bit, constructing quantum state corresponding to image to be searchedQuantum state data |phi in quantum feature database>The quantum circuit capable of realizing quantum state inner product is constructed, and the specific quantum circuit is constructed as follows:
wherein the quantum state subscript represents a position identification bit; i0> 1 Representing a control bit; the H gate represents a Hadamard gate, and the matrix form is:
CN202310515979.5A 2023-05-08 2023-05-08 Method for quickly searching similarity graph Active CN116521918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310515979.5A CN116521918B (en) 2023-05-08 2023-05-08 Method for quickly searching similarity graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310515979.5A CN116521918B (en) 2023-05-08 2023-05-08 Method for quickly searching similarity graph

Publications (2)

Publication Number Publication Date
CN116521918A true CN116521918A (en) 2023-08-01
CN116521918B CN116521918B (en) 2024-07-09

Family

ID=87391924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310515979.5A Active CN116521918B (en) 2023-05-08 2023-05-08 Method for quickly searching similarity graph

Country Status (1)

Country Link
CN (1) CN116521918B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117634459A (en) * 2024-01-24 2024-03-01 山东海量信息技术研究院 Target content generation and model training method, device, system, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160314406A1 (en) * 2013-12-05 2016-10-27 Microsoft Technology Licensing, Llc Method and system for computing distance measures on a quantum computer
CN106650808A (en) * 2016-12-20 2017-05-10 北京工业大学 Image classification method based on quantum nearest-neighbor algorithm
CN112612913A (en) * 2020-12-28 2021-04-06 厦门市美亚柏科信息股份有限公司 Image searching method and system
US20220114313A1 (en) * 2020-10-14 2022-04-14 Tencent Technology (Shenzhen) Company Limited Method and apparatus for determining quantum circuit, and storage medium
CN114841344A (en) * 2022-07-05 2022-08-02 山东海量信息技术研究院 Quantum neural network pruning method and system applied to image processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160314406A1 (en) * 2013-12-05 2016-10-27 Microsoft Technology Licensing, Llc Method and system for computing distance measures on a quantum computer
CN106650808A (en) * 2016-12-20 2017-05-10 北京工业大学 Image classification method based on quantum nearest-neighbor algorithm
US20220114313A1 (en) * 2020-10-14 2022-04-14 Tencent Technology (Shenzhen) Company Limited Method and apparatus for determining quantum circuit, and storage medium
CN112612913A (en) * 2020-12-28 2021-04-06 厦门市美亚柏科信息股份有限公司 Image searching method and system
CN114841344A (en) * 2022-07-05 2022-08-02 山东海量信息技术研究院 Quantum neural network pruning method and system applied to image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵超;牛伟纳;杨俊闯;: "基于量子计算的分类和聚类算法综述", 微电子学与计算机, no. 08, 5 August 2020 (2020-08-05) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117634459A (en) * 2024-01-24 2024-03-01 山东海量信息技术研究院 Target content generation and model training method, device, system, equipment and medium

Also Published As

Publication number Publication date
CN116521918B (en) 2024-07-09

Similar Documents

Publication Publication Date Title
Deng et al. Vector neurons: A general framework for so (3)-equivariant networks
Pang et al. Hierarchical dynamic filtering network for RGB-D salient object detection
Zhang et al. Depth-wise separable convolutions and multi-level pooling for an efficient spatial CNN-based steganalysis
Xia et al. Efficient non-local contrastive attention for image super-resolution
Li et al. Traffic scene segmentation based on RGB-D image and deep learning
Song et al. Unified binary generative adversarial network for image retrieval and compression
WO2021159769A1 (en) Image retrieval method and apparatus, storage medium, and device
Zhang et al. Efficient feature learning and multi-size image steganalysis based on CNN
EP4016331A1 (en) Neural network dense layer sparsification and matrix compression
CN116521918B (en) Method for quickly searching similarity graph
Chadha et al. Voronoi-based compact image descriptors: Efficient region-of-interest retrieval with VLAD and deep-learning-based descriptors
Liu et al. An indoor scene classification method for service robot Based on CNN feature
Du et al. Binary multi-view perceptual hashing for image authentication
Pintelas et al. A multi-view-CNN framework for deep representation learning in image classification
CN115795065A (en) Multimedia data cross-modal retrieval method and system based on weighted hash code
Zhang et al. MAM: A multipath attention mechanism for image recognition
CN118411714A (en) Image texture classification method and system
CN114581721A (en) Multispectral image lightweight classification method based on binary neural network
Prasad et al. Analysis on content based image retrieval using image enhancement and deep learning convolutional neural networks
Ameur et al. Hybrid descriptors and weighted PCA-EFMNet for face verification in the wild
Cai et al. Research on compression pruning methods based on deep learning
Chung et al. Filter pruning by image channel reduction in pre-trained convolutional neural networks
CN113191380B (en) Image evidence obtaining method and system based on multi-view features
CN111191058B (en) Picture retrieval method
Wang et al. Deep embedded clustering with asymmetric residual autoencoder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant