Quantum walk device and edge detection method
The quantum walk device and edge detection method address noise susceptibility in conventional quantum edge detection by using a lazy quantum walk search algorithm, ensuring reliable edge detection in digital images.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- KDDI CORP
- Filing Date
- 2024-10-15
- Publication Date
- 2026-04-27
AI Technical Summary
Conventional quantum edge detection methods are susceptible to noise and have low probability amplitudes when intensity differences between pixels are small, leading to potential measurement issues.
A quantum walk device and edge detection method that employs a lazy quantum walk search algorithm, allowing the quantum walker to remain stationary and incorporating a phase inversion in the quantum oracle for edge candidates, with measurements aggregated to enhance noise resistance.
The method achieves noise-immune edge detection by leveraging a lazy quantum walk search algorithm, improving the reliability of edge detection in digital images.
Smart Images

Figure 2026070356000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a quantum walk device and an edge detection method for performing edge detection from images. [Background technology]
[0002] Edge detection, a task in digital image processing, has applications in various fields such as medicine, forensic science, materials research, and traffic monitoring. While many classical edge detection algorithms exist to address these problems, their performance is severely limited by the increasing size and volume of digital images. Furthermore, classical methods are extremely time-consuming, requiring the examination of each pixel in a digital image to determine an edge. Classical methods typically require exponential time. A clear alternative to addressing this increase in digital image size is quantum computing.
[0003] Several quantum edge detection (QED) algorithms already exist, and among them, the quantum Sobel (QSobel) algorithm disclosed in Non-Patent Document 1 and the quantum Hadamard (HED) algorithm disclosed in Non-Patent Document 2 are exponentially faster than classical edge detection methods. These two methods will be described below. Figure 1 lists the main mathematical formulas for explaining QSobel as equations A1 to A4, and Figure 2 lists the main mathematical formulas for explaining HED as equations B1 to B4, and will be referred to in the following explanation.
[0004] (1) QSobel: QSobel is based on the Sobel filter, a classical edge detection method. An edge in an image is a pixel where there is a discontinuity / gradient in the intensity of the pixel. The gradient of a pixel is calculated by evaluating a mask. In a Sobel mask, each pixel position is evaluated one by one to find an edge. Vertical pixels × Horizontal pixels = N × N = 2 n ×2 n In the image, 2 2nThere are pixels. Therefore, in the case of Sobel (using a classical computer rather than a quantum computer), it is necessary to evaluate two gradients one by one, and the calculation time is exponential time of 2 2n That is, it is necessary to evaluate each of the two gradients, and the calculation time is exponential time of 2 2n times.
[0005] QSobel corresponds to implementing Sobel on a quantum computer and can reduce the exponential-time complexity in classical Sobel. In QSobel, the initial quantum state |ψ in > is obtained by superposing all pixels, as shown in Equation A1. In Equation A1, (x, y) represents the position of the pixel, |C xy > represents the pixel intensity at position (x, y), and there are nine auxiliary quantum bits |0> i (i = 1, 2…, 9) of the zero state required to calculate the gradient of the pixel intensity using a 3×3 neighborhood mask. Next, as shown in Equation A2, the intensity of the colors of all nine adjacent pixels is stored in the auxiliary quantum bits. Then, as shown in Equation A3, the black box (the quantum circuit that executes QSobel) converts the remaining quantum bits to 0 or 1 according to the gradient value with respect to an appropriately selected threshold value t_th. Here, p(x, y) is the pixel intensity at (x, y). In the final form, the quantum state for edge detection is as shown in Equation A4. Here, |1> corresponding to the color represents white, and |0> represents black, so that an edge is detected at the position (x, y) where |Ω xy >=|0>. This QSobel algorithm has a polynomial-time computational complexity of n 2 compared to the classical algorithm (the Sobel filter executed on a classical computer), so it is much faster compared to the aforementioned classical exponential-time computational complexity of 2 2n times.
[0006] (2) HED: This method of quantum edge detection utilizes quantum probabilistic image encoding as shown in Equation B1, and the form in which the pixel is encoded into the amplitude of the ground state. In Equation B1, c i represents the normalized pixel intensity. Now, |ψ inApplying a Hadamard gate to the first qubit of > results in the state |ψ in equation B2. f > is obtained. In equation B2, odd ground states |2i+1> provide approximations of gradients such as (c0-c1), (c2-c3), ..., etc. This constitutes only half of the horizontal gradient. The remaining half of the gradient can be obtained from the initial state in equation B3. The initial state in equation B3 is the previous initial state |ψ in > is obtained by left shifting. Then, an Hadamard gate is applied to the first qubit, resulting in equation B4. Equation B4 gives the remaining horizontal gradients (c1-c2), (c3-c4), ..., etc. Therefore, by measuring the odd ground states |2i+1>, the horizontal edges of the digital image can be obtained. Equations B1 to B4 obtain the horizontal edges, and although the explanation is omitted, vertical edges can be obtained in a similar manner (for example, in equation B1, instead of concatenating rows of image pixels, columns of image pixels are concatenated first), making quantum edge detection by HED possible. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] Zhang, Y., Lu, K. & Gao, Y. QSobel: A novel quantum image edge extraction algorithm, Sci. China Inf. Sci. 58, 1-13 (2015). [Non-Patent Document 2] Xi-Wei Yao et al. Quantum Image Processing and Its Application to Edge Detection: Theory and Experiment, Phys. Rev. X (2017). [Overview of the Initiative] [Problems that the invention aims to solve]
[0008] However, conventional quantum algorithms such as QSobel and HED primarily determine the existence of edges by measuring the gradient of pixels. A problem with these methods is that when the intensity difference between two adjacent pixels is small, the probability amplitude of the output becomes low, and if noise (noise generated during processing in the quantum circuit executing the quantum algorithm) is present, a measurement problem may arise. Since quantum computing has a probabilistic nature, the probability of the final result plays a crucial role in the success of the quantum computing method, so it is desirable that the probability for measuring the final result is sufficiently high, but conventional quantum edge detection techniques may be susceptible to noise.
[0009] In view of the problems of the conventional technology described above, the present invention aims to provide a quantum walk device and an edge detection method that perform edge detection in a noise-resistant manner. [Means for solving the problem]
[0010] To achieve the above objective, the present invention provides a quantum walk device that performs edge detection of an image by performing a quantum walk search that includes at least the processes of setting an initial state, repeatedly applying a unitary operation to the set initial state, and measuring the state after the iteration, wherein the movement modes of the quantum walker set in the flip-flop operator for defining the unitary operation include not only a movement state to an adjacent position but also a stationary state at the same position, a coin space state is constructed using the movement state and the stationary state as a basis, a vertex space state is constructed using a basis corresponding to the pixel position of the image, and the quantum oracle for defining the unitary operation inverts the phase of the vertex space state and the coin space state when the vertex space state corresponds to a vertex position predetermined as an edge candidate and the coin space state corresponds to the stationary state. Furthermore, the edge detection method is characterized by being performed by a classical computer, wherein the measurement of the repeated state is performed in such a way that only the vertex space state is determined from the quantum state composed of the coin space state and the vertex space state, the measurement results from the quantum walk device are obtained over multiple occasions, and for each pixel position, the pixel position where the probability that the corresponding vertex space state was measured is determined to be a certain value greater than zero is defined as the edge detection location in the image. [Effects of the Invention]
[0011] According to the quantum walk device and edge detection method of the present invention, a so-called lazy quantum walk search algorithm is employed, which allows the quantum walker to remain stationary in the same position in addition to moving to an adjacent position as a movement mode. Furthermore, by performing a phase inversion in the quantum oracle when the vertex space state corresponds to a vertex position predetermined as an edge candidate and the coin space state corresponds to the aforementioned stationary state, edge detection can be performed by quantum walk with noise immunity. [Brief explanation of the drawing]
[0012] [Figure 1]The main mathematical formulas used to explain QSobel are listed as equations A1 to A4. [Figure 2] The main formulas used to explain HED are listed as formulas B1 to B4. [Figure 3] This is a diagram illustrating the configuration of a quantum walk system according to one embodiment. [Figure 4] The mathematical formulas used to explain the quantum walk search algorithm of this embodiment are listed as equations (1) to (5). [Figure 5A] Examples EX1 and EX2 illustrate the quantum walk algorithm of this embodiment. [Figure 5B] An example illustrating the quantum walk algorithm of this embodiment is shown as Example EX3. [Figure 5C] Examples EX4 and EX5 illustrate the quantum walk algorithm of this embodiment. [Figure 5D] Examples EX6 and EX7 illustrate the quantum walk algorithm of this embodiment. [Figure 5E] Examples EX8 and EX9 illustrate the quantum walk algorithm of this embodiment. [Figure 6] This figure shows an example of an implementation of a quantum circuit that performs a quantum walk according to this embodiment. [Figure 7] This is a functional block diagram of the quantum walk device according to this embodiment, corresponding to the configuration of the quantum circuit in Figure 6. [Figure 8] This figure shows the effect of quantum walks in this embodiment in comparison to proportionality. [Figure 9] This figure illustrates an example of why it is desirable to pre-set the parameters used in the quantum walk of this embodiment through experimentation. [Figure 10] This figure shows examples of applying the quantum walk of this embodiment to various quantum computer implementations. [Figure 11] This figure shows an example of a hardware configuration in a typical (classical) computer. [Modes for carrying out the invention]
[0013] Figure 3 is a diagram of the configuration of a quantum walk system according to one embodiment, the quantum walk system 100 comprising a quantum computer control device 10 composed of a classical computer, and a quantum walk device 20 composed of a quantum computer that performs edge detection in an image by executing a quantum walk algorithm.
[0014] The overall operation of the quantum walk system 100 is as follows: (1) The quantum computer control device 10 sets the operation for edge detection from an image using quantum walks for the quantum walk device 20. (2) The quantum walk device 20 performs the operation of the quantum circuit in accordance with the said operation setting, thereby performing edge detection on the quantum circuit using the quantum walk algorithm, and as a final result, obtaining a measurement result corresponding to the edge detection result. (3) By acquiring the measurement results of the quantum walk device 20 in the quantum computer control device 10, the edge detection results are obtained in a form that can be interpreted on a classical computer (for example, by representing the edge detection results as a classical image).
[0015] In the quantum walk system 100 of this embodiment, edge detection is performed using quantum walks (quantum walk search). Here, generally, the search using quantum walks follows the framework of the following procedure. (1) Define the behavior of how quantum walkers move by coin flips by defining a coin operator. (2) Define a quantum oracle operator (hereinafter abbreviated as oracle) corresponding to the specific problem to be explored by quantum walk, and set up so that when the oracle is applied, the quantum state corresponding to the solution (candidate solution) of the search problem is marked (phase inverted). (3) By repeatedly applying the coin operator defined above, the flip-flop operator that actually moves the quantum walker, and the oracle defined above, the quantum walk algorithm is executed, and then a measurement is performed to obtain a result equivalent to the solution of the search problem.
[0016] On the other hand, when considering the use of quantum walks for edge detection, the problems with using existing technologies and an overview of the approach to resolving these problems in the quantum walk system 100 of this embodiment are as follows.
[0017] In other words, when using quantum walk search to amplify the probability amplitude of image edges, the search problem becomes one of searching multiple targets (vertices corresponding to edges) rather than a single target. However, while existing quantum walk techniques are very useful for finding a single marked vertex, finding multiple marked vertices is usually difficult because of the existence of so-called exceptional configurations.
[0018] Here, the exceptional construction on the 2D grid for handling images is a block of marked vertices of the form 2k × m or k × 2m, where k and m are positive integers. Other exceptional construction forms also exist and cannot be found by discrete-time quantum walk search algorithms using Grover coins (the coin operator of the Grover algorithm) and SKW coins (the coin operator of the SKW (Shenvi, Kempe, Whaley) algorithm) as coin operators in existing techniques. Therefore, Grover coins and SKW coins are not very useful in edge detection problems.
[0019] To address this problem, the present inventors have recently proposed a different novel quantum walk, a lazy quantum walk search algorithm, which is disclosed in Non-Patent Document 3 below. This oracle has the coin state as a self-loop state and inverts only the phase of the marked vertices. This oracle has the advantage of being able to search multiple marked vertices of any configuration with a very high success rate. [Non-Patent Literature 3] Giri, PR (2023). Quantum walk search by Grover search on coin space. The European Physical Journal D, 77(9), 175.
[0020] Therefore, the quantum walk system 100 of this embodiment uses this quantum walk search algorithm to perform edge detection. Further details will be explained below. Figure 4 lists the mathematical formulas for explaining the quantum walk search algorithm of this embodiment as formulas (1) to (5), and Figures 5A, 5B, 5C, 5D, and 5E show examples for explaining the quantum walk algorithm of this embodiment as examples EX1, EX2, EX3, EX4, EX5, EX6, EX7, and EX8, EX9, respectively, which will be referred to below.
[0021] <Quantum Walk Search> Consider a digital image. The pixels of the image are the vertices (x,y) (1≦x≦L1,1≦y≦L2) of a two-dimensional grid with dimensions of horizontal pixels × vertical pixels = L1 × L2. Each vertex (x,y) has four normal edges: left, right, top, and bottom. In this embodiment, we use a lazy quantum walk, so we add one self-loop to each vertex (x,y) of the two-dimensional grid as shown in equation (2) below. The vertices are in a Hilbert space H of dimension N=L1×L2. V The ground state is represented by a Hilbert space H of dimension d=5. C It is represented as follows: A quantum walk has an initial state |ψ in >=|ψ v>×|ψ c > is necessary. (Note that the "×" here does not represent the product of real numbers. In general mathematical notation, it is represented as "× enclosed in a circle" to indicate the direct product of quantum states. However, in this text, "×" is used as an abbreviated notation, and in the following explanations, if the "×" corresponds to the direct product, that fact will be noted as appropriate.)
[0022] Here, the initial state |ψ in The initial state for one of the two states that form the direct product of > is |ψ v > is expressed as in equation (1), where the image pixel position (x, y) is the position of the vertex to which the quantum walker moves, |x,y>. The denominator √N (square root of N) in equation (1) is a normalization term to make the sum of the measurement probabilities equal to 1. Here, similar to one of the existing methods for handling images with a quantum computer, in this embodiment, for example, when L1=L2=2, as shown in example EX1, the pixel position (x,y) can be encoded into the quantum state by using an arrangement that associates the image pixel position (x,y) with the quantum state, where the 2-qubit state |x,y> (=|x>|y>) corresponds to the pixel position (x,y). The 2-qubit state |x,y>=|00> represents the image pixel position (x,y)=(1,1). The 2-qubit state |x,y>=|10> represents the image pixel position (x,y)=(2,1). The 2-qubit state |x,y>=|01> represents the image pixel position (x,y)=(1,2). The 2-qubit state |x,y>=|11> represents the image pixel position (x,y)=(2,2).
[0023] As shown in the example above, the values of x and y that appear in the qubit state |x,y> representing the vertex to which the quantum walker moves generally do not match the values of x and y that appear in the corresponding image pixel position (x,y). However, as long as a correspondence relationship is established between the two, we will use a simplified notation such as state |x,y> and its corresponding position (x,y).
[0024] Similarly, in cases other than L1=L2=2, the n-qubit state has 2 n Each of the ground states can be associated with a predetermined image pixel position (x,y), for example, L1=L2=2 m (m≧1) 4 qubits of 2m m Each of the ground states can be associated with a position (x,y). Furthermore, a similar correspondence can be established with appropriate modifications even for images with different numbers of pixels in the vertical and horizontal directions; however, the example used below will assume that L1=L2=2.
[0025] Also, the initial state |ψ in The initial state for the other coin space among the two states that are constructed by the direct product of > |ψ c > is expressed as in equation (2). In equation (2), |r>, |l>, |u>, |d>, and |s> are the base states representing the five states of edges: rightward movement, leftward movement, upward movement, downward movement, and self-loop (no movement), respectively, and √s (the square root of s) is the weight of the self-loop state. (As with the other notations, "|s>" is "the state |s> by the identifier s of the self-loop state", and the s in √s (the square root of s) multiplied by it is a "real number s" (s>0) that represents the weight, and "s" is used in both for simplification of notation.) Similar to equation (1), the denominator √(4+s) in equation (2) is the normalization term. Similarly, the dimension number of edges d=5 and the downward movement state |d> use the same "d" but have different meanings, and the distinction is clear from the context, so the respective notations will be used.
[0026] Example EX2 enumerates the movement states |r>, |l>, |u>, and |d> in each direction from an arbitrary pixel position (x,y) (corresponding to the state |x,y>), and the movement of a quantum walker in the self-loop state |s> (i.e., the stationary state |s>) (including the case where movement is zero in |s>). For example, when a rightward movement |r> is applied to a quantum walker at position (x,y) (corresponding to the state |x,y>), it moves one pixel to the right to the adjacent position (x+1,y) (corresponding to the state |x+1,y>) (i.e., the quantum state changes), while when the self-loop state |s> is applied, the pixel position remains at (x,y) (corresponding to the state |x,y>) and does not move (i.e., the quantum state does not change).
[0027] While existing quantum walk methods only use the movement states |r>, |l>, |u>, and |d> to adjacent pixels, the lazy quantum walk of this embodiment is characterized by its additional use of a self-loop state |s>, which, as its name suggests, allows the element to remain stationary without moving. The movement states |r>, |l>, |u>, |d>, and |s> shown in Example EX2 represent quantum walks defined by these movements that are realized on a two-dimensional grid (a two-dimensional grid where each pixel position (x,y) corresponds as a grid point (x,y)). However, in Examples EX3, EX4, EX6, and the quantum circuits described later in Figure 6, similar quantum walks can be realized by restricting them to a one-dimensional grid.
[0028] The initial state |ψ is set as the direct product of the initial states in each space of equations (1) and (2) above. in The time evolution of >, that is, the movement of quantum walks over time, is represented by the unitary operator U = S·C G It is controlled by, where S is the flip-flop shift operator and C G This is a modified coin operator for quantum walk search. In quantum walk search, the quantum operations performed until obtaining the edges of the image as the final measurement result are a predetermined set T MMark the vertices belonging to the set T (let's say there are M of them). In other words, the role of quantum walk search is to mark the set T M The goal is to find M marked vertices of the set T, as will be explained later, by applying a quantum oracle. Here, "marking" by quantum walk search means marking a set T, as will be explained later. M This refers to performing a phase inversion of the corresponding state. (Note that the vertices to be marked may or may not be edges in the final measurement result.) As described later, set T M The set T M Edge candidates are expected to be detected from within, but set T M Edges can also be detected from the outside. Furthermore, as will be described later, after repeating quantum operations that include phase inversion of vertices marked by quantum walk search several times, the final edge detection result is obtained based on the aggregation of the results of measuring the state of the quantum circuit multiple times.
[0029] A modified coin operator C as one of two terms to give a unitary operator U for time evolution. G As shown in equation (3), the ground state |x,y>×|b c >(× represents the Cartesian product) acts on this. Also, as shown in the explanatory notes around equation (3), the modified coin operator C G The application consists of multiplication by C and the application of quantum oracle, the details of which are as follows.
[0030] <Modified coin operator C G Multiplication of C in > In equation (3), the multiplier is C = 2|ψ c ><ψ c |-I dxd |b is the Grover diffusion operator, and c > represents any one of the five ground states |r>, |l>, |u>, |d>, |s> in coin space. That is, |b c If we list and show each case of equation (3) without using >, we get the following equation 1.
[0031]
number
[0032] Note that the Grover diffusion operator C is the same as in existing methods and does not act on the vertex state |x,y>, but on the coin space state |b c > acts to spread.
[0033] <Modified coin operator C G Application of quantum oracles in As explained in equation (3), the quantum oracle is a set T where the positions (x,y) corresponding to the vertex space state |x,y> are located. M The ground state |x,y>×|b is determined by distinguishing between cases based on whether or not it belongs to a certain category and whether or not the state of coin space is stationary |s>. c It acts by either applying or not applying a phase inversion (sign inversion) to the Cartesian product (×).
[0034] Here, set T M Regarding this, by processing the image to be processed in the quantum computer control unit 10, which is a classical computer, the following is determined: at each pixel position (x,y), the pixel value (luminance value) is a(x,y), and the difference between the pixel values a(x±1,y±1) at at least one adjacent position (x±1,y±1) is the threshold a TH Based on the above, the state |x,y> corresponding to a position (x,y) where it is determined that a spatial gradient of pixel values exists at the pixel position (x,y) is defined as the set T M It should be determined to belong to set T. M Thus, since this is a fixed set set by the quantum computer control device 10 from the information of the image to be processed, the set T progresses along the processing of the quantum walk device 20. M (It will not be updated.) |a(x,y)-a(x+1,y)|≧a TH |a(x,y)-a(x-1,y)|≧a TH , |a(x,y)-a(x,y+1)|≧a TH , or |a(x,y)-a(x,y-1)|≧a TH , If at least one of the following conditions is met, then |x,y>∈T M And, If neither of these conditions is met, then |x,y>∈T M isn't it.
[0035] Note that the above applies when the position (x,y) is not at the boundary of the image, and there are adjacent pixels at four locations (above, below, left, and right) of the position (x,y). M This is a determination of whether or not it belongs to the set T. Similarly, if adjacent pixels exist only in a portion of the upper, lower, left, or right directions, it is determined whether the difference in at least one pixel value between that portion of adjacent pixels is greater than or equal to a threshold, and the set T is determined. M You just need to determine whether or not it belongs to a certain category. For example, if the position (x,y) is the top-left vertex of a rectangular image, and there are only two adjacent images out of the top, bottom, left, and right: to the right (x+1,y) and down (x,y+1), you can determine this as follows. |a(x,y)-a(x+1,y)|≧a TH , or |a(x,y)-a(x,y+1)|≧a TH , If at least one of the following conditions is met, then |x,y>∈T M And, If neither of these conditions is met, then |x,y> is not true.
[0036] set T M As described above, the set T is obtained by the quantum computer control device 10, which is a classical computer, and then M The quantum computer, the quantum walk device 20, can be configured so that processing on the quantum circuit as shown in equation (3) is realized according to the information. Examples EX8 and EX9 in Figure 5E show a grayscale image to be processed and a set T set for that image. M An example is shown. Set T MAs shown in this example, this corresponds to a position where a brightness gradient exists in a grayscale image, and can therefore be set as a set of pixel positions that are candidates for edges. The pixels of the pixel set E that are ultimately detected as edges by the quantum walk device 20 of this embodiment are set T M It is assumed that the majority of pixels will be the same as those belonging to set T, but M It is possible that pixels not belonging to the specified category may be included.
[0037] As described above, in this embodiment, the set T of edge candidates is given by equation (3). M The position marked as |xy>(set T) M A modified coin operator C that applies a phase inversion (sign inversion) only if it corresponds to a position |x,y>) belonging to the same location and the coin space basis is stationary |s>, and does not apply a phase inversion otherwise. G The action of the quantum oracle in this configuration allows for efficient edge detection using quantum walk search. As mentioned above, existing methods do not use stationary |s> as the coin space basis. Furthermore, while existing methods only apply the coin operator to positions |x,y>, this embodiment applies to positions |xy> and coin space states |b c The combined state of |xy>×|b is the direct product |xy>×|b c > Modified coin operator C G This applies.
[0038] Furthermore, the action of the flip-flop shift operator S on the entire Hilbert space, which is the other of the two terms that give the unitary operator U of time evolution, is given as in equation (4), and it is possible to change the state from the state before the move to the state after the move in such a way that the information of "each pixel × direction" (× is the Cartesian product) does not overlap for all pixels |x,y> and all directions |r>,|l>,|u>,|d>,|s>. Note that the five equations listed in equation (4) are given for each of the five bases of the coin space corresponding to the d=5 dimension of the coin space, and for example the first equation means the following. In the ground state |x,y>×|r>(× is the Cartesian product, and the same applies throughout this paragraph), The state S|x,y>×|r> after applying the flip-flop shift operator S is, Since the coin space basis |r> is defined as a right shift, As the position state |x,y> moves to the right adjacent |x+1,y>, When the direction state |r> changes to the opposite state |l> (the direction it was facing before the quantum walker moved), The ground state is |x+1, y>×|l>.
[0039] In other words, when we focus on only one quantum walker according to equation (4) (and do not consider superposition with other quantum walkers), the time evolution due to the flip-flop shift operator S is as follows, for example, and when the coin space basis is |r>,|l>, it repeatedly moves back and forth between adjacent left and right positions |x,y>,|x+1,y>; when it is |u>,|d>, it repeatedly moves back and forth between adjacent up and down positions |x,y>,|x,y+1>; and when it is |s>, it repeatedly stops at the same position |x,y>, thus functioning in the quantum walk search of this embodiment. (Example 1) |x,y>×|r>→|x+1,y>×|l>→|x,y>×|r>→|x+1,y>×|l>→… (Example 2) |x,y>×|u>→|x,y+1>×|d>→|x,y>×|u>→|x,y+1>×|d>→… (Example 3) |x,y>×|s>→|x,y>×|s>→|x,y>×|s>→|x,y>×|s>→…
[0040] The modified coin operator C defined by equations (3) and (4) above. G The unitary time operator U = S·C is the product of the flip-flop shift operator S. G Initial state |ψ in >Apply this repeatedly t times (i.e., U raised to the power of t) t By multiplying by (by performing t quantum walk movements), the quantum walk is performed for t steps, and then the result is measured as shown in equation (5), which yields a measurement result corresponding to the edges of the image. In this measurement, the vertex space state |x,y> and the coin space state |b c>Quantum state in the entire Hilbert space composed of |x,y>×|b c Of the Cartesian products (×), only the vertex state |x,y> is measured to determine its quantum state, and the measurement probability p of the position (x,y) corresponding to the state |x,y> is determined. s The final edge detection result can be obtained from (x,y). This will be explained in detail in the following description of the quantum circuit.
[0041] <Implementation on a quantum computer (quantum walk device 20) (Qiskit implementation)> Figure 6 shows an example of a quantum circuit implementation for edge detection using quantum walk search technology based on equations (1) to (5) above. Such a quantum circuit can be configured from a quantum computer control device 10, which acts as a classical computer, using Qiskit, an open-source framework for quantum computer control. The quantum walk device 20, which acts as a quantum computer, can then function as a quantum circuit that conforms to these configurations. Such an implementation is suitable for deployment on devices such as the IBM NISQ (noisy medium-scale quantum computer), which is an example of a quantum computer currently available.
[0042] Since modern NISQ devices have limited capabilities, the quantum circuit implementation example in Figure 6 is designed as a small quantum circuit for quantum search algorithms on a one-dimensional periodic lattice. This circuit can be used for edge detection in digital images of size L1 × L2.
[0043] Assume that the lengths L1 and L2 in the two directions (horizontal and vertical) of the image are even. If the lengths are not even, they can be padded appropriately to make them even. Then, divide the entire image into 2x2 blocks of 4 pixels each. The intensity of these 4 pixels can be considered as the vertices of a cycle of length N=4 (a cycle that loops in a circle due to the boundary condition of period N=4). As shown in example EX3 in Figure 5B, each vertex has 4 directions: two are the usual left-right directions, and the other two are undirected self-loops at each vertex. Thus, the Hilbert space for quantum states is HV ×H C = C 4 ×C 4 This is the result. The example in Figure 6 is a Qiskit circuit with t=2 iterations for quantum walk search (i.e., applying the unitary operation U t=2 times).
[0044] As shown in Example EX3, the four pixels (1,1), (1,2), (2,1), and (2,2) of a 2x2 block have four directions as coin space: clockwise |r>, counterclockwise |l>, a first station (self-loop) |s1>, and a second station (self-loop) |s2>. When clockwise |r> is applied, the pixel position moves clockwise along the circular loop with a period of N=4, as shown in (a) below. Conversely, when counterclockwise |l> is applied, the pixel position moves counterclockwise along the circular loop with a period of N=4, as shown in (b) below. (1,1)→(2,1)→(2,2)→(1,2)→(1,1)→(2,1)→(2,2)→(1,2)→… …(a): clockwise (1,1)→(1,2)→(2,2)→(2,1)→(1,1)→(1,2)→(2,2)→(2,1)→… …(b): Counterclockwise
[0045] Furthermore, when applying two self-loops |s1>,|s2>, the pixel position will remain stationary at each position. Note that if we define three states in coin space—two movements |r>,|l> and one stationary state (self-loop) |s>—to represent movement (and self-loops) on a one-dimensional cycle, then two qubits are required to represent these three states in coin space, whereas with two qubits... 2 Since we can represent 4 states, 4-3=1 state remains unused (undefined). For convenience, we have created a self-loop with two states |s1> and |s2> to make a total of 4 states and eliminate the remainder. Furthermore, by using a one-dimensional grid cycle of length N=4 in this way, we can increase noise immunity compared to using a two-dimensional grid cycle.
[0046] When performing edge detection on an image larger than 2×2 using the one-dimensional cycle with N = 4 in the circuit of FIG. 6, as shown in Example EX4 of FIG. 5C, for example, when dealing with an image of size 4×4, it is divided into four 2×2 blocks BL11, BL21, BL12, and BL22 located in the upper left, upper right, lower left, and lower right respectively. The edge detection results of the four blocks obtained by applying the quantum circuit processing in the one-dimensional cycle with N = 4 in FIG. 6 to each block BL11, BL21, BL12, and BL22 are aggregated over the entire 4×4 image on a classical computer (quantum computer control device 10), and the result can be used as the final edge detection result.
[0047] Example EX5 in FIG. 5C is x = 4, N y = 4 in the two-dimensional cycle, and is an example of the two-dimensional cycle space H V when applying a batch quantum walk to the entire 4×4 image. Example EX6 in FIG. 5D is an example of the one-dimensional cycle space H V when applying a batch quantum walk to the entire 4×4 image in the one-dimensional cycle with N = 16.
[0048] Example EX7 in FIG. 5D is an example of the input image and the output image (edge detection result image reproduced based on the measurement result) when applying a quantum walk for edge detection using the quantum circuit in FIG. 6 and the like. When the edge set E is obtained in a form reflected in the measurement target quantum state on the quantum circuit as the application result of the quantum walk, if the number of pixels belonging to the edge set E is K, it is expected that the following results will converge after performing multiple measurements. (As can be seen from the example in FIG. 5E, the edge detection result set E is generally assumed to be the same as the set T M that is marked (phase inversion) by Equation (3).) p s (x, y) ≈ 1 / K if (x, y) ∈ E p s (x, y) ≈ 0 not if (x, y) ∈ E
[0049] That is, the probability that a quantum state |x,y> corresponding to the edge is measured as a determined quantum state |x,y> (measured with respect to the vertex space H V and is determined to be any one of the basis states |x,y>, but remains in a quantum superposition state without being measured with respect to the coin space H C is expected to converge to a constant value of 1 / E at all positions (x,y) within the edge. On the other hand, the probability that a quantum state |x,y> corresponding to a position (x,y) not on the edge is measured as a determined quantum state |x,y> (measured with respect to the vertex space H V and is determined to be any one of the basis states |x,y>, but remains in a quantum superposition state without being measured with respect to the coin space H C is expected to converge to a constant value of 0 at all positions (x,y) not on the edge.
[0050] Therefore, when the number of times each pixel position (x,y) is counted as the quantum state |x,y> in the measurement result according to Equation (5) is denoted as count(x,y), and the total number of times the measurement results of all pixel positions (x,y) are counted is denoted as total, the final result of whether each pixel position (x,y) corresponds to an edge can be obtained as follows by threshold determination. If the threshold determination is that count(x,y) / total corresponds to a non-zero constant value of 1 / K, then (x,y) corresponds to an edge. If the threshold determination is that count(x,y) / total corresponds to zero (when it can be determined to correspond to zero because it is smaller than a certain threshold), then (x,y) does not correspond to an edge.
[0051] Furthermore, regarding the threshold used to determine whether the measurement probability (measurement frequency count(x,y) / total) of each position (x,y) corresponds to a constant value of 1 / K or zero, a predetermined value may be set in advance. Alternatively, after obtaining the entire set of measurement results, clustering may be applied to the measurement frequency count(x,y) / total value of each position (x,y) to separate the group corresponding to a non-zero constant value of 1 / K from the group corresponding to zero. In the case of clustering, any existing clustering method may be used as long as it is possible to separate the data into two groups (either zero or zero), and in this case, it is not necessary to use a predetermined threshold. (For example, information equivalent to the threshold may be obtained after dividing the data into two groups using clustering such as the k-means method based on the distance on a one-dimensional line using the measurement frequency values.)
[0052] Figure 7 shows the configuration of the quantum walk device 20 (and the quantum computer control device 10 for scan control) as a functional block corresponding to the quantum circuit in Figure 6. As indicated by common reference numerals in Figures 6 and 7, the quantum walk device 20 comprises an initial state setting unit 21, a unitary operation iteration unit 22, and a measurement unit 23. The quantum computer control device 10, which is a classical computer according to one embodiment for controlling the quantum circuit in Figure 6, comprises a scan control unit 11 and a scan result integration unit 12. The quantum circuit in Figure 6 corresponds to the block processing quantum circuit 25 composed of these units 21, 22, and 23. As shown in Figure 7, the scan result integration unit 12 integrates the edge detection results of blocks at each scan position within the entire image, obtained under the control of the scan control unit 11, which controls the processing of the block processing quantum circuit 25 to be performed for each block into which the entire image is divided, thereby obtaining the edge detection result for the entire image in this embodiment.
[0053] For the sake of clarity, a brief explanation of which operations each element of the quantum circuit in Figures 6 and 7 is responsible for, as described in the equations in Figure 4, is as follows: In the initial state setting unit 21, the first qubit q0 = |x> and the second qubit q1 = |y> constitute the vertex space basis |x,y>, and by applying the Hadamard operator H, the initial state for the vertex space is configured as expressed in equation (1) in the more general case (the general case not limited to 2 qubits). The initial state setting unit 21 also configures the initial state for the coin space, which has four ground states |r>, |l>, |s1>, |s2>, using the third qubit c0 and the fourth qubit c1. This initial state for the coin space is for a one-dimensional cycle, but in the case of a two-dimensional cycle, it is as expressed in equation (2).
[0054] In the first unitary operation 221, the following operations α, β, and γ are applied in this order. (Note that the reference codes for operations α, β, and γ are shown in Figure 6.) The second unitary operation 222 is performed similarly. Operation α… Applies the quantum oracle to all four-dimensional states (4 qubits) in the 2-dimensional vertex space and 2-dimensional coin space. Operation β…Applies the coin operator to a 2-dimensional coin space. Operation γ…Applies the flip-flop shift operator to all four-dimensional states.
[0055] The operations α and β are as shown in equation (3), and of these, operation α (quantum oracle) is set T M The process, implemented by referring to the information, involves inverting the phase of the ground state that meets the aforementioned conditions (marking it), and not inverting the phase of the states that do not meet the conditions (not marking them). Of these operations, operation β is the application of the coin operator C. Operation γ is expressed as in equation (4) for the 2-dimensional cycle, and the same can be applied to the 1-dimensional cycle.
[0056] Finally, the measurement unit 23 measures the state in the 2-dimensional vertex space out of the total 4-dimensional states and determines |x,y> as the measurement result. By performing the measurement multiple times, it is expected that the measurement results of the pixel positions (x,y) corresponding to the state |x,y> will converge to the following measurement results as described above. p s (x,y) ≈ 1 / K if (x,y) ∈ E p s (x,y)≈0 not if (x,y)∈E
[0057] Figure 8 shows the effect of Grover Coin using (lackadaisical) quantum walk search according to this embodiment in comparison with conventional technologies (Grover Coin and SKW Coin). The results are shown separately as (a) to (d), and their contents are as follows. (a) Sample image to which a 50x50 quantum walk can be applied. (b) Results of edge detection using a quantum walk search algorithm with Grover or lackadasical quantum walks, Grover coins, and self-loop weights s=0.001. (c) Edge detection results from SKW Coin (d)C G Edge detection results from coins and self-loop weight s=0.001
[0058] In Figure 8, result (b) shows that when performing a Grover coin using a standard quantum walk and a lackadasical quantum walk search, edges cannot be sufficiently detected due to the formation of exceptional configurations and gaps caused by low success probabilities. The same thing happens with the SKW coin shown in result (c). In the image shown in result (d), edges are clearly obtained, and this is the coin C of this embodiment. G This is due to the effect of [the effect of the product / service].
[0059] In equation (5), the unitary operation U is repeated t times. However, if the number of repetitions t is increased as t=1, 2, 3, ..., and the measurement is performed at the last t-th repetition to obtain the edge detection result, it is known that the edge detection result will periodically improve and worsen, which is a property generally known for quantum walks (not limited to edge detection). Therefore, in order to set an appropriate number of repetitions t in this embodiment, it is desirable to perform a test quantum walk in advance under this property and then determine an appropriate number of repetitions t. Similarly, since the quantum walk in this embodiment is based on a lackadaisical quantum walk, it is desirable to perform a test in advance to set the weights of the self-loops at each vertex of the graph to optimal values and maximize the success probability.
[0060] Figure 9 shows experimental examples (a) to (d) for setting the self-loop weights and count t as pre-configured parameters of a quantum walk to optimal values, each corresponding to the following: (a) 402×300 images of quantum walk targets obtained from the BSDS500 database (b) Probability of success as a function of the number of iteration steps for the self-loop weight s = 0.0001 (c) Time t=5 and probability of success p s Edge detection image corresponding to ≈0.1 (d) Time t=5¹² and success probability p s Edge detection image corresponding to ≈00.97
[0061] In the results shown in Figure 9, a sample image of a bird is shown in (a), the edge is obtained in (c) after t=5 iterations, and the edge is obtained in (d) after t=512 iterations. As can be seen from the curve in (b), the edge in (d) corresponds to the highest success probability, and therefore a clearer edge is obtained compared to (c). In (b), the periodic change in the success probability as a function of the number of iterations t is partially shown, and for example, if the success probability peaks around t=512 with the given image settings, then it would be appropriate to use a pre-setting such as setting t=512.
[0062] Figure 10 shows examples of applying the quantum walk of this embodiment to various quantum computer implementations, with (a) to (d) representing the following: (a) 300x320 image from a database to which quantum walks will be applied. (b) Edges obtained by pure numerical methods using classical computers (quantum walk search performed by simulating quantum circuits with pure numerical computation using classical computers) (c) Edge obtained in a Qiskit circuit using the qasm_simulator backend with a self-loop s=0.1 and time t=2, i.e., edge obtained by running the ibm_sydney(fake) simulator which simulates quantum circuits on a classical computer. (d) Edge obtained in a Qiskit circuit with the ibm_sydney(fake) backend, with a self-loop s=0.1 and time t=2, i.e., the edge obtained by running the ibm_sydney(fake) simulator, which simulates ibm_sydney, an implementation of a quantum computer, on a classical computer.
[0063] In Figure 10, an image of a house is shown as a sample image in (a). In result (b), the numerical result from quantum walk search is shown. Next, the results obtained from the quantum circuit implementation of edge detection are shown in (c) and (d) using the qasm_simulator and ibm_sydney(fake) backends. Due to errors and noise related to the quantum circuit, the results in Figures (c) and (d) from qiskit are not as good as the numerical result in (b), but this can be improved by error reduction. The results in (c) and (d) are expected to mimic the results of a real quantum circuit / quantum computer at a lower cost than a real quantum circuit / quantum computer.
[0064] As described above, according to the embodiments of the present invention, by using a lackadaisical quantum walk (and the corresponding coin), edge detection can be performed while dealing with noise in quantum computers and enjoying the high speed of computation by quantum computers. Various supplementary matters are described below.
[0065] (1) According to embodiments of the present invention, by effectively expanding the application of quantum walks as an example of applications for quantum computers, which is a novel technology, it is possible to contribute to technological innovation and to contribute to Goal 9 of the United Nations Sustainable Development Goals (SDGs), "Build resilient infrastructure, promote inclusive and sustainable industrialization and foster innovation."
[0066] (2) Figure 11 is a diagram showing an example of the hardware configuration of a typical (classical) computer device 70. The quantum computer control device 10 as a classical computer device in the quantum walk system 100 can be realized as one or more computer devices 70 having such a configuration. When the quantum computer control device 10 is realized with two or more computer devices 70, information necessary for processing may be sent and received via a network. The computer device 70 includes a CPU (Central Processing Unit) 71 that executes predetermined instructions, a GPU (Graphics Processing Unit) 72 as a dedicated processor that executes some or all of the execution instructions of the CPU 71 on behalf of or in cooperation with the CPU 71, RAM 73 as main memory that provides a work area to the CPU 71 (and GPU 72), ROM 74 as auxiliary memory, a communication interface 75, a display 76 that outputs a display, an input interface 77 that accepts user input via a mouse, keyboard, touch panel, etc., a speaker 78 that outputs sound, and a bus BS for sending and receiving data between these.
[0067] The quantum computer control unit 10 can be implemented by a CPU 71 and / or GPU 72 that read and execute predetermined programs corresponding to the functions of each part from ROM 74. Both the CPU 71 and GPU 72 are types of arithmetic units (processors). In addition, when display-related processing is performed, the display 76 operates in conjunction; when communication-related processing for data transmission and reception is performed, the communication interface 75 operates in conjunction; and when audio output-related processing is performed, the speaker 78 operates in conjunction. [Explanation of Symbols]
[0068] 100...Quantum walk system, 10...Quantum computer control device, 20...Quantum walk device 11...Scan control unit, 12...Scan result integration unit, 21...Initial state setting unit, 22...Unitary operation iteration unit, 23...Measurement unit, 25...Block processing quantum circuit
Claims
1. In a quantum walk device that performs edge detection on an image by executing a quantum walk search that includes at least the following processes: setting an initial state, repeatedly applying unitary operations to the set initial state, and measuring the state after the iteration, The movement modes of the quantum walker set in the flip-flop operator for defining the unitary operation include not only a movement state to an adjacent position but also a stationary state at the same position, and the coin space states are formed based on the said movement state and said stationary state. Using a basis corresponding to the pixel positions in the aforementioned image, a vertex space state is constructed. A quantum walk device characterized in that the quantum oracle for defining the unitary operation inverts the phase of the vertex space state and the coin space state when the vertex space state corresponds to a predetermined vertex position as an edge candidate and the coin space state corresponds to the stationary state.
2. The quantum walk apparatus according to claim 1, wherein the vertex positions for which the vertex space state is predetermined as edge candidates are determined to be positions in the image where the pixel values are determined to have a spatial gradient.
3. The quantum walk device according to claim 1, characterized in that the vertex space state is configured to have a one-dimensional cycle.
4. The quantum walk apparatus according to claim 1, characterized in that the measurement of the state after the above repetition is performed in such a way that only the vertex space state is determined from among the quantum states composed of the coin space state and the vertex space state.
5. An edge detection method performed by a classical computer, comprising acquiring multiple measurement results from the quantum walk apparatus described in claim 4, and determining that the pixel positions in the image are edge detection locations such that the probability of the corresponding vertex space state being measured for each pixel position falls within a certain value greater than zero.
6. An edge detection method performed by a classical computer, characterized in that edge detection results for the entire image are obtained by acquiring edge detection results for each block into which the image has been divided, using the quantum walk device described in claim 1.