8/3/2019 Quantum Algorithms for Moving-Target TSP
1/41
Quantum Algorithms for
Moving-Target TSP
Prof. Rushen Chahal
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
2/41
Two Slit Experiment
Bullets
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
3/41
Two Slit Experiment
Sound Waves
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
4/41
Electrons
Two Slit Experiment
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
5/41
Two Slit Experiment
Observing Electrons
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
6/41
Basic Quantum Computation Qubit - can be 1, 0 or both 1 and 0
|x> - number in Quantum Computer
Superposition of states:
Where:
!
12
0
N
i
iisa 1
12
0
2!
!
N
i
ia
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
7/41
Examples
12
10
2
1
112110
2101
2100
21
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
8/41
Representation n qubits: 2nx1 matrix represents the state:
|0> would be represented by
|1> would be represented by
Equal superposition would be
-
1
0
-
0
1
-
2
12
1
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
9/41
Changing States Unitary transformations change states
Unitary matrix:
conjugate transpose = inverse
1! AA
T
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
10/41
ExampleHadamard Transform
-
2
1
2
121
21
-0
1
-
2
12
1
!
!
-
10
01
-
2
1
2
12
1
2
1
-
2
1
2
12
1
2
1
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
11/41
Example: CNot Gate
-
01
10
-
0100
1000
0010
0001
Not Gate:
-
b
a
-
a
b!
-
d
c
b
a
!
-
c
d
b
a
CNot Gate:
11
10
01
00
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
12/41
Visual Representation
00 102
100
2
1
112
1002
1 012
1102
1
p
p
p
H
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
13/41
Grovers Search Algorithm Search a phone book for a specific number
without rearranging the numbers.
Idea: magnify amplitude of the choosen number:
Flip the amplitude of the selected item and
rotate all amplitudes around the average
Repeat this until the selected items probabilityof being read is greater than 1/2
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
14/41
Graphical Representation
Original Amplitudes Negate Amplitude
Average of all Amplitudes Flip all Amplitudes around Avg
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
15/41
Time Complexity Normal search requires N/2 steps
Grovers Algorithm takes steps NO
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
16/41
Traveling Salesperson Problem
a
b
cd
e
10
38
6
1211
4
25
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
17/41
Origin
Moving-Target TSP
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
18/41
3
2
1
4
Origin
Moving-Target TSP
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
19/41
Moving Target TSP is Intractable
a
b
cd
e
10
38
6
1211
4
25
(V=0)
(V=0)(V=0)
(V=0)
(V=0)
NP-Hard
Classical TSP is NP-Complete
Classical TSP reduces to Moving-Target TSP
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
20/41
NP-Complete Contained in NP:
1. Decision version: path with time < T?
Non-deterministically travel all paths. If one exists
with time < T, return TRUE. Else, return FALSE
2. Optimization version: what is min-time path?
Upper-bound T with initial random path. Then,binary search the range by testing T/2, T/4, etc. to
find optimal the minimum- time path
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
21/41
Quantum Computing Solution Step 1 - Traverse every possible path
Step 2 - Search through paths superposition
to find a shortest path
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
22/41
Superposition for
Hamiltonian Paths T. Rudolph
superposition of cubic bipartite graph in linear time
Cubic - all nodes have degree 3
Bipartite
nodes are partitioned into two groups
each node is only adjacent to nodes in other group
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
23/41
Example
00000000000010001000
34311001243111113131000021310110
34211111242110013121011021210000
4311011131001042111011210100
311010211100
1
4
2
3
11000
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
24/41
Potential Problems Problem 1:
Extract the Hamiltonian paths
Problem 2:
Find cycles, not paths
Problem 3:
Only works for cubic graphs
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
25/41
Solution to Problem 1 How to extract only paths containing all 1s
in first register?
Solution: Use Grovers Algorithm!
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
26/41
Solution to Problem 2 Use black box for Hamiltonian paths to
solve for Hamiltonian cycles?
Solution:
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
27/41
Solution to Problem 3 Problem 3: non-cubic graphs
Solution:
Make all nodes have the same degree
Degree must be a power of 2
Algorithm when all nodes have degree 2i
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
28/41
Step 1Give all nodes same degree of 2x
Graph G has n nodes
Find node with largest degree D
Find x where xxD 22 1 ee
n+x-n(mod x)
Groups of x nodes
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
29/41
Step 1 (continued)
Go through the graph G node by node, and
go through the new nodes set by set:
G
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
30/41
1101
4
11000
4
10100
4
10010
4
1
H
H
11004
11000
4
10100
4
10010
4
1
H
11004
11000
4
10100
4
10000
4
1
H
10002
10000
2
10000
Algorithm Quantum transition for nodes with 2x degree:
Control bit
11014
11000
4
10100
4
10010
4
1
10014
11000
4
10100
4
10010
4
1
00014
11000
4
10100
4
10010
4
1
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
31/41
Observations
Algorithm works for all graphs
May double # of nodes
Takes O(n) steps
Search first register for all 1s
Added nodes do not affect solution
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
32/41
Extension to TSP
Need another register:
Large enough to hold longest path
At each step, add edge weight into register
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
33/41
Iteration
All paths of length n & their weights
Run algorithm for Hamiltonian cycles Look for all 1s in the first register
Superposition of all Hamiltonian cycles
Grovers algorithm on sum register finds min
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
34/41
Extension to Moving-Target TSP Moving Target TSP
Each node has a velocity
Find the minimum-weight round trip
v2x
v2yv1x
v1y
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
35/41
Moving-Target TSP Solution
Add a time register Track the total time elapsed so far
Each step: calculate time to reach next node
tvv
Unknowns
MaxVvv
atvntv
atvntv
yx
yx
yyyy
xxxx
:
1
1
222!
!
!
v1x
v1y
MaxV
yxaa ,
yx
nn ,
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
36/41
Determining the Optimal Path Add time to reach next node to total sum
Find the minimum, similar to TSP
Added time complexity is linear
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
37/41
Summary
Extended Hamiltonian path algorithm for
cubic bipartite graphs [Rudolphs]
For TSP and Moving-Target TSP, paths
superposition can be obtained in linear time
Grovers search algorithm works in time
SQRT of # of objects in superposition 2n different paths: total time is O(2n/2 )
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
38/41
Future Work Faster algorithm for (Moving-Target) TSP
Improve Grovers search algorithm
P=NP for quantum computation?
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
39/41
Circuit
a,b,c are the nodes adjacent to I A is the register keeping track of which nodes
have been traversed
V
i
ab
c
ab
c
j
A
j+1
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
40/41
Finding the Minimum Measure the lengths register (M)
Create superposition again
Now search for all paths < M
On average, do this log(k) times
k is the number of items in the superposition
Prof. Rushen Chahal
8/3/2019 Quantum Algorithms for Moving-Target TSP
41/41
Sound WavesBullets
Electrons Observed Electrons
Prof. Rushen Chahal