Internal:QHD

From crtc.cs.odu.edu
Jump to navigation Jump to search

Quantum Hausdorff Distance (QHD)

Introduction

Hausdorff Distance (HD) [1] is commonly described as a measure of how close two objects are to each other. In relation to image processing, it can be used to verify how close a derived image is to the original. Given two sets A and B, the one-directional Hausdorff distance is defined as h(A,B):

In general, h(A,B) does not equal h(B,A). Thus, the bi-directional Hausdorff distance H(A, B) is:

In simpler terms, the Hausdorff distance is the maximum distance of a set to the nearest point in the other set [2], and can be visualized below:

http://cgm.cs.mcgill.ca/~godfried/teaching/cg-projects/98/normand/main.html

Problem Statement

The goal of this research is to:

  1. Determine whether HD calculation is a feasible application of quantum computing.
  2. If the answer to 1 is yes, then provide an algorithm to calculate HD using universal quantum computers.
  3. Implement the algorithm.
  4. Analyze its complexity and effectiveness.

Approach 1 - Radial Coordinates

Given the inherent capability of quantum states to represent complex numbers, an intuitive approach would be to encode the location of image pixels as radial coordinates. Given this definition, the goal would be to describe an algorithm which calculates distances between all pixels simultaneously. It seems that the limitation of this algorithm is that it would only be applicable to two-dimensional image representations, as global phases (spherical coordinates) have little meaning in quantum state representation.

To accomplish this, an algorithm would need to be able to calculate both the difference in phase and the difference in amplitude between two states. On their own, this is a relatively simple task. The difference in amplitude can be calculated by encoding the radius of each pixel from the origin and then applying a Hadamard gate to the least significant qubit. This is done in Quantum Hadamard Edge Detection (QHED) [3] to simultaneously find the difference in intensity between two adjacent pixels for all pixels in an image. Phase encoding can be performed by encoding angles in quantum states using the Quantum Fourier Transform (QFT) and then performing signed addition using Draper's QFT adder circuit [4].

Therefore, it is possible to perform either necessary operation independently, but no algorithm has been designed to combine the two processes. Such an algorithm would allow the comparison of radial coordinates in parallel, an application which could extend beyond the application of this problem into fields such as unsupervised machine learning.

Approach 2 - Euclidean distance

Each pixel coordinate is stored in a number of quantum states equal to the dimensionality of the space. A Hadamard gate is then applied to an auxiliary qubit to find the difference between two pixels in each basis. An L2 norm is then applied to find the absolute distance between the pixels. It is not immediately clear yet whether this would allow for finding the norm of all pixels simultaneously or it would have to be apply to every pixel pair sequentially. If the former, the method may be promising. If the latter, classical methods would provide more efficient.

Yu [5] claims that an algorithm exists which can find the maximum and the shortest distance between two sets. Used in conjunction, this is exactly what is needed for Huasdorff distance and should be investigated further.

Method

Choosing the Euclidean distance approach, explained in Euclidean Distance|, one can encode two sets of vectors U and V using quantum address registers of size log2(|U|) and log2(|V|), respectively. |•| is the cardinality of the set.

References

[1] Hausdorff, Felix. Grundzüge Der Mengenlehre. Chelsea Pub. Co., 1965.

[2] G. Rote (1991). Computing the minimum Hausdorff distance between two point sets on a line under translation. Information Processing Letters, v. 38, pp. 123-127

[3] W. Yao, H. Wang, Z. Liao, M.-C. Chen, J. Pan, J. Li, K. Zhang, X. Lin, Z. Wang, Z. Luo, et al., Quantum image processing and its application to edge detection: Theory and experiment, Physical Review X 7 (3) (2017). doi:10.1103/physrevx.7.031041.

[4] Draper, Thomas G.. “Addition on a Quantum Computer.” arXiv: Quantum Physics (2000): n. pag.

[5] Yu, Kai-huan et al. “Quantum Algorithms for Similarity Measurement Based on Euclidean Distance.” International Journal of Theoretical Physics 59 (2020): 3134 - 3144.