C S omputer cience

advertisement
Computer Science
Quantum Algorithms
for the Moving-Target
Traveling Salesperson Problem
Department of
School of Engineering
and Applied Science
University of Virginia
Jennifer Mifflin and Gabriel Robins
{jmm6ad, robins}@cs.virginia.edu
(434) 982-2207
Schroedinger’s Cat
Quantum Computing Notation
Like Schroedinger’s Cat, which
is in a superposed alive/dead state,
a qubit (quantum bit) can be both
0 and 1 simultaneously!
2 N 1
a
Moving-Target Traveling Salesperson Problem
Given N moving targets with
constant velocities, find a mintime path that intercepts all targets
a
e
12
1
0

0

0
0 0 0  a 



1 0 0  b 
0 0 1  c 
 
0 1 0  d 
(V=0)
5
2

a 
b 
 
d 
 
c 
 00 
 
 01 
 10 
 
 11 
 
Example, 1 qubit:
1 
0 
 
0
is represented by:
0 
1 
 
1
1
1
0 
1
2
2
Visual Representation
Decision version:
 path with time < T?
Qubit 1
Qubit 2
Optimization version:
CNot
Not





by:
Unitary Transform changes states
- Conjugate Transpose = Inverse
H
A A
T
1
1
00 
10
2
2
00
10
(V=0)
c
• Upper-bound T w/initial random path
• Binary search the range using T/2,
T/4, etc. to find optimal min-time path
1
1
00 
11
2
2
1
Example: Hadamard Transform
1
1
10 
01
2
2
Hamiltonian Path Solution: Traverse Every Possible Path
1
2
1
2
1 
2
 1 
2 





1
2
1
2
1 
2
 1 
2 

1 0
0 1 


Extend to TSP:
1000 1000 0000 0000 0000
Or
1000 1
2
1
First Step
1100 1 2  1010 1 3
Second Step
• Another register:
Post-processing Capabilities
– Large enough to hold longest path
• Each iteration, add edge weight to register
Extend to Moving-Target TSP:
3
4
0100 1 2 1  1101 1 2 4  0010 1 3 1  1011 1 3 4
After N+1 steps:
1’s in parity register
imply Hamiltonian Path





Extend to (Moving-Target) TSP
Start State
• For N nodes, use N2+N qubits
• Separate into N+1 equal registers
• First register
- parity of times a node has been visited
• Last N registers track path
1 
2

1 
2 
Unitary Transformation
3
(V=0)
2Nx1 matrix represents N qubits
(x-1)th row represents amplitude of x
value
What is min-time path?
8
d
Matrix Representation
is represented by:
b
(V=0)
1
The CNot gate negates the second
bit only if the control bit is 1 (true)
Hadamard
Transform
• Non-deterministically travel all paths
• Check each path length against T
11
i 0
i
1
1
1
1
00  01  10  11
2
2
2
2
Contained in NP:
4
6
a
Where:
2
The Ubiquitous CNot Gate
Moving-Target TSP
is NP-Complete
(V=0)
si
i
i 0
Proof: NP-Complete TSP is a
special case of Moving-Target
TSP (with zero velocities)
1
1
0 
1
2
2
Superposition of states:
2 1
Moving-Target TSP
is Intractable
Superposition of Qubits
x
Quantum register - the “ket”:
N
Origin
www.cs.virginia.edu
Third Step
0000 1 2 1 2  0110 1 2 1 3  1001 1 2 4 2  1111 1 2 4 3 
0110 1 3 1 2  0000 1 3 1 3  1111 1 3 4 2  1001 1 3 4 3
• Add time register
• Track the total time elapsed
Final Steps
• Obtain superposition of all paths
• Grover’s algorithm for Hamiltonian paths
• Grover’s algorithm for min-time path
Summary
Transition for
2J Adjacent
Nodes
Grover’s Search Algorithm
O( K ) for K items
Control bit
Qubit 1
Qubit 2
Qubit 3
Qubit 4
H
H
• At each step, this transition is applied
• Places 2J qubits into equal superposition
Original Amplitudes
Average Amplitudes
Negate Amplitude
Flip around Avg
• O(2N/2) time complexity
• Superposition achieved in linear time
• Need logarithmic search algorithm to
achieve linear time complexity
• Implementation prototype
Future Work
• Improve (Moving-Target) TSP Complexity
• Improve search algorithm
• P=NP for quantum computer?
Download