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

Quantum Processes in Graph Computing

  • 1.
    Quantum Processes inGraph 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
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
    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.
  • 17.
    Gremlin Sacks (a datastructure 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!
  • 18.
    1.0 0.0 -1.0 1.0 Don't worry aboutthe algorithm, just watch the visualization for now.
  • 19.
    -0.5 0.5 0.0 -1.0 1.0 Don't worryabout the algorithm, just watch the visualization for now.
  • 20.
    -0.5 0.250.25 0.0 -1.0 1.0 Don't worryabout the algorithm, just watch the visualization for now.
  • 21.
    -0.125 0.125-0.3750.375 0.0 -1.0 1.0 Don't worryabout the algorithm, just watch the visualization for now.
  • 22.
    0.375-0.3125 -0.3125 0.0 -1.0 1.0 Don't worryabout the algorithm, just watch the visualization for now.
  • 23.
    0.15625 -0.156250.34375-0.34375 0.0 -1.0 1.0 Don't worryabout the algorithm, just watch the visualization for now.
  • 24.
    1 2 304 5 6 The graph.
  • 25.
    1 2 304 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.
  • 26.
    1 2 304 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.
  • 27.
    1 2 304 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.
  • 28.
    Energy waves reverberateand 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')
  • 29.
    1 2 304 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.
  • 30.
    1 2 304 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
  • 31.
    1 2 304 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')
  • 32.
    1 2 304 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
  • 33.
    A wave isa 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.
  • 34.
    Part 2 Quantum Mechanics viathe Copenhagen Interpretation
  • 35.
  • 36.
  • 37.
    1 2 3 0 4 5 gremlin>g.V(0) ==>v[0]
  • 38.
    1 2 3 0 4 5 gremlin>g.V(0).out() ==>v[1]
  • 39.
    1 2 3 0 4 5 gremlin>g.V(0).out().out() ==>?? ? ? "Two outgoing adjacent vertices, what should I do?"
  • 40.
    1 2 3 0 4 5 gremlin>g.V(0).out().out() ==>v[2] ==>v[3]
  • 41.
    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)."
  • 42.
    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."
  • 43.
    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."
  • 44.
    1 2 3 0 4 5 Whatdoes a physical particle do when it is faced with a choice? ? ?
  • 45.
    1 2 3 0 4 5 Theparticle takes both options! The indivisible "particle" divides!
  • 46.
    1 2 3 0 4 5 Twoparticles 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"
  • 47.
    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
  • 48.
    Part 3 The QuantumWave Function
  • 49.
    Classical Particle (A singleunique "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)
  • 50.
    Classical Particle (A singleunique "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
  • 51.
    48 49 504751 52 53 A 101 vertex line graph with the center being vertex 50. Space
  • 52.
    Classical Initial Step Theparticle 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."
  • 53.
    0.00.20.40.60.81.0 vertices probability 0 4 812 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
  • 54.
    Coin Step 48 495047 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!
  • 55.
    Coin Step 48 495047 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.
  • 56.
    Coin Step 48 495047 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
  • 57.
    Coin Step 48 495047 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
  • 58.
    Coin Step 48 495047 51 52 53 1 √ 2 , 1 √ 2
  • 59.
    The "particle" spinningleft 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
  • 60.
    48 49 504751 52 53 1 √ 2 , 0 0, 1 √ 2 Shift Step
  • 61.
    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
  • 62.
    0.00.10.20.30.40.5 vertices probability 0 4 812 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
  • 63.
    48 49 504751 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
  • 64.
    48 49 504751 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
  • 65.
    48 49 504751 52 53 Shift Step 1 2 , 1 2 0, − 1 2 1 2 , 0 Constructive Interference
  • 66.
    0.00.10.20.30.40.5 vertices probability 0 4 812 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
  • 67.
    48 49 504751 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
  • 68.
    48 49 504751 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
  • 69.
    Wave Function toProbability 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
  • 70.
    0.00.10.20.30.40.50.6 vertices probability 0 4 812 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
  • 71.
    0.00.10.20.30.40.5 vertices probability 0 4 812 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
  • 72.
    0.00.10.20.30.4 vertices probability 0 4 812 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
  • 73.
    0.000.050.100.150.200.250.30 vertices probability 0 4 812 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
  • 74.
    0.00.10.20.30.4 vertices probability 0 4 812 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
  • 75.
    0.00.10.20.30.4 vertices probability 0 4 812 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
  • 76.
    0.00.10.20.30.4 vertices probability 0 4 812 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
  • 77.
    0.00.10.20.30.4 vertices probability 0 4 812 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
  • 78.
    0.000.050.100.150.200.250.30 vertices probability 0 4 812 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
  • 79.
    0.000.050.100.150.200.25 vertices probability 0 4 812 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
  • 80.
    0.000.050.100.150.200.250.30 vertices probability 0 4 812 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
  • 81.
    0.00.10.20.3 vertices probability 0 4 812 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
  • 82.
    Fast forward toiteration 50.
  • 83.
    0.000.050.100.15 vertices probability 0 4 812 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
  • 84.
    0.000.050.100.15 vertices probability 0 4 812 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
  • 85.
    0.000.050.100.15 vertices probability 0 4 812 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
  • 86.
    Classical Particle 13 141512 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
  • 87.
    0.000.050.100.15 vertices probability 0 4 812 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.
  • 88.
    0.000.050.100.15 vertices probability 0 4 812 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.
  • 89.
  • 90.
    48 49 504751 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]] }
  • 91.
    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
  • 92.
    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
  • 93.
  • 94.
    0.000.050.100.15 vertices probability 0 4 812 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
  • 95.
  • 96.
  • 97.
    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
  • 98.
    The probability ofseeing 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
  • 99.
    Part 4 The DoubleSlit Experiment
  • 100.
    Thomas Young (1773-1829) Question "Islight a wave or a particle?" continuous light source double-slit screen photoelectric film