| Literature DB >> 35546614 |
You-Hang Liu1, Zai-Dong Qi2, Qiang Liu2.
Abstract
Comparing the similarity between digital images is an important subroutine in various image processing algorithms. In this study, we present three quantum algorithms for comparing the similarity between two quantum images. These algorithms are applied to binary, grey and color images for the first time. Without considering the image preparation, the proposed algorithms achieve exponential acceleration than the existing quantum and classical methods in all three cases. At the end of this paper, an experiment based on the real quantum computer of IBMQ and simulations verify the effectiveness of the algorithms.Entities:
Year: 2022 PMID: 35546614 PMCID: PMC9095865 DOI: 10.1038/s41598-022-11863-9
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.379
Figure 1Three steps in comparing the similarity between two quantum images. Different colors represent qubits carrying different functions. The dot on endpoint indicates a multi qubits string. M represents measurement operation.
Truth table for comparing two qubits.
| img-qubits1[i] | img-qubits2[i] | AuxBit1[i] |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The value of AuxBit1[i] would be set to 1 only if the values of img-qubits1[i] and img-qubits2[i] are the same.
Figure 2(a) The quantum circuit for comparing qubits from img-qubits1 and img-qubits2. This circuit defines the mapping between two NEQR image strings and AuxBit1. The output is XNOR of two input. (b) The quantum circuit that compresses |11…11 > to |1 > and the other states to |0 > . This circuit equals the Control-Not gate conditioning on the whole AuxBit1. The qubits with the same color as in Fig. 1 have the same function.
Figure 3(a) The 16 possible states of pixel value qubits under the condition of q = 4. (b–e) Selecting the former 4,3,2,1 qubits for comparison. The qubit strings in the same red rectangle are considered identical.
Complexity of different quantum methods for comparing the similarity between two quantum images based on NEQR and its variant.
| Algorithms | Image style | Complexity |
|---|---|---|
| Algorithm | Binary | |
| Algorithm | Grey | |
| Algorithm | Color | |
| Classical method | Binary/grey/color | |
SAB_PV[ ( | Binary | |
SAG_SAB_PV[ ( | Grey | |
SAC_SAB_PV[ ( | Color | |
| Algorithm in[ | Binary/grey |
The complexity of image preparation is not contained in this table.
Figure 4Three binary images used for calculating similarity. The image representation states are shown below the images. The pixel value qubits are underlined. Probability amplitudes are not given for simplification.
Figure 5Quantum circuit for comparing similarity between image a and b in Fig. 4.
Figure 6Three grey images used for calculating similarities. The image representation states are shown below the images. The pixel value qubits are underlined. Probability amplitudes are not given for simplification.
Figure 7Quantum circuit for preparing image d and e in Fig. 6. Q0 to q5 are qubits representing image d. Q8 to q13 are qubits representing image e. Other qubits are ancillary qubits used for helping preparation. The other part of the algorithm is omitted for clarity.
Similarities between three sample grey images.
| Similarity between image d and e | 53.13% |
| Similarity between image e and f | 40.23% |
| Similarity between image d and f | 41.02% |
| Similarity between image d and e | 86.13% |
| Similarity between image e and f | 54.30% |
| Similarity between image d and f | 54.69% |
Figure 8Four color images used for calculating similarities.
Similarities between Four color images.
| g and h | g and i | g and j | h and i | h and j | i and j |
| 85.27% | 14.90% | 16.58% | 14.73% | 16.37% | 53.42% |
| g and h | g and i | g and j | h and i | h and j | i and j |
| 81.60% | 12.65% | 13.57% | 12.37% | 13.42% | 49.09% |
| g and h | g and i | g and j | h and i | h and j | i and j |
| 78.87% | 10.49% | 11.40% | 10.23% | 10.98% | 30.87% |