SlideShare a Scribd company logo
Quantum Processes in Graph Computing
Dr. Marko A. Rodriguez
DataStax and Apache TinkerPop
Rodriguez, M.A., Watkins, J.H., "Quantum Walks with Gremlin," GraphDay '16, pp. 1-16, Austin, Texas, January 2016.
http://arxiv.org/abs/1511.06278
Part 1
Wave Dynamics in Graphs
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
0.0
-1.0
1.0
However, vertices don't "move."
The graph topology is the only space.
There is no "space" outside the graph.
"Then how do you model an oscillating vertex?"
By computing the amount of "energy"
at the vertex over time.
"But traversers are indivisible objects!
Energy must be able to be
divided indefinitely and take negative values."
Lets look at Gremlin Sacks.
Gremlin Sacks
(a data structure local to the traverser)
(each traverser can carry an object along its way)
The traverser is not divisible, but that
double floating point number in his sack is!
1.0
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
-0.5 0.5
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
-0.5 0.250.25
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
-0.125 0.125-0.3750.375
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
0.375-0.3125 -0.3125
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
0.15625 -0.156250.34375-0.34375
0.0
-1.0
1.0
Don't worry about the algorithm, just watch the visualization for now.
1 2 30 4 5 6
The graph.
1 2 30 4 5 6
1.0
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
An initial energy of 1.0 perturbs the graph.
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.5 0.51.0
out('left') out('right')
The energy diffuses left and right along the graph.
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.5 0.5
1
tim
e
The total energy in the system is always 1.
Energy waves reverberate and thus, prior "left energy" can go right.
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.5 0.250.25 -0.5 0.5
out('left') out('right') out('left') out('right')
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.5 0.250.25 -0.5 0.5
out('left') out('right') out('left') out('right')
(-0.5 * 0.5) + (0.5 * -0.5)
-0.5
-0.25 + -0.25
Energy constructively and destructively interferes.
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.5 0.250.25
2
tim
es
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
-0.125 0.125-0.3750.375 -0.5 0.250.25
out('left') out('left') out('left')out('right') out('right') out('right')
1 2 30 4 5 6
g.withSack(1.0,sum).V(3).
repeat(
union(
sack(mult).by(-0.5).out('left'),
sack(mult).by(0.5).out('right')
)
).times(3)
3
tim
es
-0.125 0.125-0.3750.375
A wave is a diffusion of energy within a space.
The space is the graph.
The energy is contained within the traversers (via their sacks).
When a traverser splits, its sack energy is divided amongst its children
traversers' sacks.
When traversers merge, their sack energy is summed to a
single traverser sack.
If two energy sacks with the same parity are merged,
constructive interference.
If a negative and a positive energy sack are merged,
destructive interference.
Part 2
Quantum Mechanics
via the
Copenhagen Interpretation
1
2
3
0 4 5
Space = Graph
Particle = Traverser
1
2
3
0 4 5
gremlin> g.V(0)
==>v[0]
1
2
3
0 4 5
gremlin> g.V(0).out()
==>v[1]
1
2
3
0 4 5
gremlin> g.V(0).out().out()
==>??
?
?
"Two outgoing adjacent vertices,
what should I do?"
1
2
3
0 4 5
gremlin> g.V(0).out().out()
==>v[2]
==>v[3]
1
2
3
0 4 5
gremlin> g.V(0).out().out()
==>v[2]
==>v[3]
2 particles are created from 1.
In graph computing: "There are two legal paths, so take both."
In physical computing: "Violates conservation of energy law (matter is created)."
1
2
3
0 4 5
gremlin> g.V(0).out().out().out()
==>v[4]
==>v[4]
In graph computing: "Two length 3 paths lead to vertex 4."
In physical computing: "The twin particles coexist at vertex 4."
1
2
3
0 4 5
gremlin> g.V(0).out().out().out().out()
==>v[5]
==>v[5]
In graph computing: "Two length 3 paths lead to vertex 5."
In physical computing: "The twin particles coexist at vertex 5."
1
2
3
0 4 5
What does a physical particle do when it is faced with a choice?
?
?
1
2
3
0 4 5
The particle takes both options!
The indivisible "particle" divides!
1
2
3
0 4 5
Two particles can't be "seen," but we know both options are taken.
When we try to see both "particles", they instantly become one particle.
"Why do you say the particle took both paths?
If you find it only on a single path, then wasn't only one path taken?"
Wave interference!
Explanation coming soon...
"Wave Function Collapse"
The smallest "quanta" allowed is the particle.
Only one particle is ever directly observed.
However, prior to observation, the particle splits into pieces (a wave).
When we observe the system, the pieces becomes one again (a particle).
Other Interpretations of Quantum Mechanics
Multi-World Interpretation
Pilot Wave Interpretation
photon
electron
bacteria!
an isolated system
Part 3
The Quantum Wave Function
Classical Particle
(A single unique "thing" exists)
The Particle Diffuses over Space as a Wave
(The particle is in a quantum superposition)
The Wave Function is Perturbed
(e.g., light tries to "see" the particle)
The Wave Function Collapses to a Classical Particle
(The wave turns into a particle)
Classical Particle
(A single unique "thing" exists)
The Particle Diffuses over Space as a Wave
(The particle is in a quantum superposition)
The Wave Function is Perturbed
(e.g., light tries to "see" the particle)
The Wave Function Collapses to a Classical Particle
(The wave turns into a particle)
ObservedObservedInferred
48 49 5047 51 52 53
A 101 vertex line graph with the center being vertex 50.
Space
Classical Initial Step
The particle has a definite location and a spin/potential to the left.
48 49 5047 51 52 53
[1, 0]
[1,0]50
left-ness
right-ness
For each option (degree of freedom),
we need a vector component.
In the article, we call it "traversal superposition."
0.00.20.40.60.81.0
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
48 49 5047 51 52 53
The probability of seeing the particle at vertex 50 is 100%.
[1, 0]
12
+ 02
= 1
Wave Function to Probability Distribution
Coin Step
48 49 5047 51 52 53
H =
1
√
2
1 1
1 −1
The particle's spin is put into superposition.
[1, 0] →
1
√
2
,
1
√
2
Ithastheoptiontogo
leftorrightsoitgoesboth!
Coin Step
48 49 5047 51 52 53
H =
1
√
2
1 1
1 −1
The particle's spin is put into superposition.
[1, 0] →
1
√
2
,
1
√
2
"right particles" going right flip their sign.
"left particles" going left or right keep their sign.
Coin Step
48 49 5047 51 52 53
H =
1
√
2
1 1
1 −1
The particle's spin is put into superposition.
[1, 0] →
1
√
2
,
1
√
2
1
√
2
1 1
1 −1
· [1, 0] =
1√
2
1√
2
1√
2
− 1√
2
· [1, 0] =
1
√
2
,
1
√
2
Coin Step
48 49 5047 51 52 53
H =
1
√
2
1 1
1 −1
The particle's spin is put into superposition.
1 ·
1
√
2
+ 0 ·
1
√
2
, 1 ·
1
√
2
+ 0 · −
1
√
2
=
1
√
2
,
1
√
2
[1, 0] →
1
√
2
,
1
√
2
1
√
2
1 1
1 −1
· [1, 0] =
1√
2
1√
2
1√
2
− 1√
2
· [1, 0] =
1
√
2
,
1
√
2
Coin Step
48 49 5047 51 52 53
1
√
2
,
1
√
2
The "particle" spinning left goes left and
the "particle" spinning right goes right.
Shift Step
48 49 5047 51 52 53
1
√
2
, 0 0,
1
√
2
1
√
2
,
1
√
2
48 49 5047 51 52 53
1
√
2
, 0 0,
1
√
2
Shift Step
P(v) = |c0|2
+ |c1|2
48 49 5047 51 52 53
1
√
2
, 0 0,
1
√
2
1
√
2
2
+ 02
= 0.5 02
+
1
√
2
2
= 0.5
Wave Function to Probability Distribution
The probability of locating the classical particle each vertex
is a function of the total wave amplitude at that vertex.
50%-chance 50%-chance
0.00.10.20.30.40.5
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
48 49 5047 51 52 53
1
√
2
, 0 0,
1
√
2
1
√
2
2
+ 02
= 0.5 02
+
1
√
2
2
= 0.5
The probability of seeing the particle at vertex 49 or 51 is 50%.
Wave Function to Probability Distribution
48 49 5047 51 52 53
H =
1
√
2
1 1
1 −1
Each "particles'" spin is put into superposition.
Coin Step
1
2
,
1
2
1
2
, −
1
2
48 49 5047 51 52 53
Shift Step
1
2
,
1
2
The "particles" spinning left go left and
the "particles" spinning right go right.
0, −
1
2
1
2
, 0
1
2
,
1
2
1
2
, −
1
2
48 49 5047 51 52 53
Shift Step
1
2
,
1
2
0, −
1
2
1
2
, 0
Constructive Interference
0.00.10.20.30.40.5
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
48 49 5047 51 52 53
1
2
,
1
2
0, −
1
2
1
2
, 0
1
2
2
+ 02
=
1
4
1
2
2
+
1
2
2
=
1
2
02
+ −
1
2
2
=
1
4
Wave Function to Probability Distribution
48 49 5047 51 52 53
Coin Step
H =
1
√
2
1 1
1 −1
The "particles'" spin is put into superposition.
1
2
√
2
,
1
2
√
2
−
1
2
√
2
,
1
2
√
2
1
√
2
, 0
48 49 5047 51 52 53
Shift Step
The "particles" spinning left go left and
the "particles" spinning right go right.
1
2
√
2
, 0
1
√
2
,
1
2
√
2
−
1
2
√
2
, 0 0,
1
2
√
2
Destructive InterferenceConstructive Interference
Wave Function to Probability Distribution
0.00.10.20.30.40.50.6
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
48 49 5047 51 52 53
1
2
√
2
, 0
1
√
2
,
1
2
√
2
−
1
2
√
2
, 0 0,
1
2
√
2
1
2
√
2
2
+ 02
=
1
8
02
+
1
2
√
2
2
=
1
8
−
1
2
√
2
2
+ 02
=
1
8
1
√
2
2
+
1
2
√
2
2
=
5
8
0.00.10.20.30.40.50.6
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.40.5
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.4
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.000.050.100.150.200.250.30
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.4
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.4
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.4
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.30.4
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.000.050.100.150.200.250.30
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.000.050.100.150.200.25
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.000.050.100.150.200.250.30
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
0.00.10.20.3
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
48 49 5047 51 52 53
Fast forward to iteration 50.
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function to Probability Distribution
13 14 1512 16 17 18
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function is Perturbed by Light
13 14 1512 16 17 18
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function Collapse
13 14 1512 16 17 18
sample
Classical Particle
13 14 1512 16 17 18
[1, 0]
0.00.20.40.60.81.0
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function Collapse
13 14 1512 16 17 18
Could
have
been
thisvertex.
Again,itsa
probabilitydistribution.
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
Wave Function Collapse
13 14 1512 16 17 18
Could not be at this vertex because there
is no wave energy at that vertex.
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
48 49 5047 51 52 53
48 49 5047 51 52 53
[1, 0]
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Classical Initial Step
sackSum = { a,b -> [a[0] + b[0],a[1] + b[1]] }
hadamard = { a,b ->
[(1/Math.sqrt(2)) * (a[0] + a[1]), (1/Math.sqrt(2)) * (a[0] - a[1])]
}
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Coin Step
H =
1
√
2
1 1
1 −1
48 49 5047 51 52 53
1
√
2
,
1
√
2
project = { a,b -> [a[0] * b[0], a[1] * b[1]] }
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Shift Step
48 49 5047 51 52 53
1
√
2
, 0 0,
1
√
2
1
√
2
,
1
√
2
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Diffuse the wave function for 50 steps
48 49 5047 51 52 53
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
norm = { Math.pow(it.get()[0],2) +
Math.pow(it.get()[1],2) }
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Wave Function to Probability Distribution
13 14 1512 16 17 18
P(v) = |c0|2
+ |c1|2
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Wave Function Collapse (Classical Particle Manifested)
13 14 1512 16 17 18
0.000.050.100.15
vertices
probability
0 4 8 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87 92 97
sample
g.withSack([1,0],sackSum).V(50).
repeat(
sack(hadamard).
union(
sack(project).by(constant([1,0])).out('left'),
sack(project).by(constant([0,1])).out('right')
)
).times(50).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
A Quantum Walk on a Line with Gremlin
H =
1
√
2
1 1
1 −1
Y =
1
√
2
1 i
i 1
Balanced Unitary OperatorUnbalanced Unitary Operator
0.000.050.100.15
vertices
probability
0 6 12 20 28 36 44 52 60 68 76 84 92 100
0.000.020.040.060.080.10
vertices
probability
0 6 12 20 28 36 44 52 60 68 76 84 92 100
Any energy split operator can be used as long as:
1. The operation conserves the total energy in the system.
2. It is possible to reverse the operation.
In general, a unitary operator is used to diffuse energy.
complexnumbers
i2
=−1
U · U∗
= I
nofriction
noinformation
loss
The probability of seeing the particle at a particular vertex after
50 iterations for both a quantum walk and a classical walk.
Quantum walks can explore more graph in a shorter amount of time!
0.000.020.040.060.080.10
vertices
probability
0 6 12 20 28 36 44 52 60 68 76 84 92 100
√
50 = 7.07
50 = 50
√
n
n
Y =
1
√
2
1 i
i 1
Part 4
The Double Slit Experiment
Thomas Young (1773-1829)
Question
"Is light a wave or a particle?"
continuous light source double-slit screen photoelectric film
Thomas Young (1773-1829)
Hypothesis
"If light is a wave, then the film will show a
constructive and destructive interference pattern."
continuous light source double-slit screen photoelectric film
Thomas Young (1773-1829)
Result
"Light must be a wave because it has interference and
refraction patterns like other natural waves such as
water waves."
continuous light source double-slit screen photoelectric film
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Question
"What happens when only a single photon
of light is emitted?"
The most indivisible amount of light.
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Hypothesis
"The photons must act like bullets
and hit directly behind the slits."
50%
chance
50% chance
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Experiment
"Shoot photon #1!"
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Experiment
"Shoot photon #2!"
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Experiment
"Shoot photon #3!"
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Experiment
"Shoot photon #4!"
Fast forward to photon number 20.
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Experiment
"Shoot photon #20!"
G. I. Taylor (1886-1975)
single photon light source double-slit screen photoelectric film
Result
"A single quantum of light (a photon) turns into a
wave after emission and then is localized back to a
particle at the film based on the wave function."
single photon light source
double-slit screen
photoelectric film
Classical particle.
Particle becomes a wave.
Quantum Processes in Graph Computing
Quantum Processes in Graph Computing
"Particle" takes both options.
Quantum Processes in Graph Computing
Wave interference.
Quantum Processes in Graph Computing
Probability distribution generated from the wave function.
Wave function collapses back to a classical particle.
0.0e+001.0e-052.0e-05
screen vertices
probability
0 2 4 6 8 10 12 14 16 18 20
Com
puted
using
G
rem
lin
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Four degrees of freedom means you have a four entry energy vector.
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Bottom-middle vertex. The single photon light source.
A 4x4 unitary operator called the Grover coin. R =
1
2




−1 1 1 1
1 −1 1 1
1 1 −1 1
1 1 1 −1




g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
Diffuse the wave in all four directions on the lattice.
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
If there is a "wall," reflect the energy back. No decoherence/friction.
The
article
presents
the
details
around
reflection.
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
As before, generate the probability distribution and sample it (i.e. collapse the wave form).
g.withSack([0,0,1,0],sackSum).V(10).
repeat(
sack(grover).
union(
choose(out('left'),
out('left').sack(project).by(constant([1,0,0,0])),
identity().sack(project).by(constant([1,0,0,0])).
sack(flip).by(constant("lr"))),
choose(out('right'),
out('right').sack(project).by(constant([0,1,0,0])),
identity().sack(project).by(constant([0,1,0,0])).
sack(flip).by(constant("lr"))),
choose(out('up'),
out('up').sack(project).by(constant([0,0,1,0])),
identity().sack(project).by(constant([0,0,1,0])).
sack(flip).by(constant("ud"))),
choose(out('down'),
out('down').sack(project).by(constant([0,0,0,1])),
identity().sack(project).by(constant([0,0,0,1])).
sack(flip).by(constant("ud"))))).
times(22).
group().by(id).by(sack().map(norm)).
unfold().sample(1).by(values)
A Quantum Walk on a Bounded Lattice with Gremlin
Step 0
x-axis vertices
y-axisvertices
5
10
15
20
5 10 15 20
Step 22
0.0e+001.0e-052.0e-05
screen vertices
probability
0 2 4 6 8 10 12 14 16 18 20
x-axis vertices
y-axisvertices
5
10
15
20
5 10 15 20
Step 22
Part 5
Quantum Computing
In classical computing, a bit is either 0 or 1.
0
[1, 0]
1
In quantum computing, a qubit can be 0, 1, or a superposition of both.
0
[0, 1]
1
1
√
2
, −
1
√
2
NOT
In classical computing, a gate takes a {0,1}* and outputs {0,1}*.
0 1
In quantum computing, a quantum gate takes a superposition of {0,1}*
and outputs a superposition of {0,1}*.
NOT
X =
0 1
1 0
1
√
2
, −
1
√
2
−
1
√
2
,
1
√
2
f(0)→
1
f(0,1)→
1,0
Two
function
evaluations
forthe
costofone!
U
Every quantum gate is a unitary operator.
U · U∗
= I
Not all gates have to be the same operator.
YH
H =
1
√
2
1 1
1 −1
Y =
1
√
2
1 i
i 1
H Y RH
Gates are connected by "wires."
R =
1
2




−1 1 1 1
1 −1 1 1
1 1 −1 1
1 1 1 −1




R
2-qubits!
Its all just vertices and
edges!
A quantum algorithm (circuit) can evaluate
all possible inputs at once.breadth-first search
depth-first search
The algorithm's purpose is to guide the wave function to yield the
correct answer to the problem with a high-probability (near 100%) at
the time of sampling (i.e. wave function collapse).
5-qubit register, where each qubit is both a 0 and 1 (thus, all 32 possible states at once).
1 0 1 0 0
We can never observe a superposition of outputs.
Thus, our quantum algorithms must ensure wave collapse to the correct classical state.
* Read about the pilot-wave interpretation of quantum mechanics.
Breadth-first memory requirements not needed!
* Read about the multi-world interpretation of quantum mechanics.
Depth-first speed enabled!
breadth-first search
depth-first search
1 0 1 0 0
0.03
0
1
0
1
All 32 states/values exist simultaneously.
Only one state/value can exist at observation.
1/32
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
25
=
32
Total wave energy is split equally amongst all states/values.
If the wave function collapses at this point in time, only one number (0-31) will manifest itself in reality with each being equally likely.
A quantum algorithm leverages simultaneous states, but can ultimately only yield one output state (a collapsed wave).
Thus, if you don't want a random answer, the algorithm must focus the wave energy on the correct solution.
Waves are controlled via constructive and destructive interference as the various parallel computations can interact with one another.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1 0 1 0 0
+
Quantum Circuit
Graph
Quantum Wave Function
Traversal
Quantum Graph Computing
Structure Process
U
U
U
Fin.
Rodriguez, M.A., Watkins, J.H., "Quantum Walks with Gremlin," GraphDay '16, pp. 1-16, Austin, Texas, January 2016.
http://arxiv.org/abs/1511.06278

More Related Content

PDF
Principle of Derivative Calculus - Differential Calculus - An Introduction by...
PPTX
Savasana_to_Adultery
PDF
Gremlin's Graph Traversal Machinery
PDF
ACM DBPL Keynote: The Graph Traversal Machine and Language
PDF
The Gremlin Graph Traversal Language
PPTX
Cassandra Summit - What's New In Apache TinkerPop?
PDF
Solving Problems with Graphs
ODP
Graphs are everywhere! Distributed graph computing with Spark GraphX
Principle of Derivative Calculus - Differential Calculus - An Introduction by...
Savasana_to_Adultery
Gremlin's Graph Traversal Machinery
ACM DBPL Keynote: The Graph Traversal Machine and Language
The Gremlin Graph Traversal Language
Cassandra Summit - What's New In Apache TinkerPop?
Solving Problems with Graphs
Graphs are everywhere! Distributed graph computing with Spark GraphX

Viewers also liked (20)

PDF
Titan: The Rise of Big Graph Data
PDF
Faunus: Graph Analytics Engine
PDF
Titan: Big Graph Data with Cassandra
PDF
Graph Processing with Apache TinkerPop
PDF
Gremlin: A Graph-Based Programming Language
PDF
Cassandra Virtual Node talk
PDF
HBaseCon 2015: S2Graph - A Large-scale Graph Database with HBase
PDF
F8 tech talk_pinterest_v4
PPT
Seda an architecture for well-conditioned scalable internet services
PPTX
Facebook's TAO & Unicorn data storage and search platforms
PPTX
Data Driven Growth
PPTX
IDEs y Frameworks mas utilizados
PPTX
Presto: Distributed Machine Learning and Graph Processing with Sparse Matrices
PDF
Real World Tales of Repair (Alexander Dejanovski, The Last Pickle) | Cassandr...
PDF
Configurando o Geany para Python - 03/2012
PDF
Configurando o geany_para_python
PDF
Introduction to cassandra 2014
PPTX
Epiphany: Connecting Millions of Events to Thirty Billion Data Points in Real...
PPTX
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
PPTX
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
Titan: The Rise of Big Graph Data
Faunus: Graph Analytics Engine
Titan: Big Graph Data with Cassandra
Graph Processing with Apache TinkerPop
Gremlin: A Graph-Based Programming Language
Cassandra Virtual Node talk
HBaseCon 2015: S2Graph - A Large-scale Graph Database with HBase
F8 tech talk_pinterest_v4
Seda an architecture for well-conditioned scalable internet services
Facebook's TAO & Unicorn data storage and search platforms
Data Driven Growth
IDEs y Frameworks mas utilizados
Presto: Distributed Machine Learning and Graph Processing with Sparse Matrices
Real World Tales of Repair (Alexander Dejanovski, The Last Pickle) | Cassandr...
Configurando o Geany para Python - 03/2012
Configurando o geany_para_python
Introduction to cassandra 2014
Epiphany: Connecting Millions of Events to Thirty Billion Data Points in Real...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
HBaseCon 2015 General Session: Zen - A Graph Data Model on HBase
Ad

Similar to Quantum Processes in Graph Computing (20)

PDF
22PH102_ISE_U2_LP1_-_Notes.pdf
PDF
Discussion on Quantum Entanglement.pdf
PPTX
Graphs of the Sine and Cosine Functions Lecture
PPT
The Many Worlds of Quantum Mechanics
PPTX
Wave Motion Theory Part1
PDF
Perfect method for Frames
PPTX
Simple Matrix Factorization for Recommendation in Mahout
PPT
Semi-Classical Transport Theory.ppt
PDF
RANDOM NUMBER GENERATION, The Logistic Equation
PPT
Kinematics final
PDF
Learning object #2
PDF
Chapter 6 taylor and maclaurin series
PPT
4 stochastic processes
PPTX
Bp219 04-13-2011
PDF
1010n3a
PPTX
Quantum Experiments
PDF
Chapter 11_0 velocity, acceleration.pdf
PDF
Artificial intelligence ai choice mechanism hypothesis of a mathematical method
PDF
Numerical Differentiation and Integration
PPT
Laplace equation
22PH102_ISE_U2_LP1_-_Notes.pdf
Discussion on Quantum Entanglement.pdf
Graphs of the Sine and Cosine Functions Lecture
The Many Worlds of Quantum Mechanics
Wave Motion Theory Part1
Perfect method for Frames
Simple Matrix Factorization for Recommendation in Mahout
Semi-Classical Transport Theory.ppt
RANDOM NUMBER GENERATION, The Logistic Equation
Kinematics final
Learning object #2
Chapter 6 taylor and maclaurin series
4 stochastic processes
Bp219 04-13-2011
1010n3a
Quantum Experiments
Chapter 11_0 velocity, acceleration.pdf
Artificial intelligence ai choice mechanism hypothesis of a mathematical method
Numerical Differentiation and Integration
Laplace equation
Ad

More from Marko Rodriguez (20)

PDF
mm-ADT: A Virtual Machine/An Economic Machine
PDF
mm-ADT: A Multi-Model Abstract Data Type
PDF
Open Problems in the Universal Graph Theory
PDF
Gremlin 101.3 On Your FM Dial
PDF
The Path Forward
PDF
The Pathology of Graph Databases
PDF
Traversing Graph Databases with Gremlin
PDF
The Path-o-Logical Gremlin
PDF
The Gremlin in the Graph
PDF
Memoirs of a Graph Addict: Despair to Redemption
PDF
Graph Databases: Trends in the Web of Data
PDF
Problem-Solving using Graph Traversals: Searching, Scoring, Ranking, and Reco...
PDF
A Perspective on Graph Theory and Network Science
PDF
The Graph Traversal Programming Pattern
PPT
The Network Data Structure in Computing
PPT
A Model of the Scholarly Community
PDF
General-Purpose, Internet-Scale Distributed Computing with Linked Process
PDF
Collective Decision Making Systems: From the Ideal State to Human Eudaimonia
PDF
Distributed Graph Databases and the Emerging Web of Data
PDF
An Overview of Data Management Paradigms: Relational, Document, and Graph
mm-ADT: A Virtual Machine/An Economic Machine
mm-ADT: A Multi-Model Abstract Data Type
Open Problems in the Universal Graph Theory
Gremlin 101.3 On Your FM Dial
The Path Forward
The Pathology of Graph Databases
Traversing Graph Databases with Gremlin
The Path-o-Logical Gremlin
The Gremlin in the Graph
Memoirs of a Graph Addict: Despair to Redemption
Graph Databases: Trends in the Web of Data
Problem-Solving using Graph Traversals: Searching, Scoring, Ranking, and Reco...
A Perspective on Graph Theory and Network Science
The Graph Traversal Programming Pattern
The Network Data Structure in Computing
A Model of the Scholarly Community
General-Purpose, Internet-Scale Distributed Computing with Linked Process
Collective Decision Making Systems: From the Ideal State to Human Eudaimonia
Distributed Graph Databases and the Emerging Web of Data
An Overview of Data Management Paradigms: Relational, Document, and Graph

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Spectral efficient network and resource selection model in 5G networks
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Weekly Chronicles - August'25 Week I
sap open course for s4hana steps from ECC to s4
Spectral efficient network and resource selection model in 5G networks
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Quantum Processes in Graph Computing