- Source: Quantum walk search
In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or lattice. In a classical random walk, the position of the walker can be described using a probability distribution over the different nodes of the graph. In a quantum walk, on the other hand, the walker is represented by a quantum state, which can be in a superposition of several locations simultaneously.
Search algorithms based on quantum walks have the potential to find applications in various fields, including optimization, machine learning, cryptography, and network analysis. The efficiency and probability of success of a quantum walk search depend heavily on the structure of the search space. In general, quantum walk search algorithms offer an asymptotic quadratic speedup similar to that of Grover's algorithm.
One of the first works on the application of quantum walk to search problems was proposed by Neil Shenvi, Julia Kempe, and K. Birgitta Whaley.
Classical problem description
Given a search space
X
{\displaystyle X}
and a subset
M
⊆
X
{\displaystyle M\subseteq X}
which contains the marked elements, a probabilistic search algorithm samples an element
x
∈
X
{\displaystyle x\in X}
uniformly at random at each step, until it finds a marked element from
M
{\displaystyle M}
. If we define
ϵ
=
|
M
|
/
|
N
|
{\displaystyle \epsilon =|M|/|N|}
as the fraction of marked elements, a procedure of that kind must be repeated
O
(
1
/
ϵ
)
{\displaystyle O(1/\epsilon )}
times to find a marked element.
If we have information about the structure of
X
{\displaystyle X}
we can model it as a graph
G
(
V
,
E
)
{\displaystyle G(V,E)}
, where every vertex
V
=
{
v
1
,
…
,
v
n
}
{\displaystyle V=\{v_{1},\dots ,v_{n}\}}
represents a sample from the search space with
|
X
|
=
n
{\displaystyle |X|=n}
, while the edges represent the conditional probability to sample the next element starting from the current sample.
We perform a search by starting from a random vertex
v
1
{\displaystyle v_{1}}
and, if it does not belong to
M
{\displaystyle M}
, we sample the next vertex
v
2
{\displaystyle v_{2}}
among the ones connected to
v
1
{\displaystyle v_{1}}
. This procedure is known as random walk search. To have a probability close to
1
{\displaystyle 1}
to find the marked node, we need to take asymptotically
O
(
1
/
ϵ
δ
)
{\displaystyle O(1/\epsilon \delta )}
steps on the graph, where the parameter
δ
{\displaystyle \delta }
is the spectral gap associated to the stochastic matrix
P
{\displaystyle P}
of the graph.
To assess the computational cost of a random walk algorithm, one usually divides the procedure into three sub-phases such as Setup, Check, and Update, and analyses their cost.
Setup
The setup cost
S
{\displaystyle S}
refers to the initialization of the stationary distribution over the vertices of the graph.
Update
The update cost
U
{\displaystyle U}
is the cost to simulate a transition on the graph according to the transition probability defined in
P
{\displaystyle P}
.
Check
The check cost
C
{\displaystyle C}
is the cost to verify if the current element belongs to the set
M
{\displaystyle M}
.
The total cost of a random walk search algorithm is
S
+
1
ϵ
(
1
δ
U
+
C
)
{\displaystyle S+{\frac {1}{\epsilon }}{\biggl (}{\frac {1}{\delta }}U+C{\biggr )}}
. The greedy version of the algorithm, where the check is performed after every step on the graph has a complexity of
S
+
1
ϵ
δ
(
U
+
C
)
{\displaystyle S+{\frac {1}{\epsilon \delta }}{\biggl (}U+C{\biggr )}}
. The presence of the spectral gap term
δ
{\displaystyle \delta }
in the cost formulation can be thought of as the minimum number of steps that the walker must perform to reach the stationary distribution. This quantity is also known as mixing time.
Algorithm description
The quantum walk search algorithm was first proposed by Magniez et al., also known as MNRS algorithm, and is based on the quantum walk formulation proposed by Mario Szegedy. The walk is performed on the directed edges of the graph so to represent the quantum state associated with the search space we need two quantum registers
|
i
⟩
|
j
⟩
{\displaystyle |i\rangle |j\rangle }
, which correspond to the edge from
v
i
{\displaystyle v_{i}}
to
v
j
{\displaystyle v_{j}}
. To easily understand how it works, the algorithm can be explained through its geometric interpretation. We first define
|
p
i
⟩
=
∑
j
P
i
j
|
j
⟩
{\displaystyle |p_{i}\rangle =\sum _{j}{\sqrt {P_{ij}}}|j\rangle }
as the uniform superposition over the neighbours of
|
i
⟩
{\displaystyle |i\rangle }
. We additionally define the superposition over the marked and non-marked states, often referred to as the good and bad states, as
|
G
⟩
=
1
|
M
|
∑
i
∈
M
|
i
⟩
|
p
i
⟩
{\displaystyle |G\rangle ={\frac {1}{\sqrt {|M|}}}\sum _{i\in M}|i\rangle |p_{i}\rangle }
and
|
B
⟩
=
1
X
−
|
M
|
∑
i
∉
M
|
i
⟩
|
p
i
⟩
{\displaystyle |B\rangle ={\frac {1}{\sqrt {X-|M|}}}\sum _{i\not \in M}|i\rangle |p_{i}\rangle }
where
M
{\displaystyle M}
is the set of marked elements. The uniform superposition over all the edges
U
{\displaystyle U}
can be viewed a combination of good and bad states.
|
U
⟩
=
1
X
∑
i
∈
X
|
i
⟩
|
p
i
⟩
=
sin
(
θ
)
|
G
⟩
+
cos
(
θ
)
|
B
⟩
{\displaystyle |U\rangle ={\frac {1}{\sqrt {X}}}\sum _{i\in X}|i\rangle |p_{i}\rangle =\sin(\theta )|G\rangle +\cos(\theta )|B\rangle }
with
θ
=
arcsin
(
ϵ
)
{\displaystyle \theta =\arcsin({\sqrt {\epsilon }})}
.
The algorithm is composed of the following steps:
Initialize the quantum state with
|
U
⟩
{\displaystyle |U\rangle }
, usually it is done by some state preparation routine.
Repeat for
O
(
1
/
ϵ
)
{\displaystyle O(1/{\sqrt {\epsilon }})}
:
Perform a reflection through
|
B
⟩
{\displaystyle |B\rangle }
Perform a reflection through
|
U
⟩
{\displaystyle |U\rangle }
Measure the first quantum register and check if it is marked
Since the way the algorithm finds a marked element is based on the amplitude amplification technique, the proof of correctness is similar to the one of Grover's algorithm (which can also be viewed as a special case of a quantum walk on a fully connected graph ). The two reflections through
|
U
⟩
{\displaystyle |U\rangle }
and
|
B
⟩
{\displaystyle |B\rangle }
exhibit the effect of moving the quantum state toward the good state. After
k
{\displaystyle k}
applications of the reflections the state can be written as
sin
(
(
2
k
+
1
)
θ
)
|
G
⟩
+
cos
(
(
2
k
+
1
)
θ
)
|
B
⟩
{\displaystyle \sin((2k+1)\theta )|G\rangle +\cos((2k+1)\theta )|B\rangle }
, and by setting
k
≈
π
4
θ
=
O
(
1
/
ϵ
)
{\displaystyle k\thickapprox {\frac {\pi }{4\theta }}=O(1/{\sqrt {\epsilon }})}
we have that
sin
(
(
2
k
+
1
)
θ
)
≈
1
{\displaystyle \sin((2k+1)\theta )\thickapprox 1}
which yields the good state with a high probability.
First reflection
The first reflection has the effect of checking if the current vertex is marked and applying a phase shift equal to
−
1
{\displaystyle -1}
if it is so. This is a common procedure in many quantum algorithms based on amplitude amplification and can be realized through a quantum oracle function that verifies the condition
|
i
⟩
∈
M
{\displaystyle |i\rangle \in M}
.
Second reflection
The second reflection is implemented with a quantum phase estimation over the walk operator
W
{\displaystyle W}
which must reflect the structure of the graph we are exploring. The walk operator can be defined as
W
=
r
e
f
(
B
)
r
e
f
(
A
)
{\displaystyle W=ref({\mathcal {B}})ref({\mathcal {A}})}
where
r
e
f
(
B
)
{\displaystyle ref({\mathcal {B}})}
and
r
e
f
(
A
)
{\displaystyle ref({\mathcal {A}})}
are two reflections through the subspaces
A
=
s
p
a
n
{
|
i
⟩
,
|
p
i
⟩
}
{\displaystyle {\mathcal {A}}=span\{|i\rangle ,|p_{i}\rangle \}}
and
B
=
s
p
a
n
{
|
p
j
⟩
,
|
j
⟩
}
{\displaystyle {\mathcal {B}}=span\{|p_{j}\rangle ,|j\rangle \}}
. Since the eigenvalues of
W
{\displaystyle W}
are on the form
e
±
2
i
θ
{\displaystyle e^{\pm 2i\theta }}
and the operator has a unique eigenvalue equal to
1
{\displaystyle 1}
corresponding to
|
U
⟩
{\displaystyle |U\rangle }
given by
θ
=
0
{\displaystyle \theta =0}
, we can perform a phase estimation with precision
O
(
1
/
δ
)
{\displaystyle O(1/{\sqrt {\delta }})}
to find the unique eigenvalue. The precision of the reflection depends on the number of qubits used to estimate the phase.
Complexity
With the same formalism used to estimate the cost of the classical random walk algorithm, the quantum costs can be summarised with:
S: is the cost to initialize the superposition
|
U
⟩
{\displaystyle |U\rangle }
U: is the cost perform a step on the graph in superposition i.e. reflection through
|
U
⟩
{\displaystyle |U\rangle }
C: is the cost to implement the quantum oracle i.e. reflection through
|
B
⟩
{\displaystyle |B\rangle }
The total cost of the quantum walk search is
S
+
1
ϵ
(
1
δ
U
+
C
)
{\displaystyle S+{\frac {1}{\sqrt {\epsilon }}}{\biggl (}{\frac {1}{\sqrt {\delta }}}U+C{\biggr )}}
, which results in a quadratic speedup compared to the classical version. Compared to Grover's algorithm quantum walks become advantageous in the presence of large data structures associated with each quantum state, since in the first case they are entirely rebuilt at each iteration while in walks they are only partially updated in each step.
Hypercube example
This is an example of how to apply the quantum walk search on a hypercube graph.
Although in the original description Szegedy quantum walks are used, for this example we show the use of coined quantum walk as it is more intuitive to understand. In any case, the two formalizations turn out to be equivalent under specific assumptions.
The search space is a
n
{\displaystyle n}
-hypercube with
n
=
4
{\displaystyle n=4}
, it has
|
V
|
=
2
4
{\displaystyle |V|=2^{4}}
vertices and it has a degree equal to
4
{\displaystyle 4}
. Each node
v
i
{\displaystyle v_{i}}
can be labeled with a binary string of
4
{\displaystyle 4}
bits and two nodes are connected by an edge if their Hamming distance is
1
{\displaystyle 1}
. To set up the quantum walk search we need a coin register of dimension
H
n
{\displaystyle {\mathcal {H}}^{n}}
to encode all the possible directions which a walker can choose and a vertex register of dimension
H
2
n
{\displaystyle {\mathcal {H}}^{2^{n}}}
to represent the vertices.
The computational basis is
|
d
⟩
|
v
⟩
{\displaystyle |d\rangle |v\rangle }
with
{
d
∈
D
=
{
00
,
01
,
10
,
11
}
,
v
∈
V
=
{
0000
,
0001
,
…
,
1111
}
}
{\displaystyle \{d\in D=\{00,01,10,11\},v\in V=\{0000,0001,\dots ,1111\}\}}
.
The walk is performed by two operators:
Coin operator
C
{\displaystyle C}
is used to create the superposition over the possible directions
Shift operator
S
{\displaystyle S}
is used to take a step in the graph according to one direction
Thus, the walk operator is
W
=
S
C
{\displaystyle W=SC}
.
In the case of the hypercube graph, we can leverage the fact that the binary encoding of the vertices differ by only one bit for any couple of adjacent nodes to construct an efficient shift operator. The shift operator can be written as:
S
=
∑
d
=
1
n
∑
v
=
1
n
|
d
⟩
|
v
⊕
e
d
⟩
⟨
d
|
⟨
v
|
{\displaystyle S=\sum _{d=1}^{n}\sum _{v=1}^{n}|d\rangle |v\oplus e_{d}\rangle \langle d|\langle v|}
where
e
d
{\displaystyle e_{d}}
is the
d
{\displaystyle d}
-basis for the hypercube ( if
n
=
4
{\displaystyle n=4}
the basis are
{
0001
,
0010
,
0100
,
1000
}
{\displaystyle \{0001,0010,0100,1000\}}
). For the coin there are multiple choices such as the Grover coin or the Fourier coin, one can choose the Grover coin to have an equal superposition over all the directions.
The algorithm works as follows:
Repeat for
O
(
1
/
ϵ
)
{\displaystyle O(1/{\sqrt {\epsilon }})}
Initialise the counting register for the phase in superposition
Perform a phase estimation on
W
{\displaystyle W}
with
O
(
1
/
δ
)
{\displaystyle O(1/{\sqrt {\delta }})}
precision
Mark an auxiliary qubit if the estimated phase is
θ
~
=
0
{\displaystyle {\tilde {\theta }}=0}
Un-compute auxiliary data structure
Measure the vertex register
The shift operator is a key factor to the implementation on an efficient quantum walk, while for certain families of graph such as toroids and lattices, the shift is known, for non-regular graph the design of an effective shift operator is still an open challenge.
Applications
The following applications are based on quantum walk on Johnson graph
J
(
n
,
k
)
{\displaystyle J(n,k)}
.
Element distinctness
Given a function
f
{\displaystyle f}
defined on
{
n
}
{\displaystyle \{n\}}
, it asks to find two distinct elements
i
,
j
∈
{
n
}
{\displaystyle i,j\in \{n\}}
such that
f
(
i
)
=
f
(
j
)
{\displaystyle f(i)=f(j)}
if there exist such a pair.
Matrix product verification
Given three
n
×
n
{\displaystyle n\times n}
matrices
A
,
B
{\displaystyle A,B}
and
C
{\displaystyle C}
, the problem asks to verify if
A
B
=
C
{\displaystyle AB=C}
or otherwise find the indices
i
,
j
{\displaystyle i,j}
such that
(
A
B
)
i
,
j
≠
C
i
,
j
{\displaystyle (AB)_{i,j}\neq C_{i,j}}
.
Triangle
A triangle is a complete subgraph on three vertices part of an undirected graph
G
{\displaystyle G}
. Given the adjacent matrix of a graph the problem asks to find a triangle if there is any.
See also
Grover's algorithm
Quantum phase estimation
Quantum walk
Random walk
References
Further reading
Nielsen, Michael A.; Chuang, Isaac L. (2010). Quantum computation and quantum information (10th anniversary ed.). Cambridge: Cambridge university press. ISBN 978-1-107-00217-3.
Lawler, Gregory F.; Limic, Vlada (2010). Random Walk: A Modern Introduction. Cambridge Studies in Advanced Mathematics. Cambridge: Cambridge University Press. doi:10.1017/cbo9780511750854. ISBN 978-0-521-51918-2.
Hidary, Jack D. (2019). Quantum computing: an applied approach. Cham, Switzerland: Springer. ISBN 978-3-030-23921-3.
External links
Quantum Walk
Implementation of quantum walk on cycle graph
Studying quantum walks on near term quantum computers
Kata Kunci Pencarian:
- PlayStation 3
- Cher
- Samuel L. Jackson
- Diskografi Alicia Keys
- Diskografi Martin Garrix
- Quantum walk search
- Quantum walk
- Grover's algorithm
- Quantum algorithm
- Quantum machine learning
- Random walk
- Quantum optimization algorithms
- Jingbo Wang
- Andrew Childs
- Lee Smolin