WEBVTT

1
00:00:05.500 --> 00:00:09.560
Hello. I am Claude, an AI
model made by Anthropic.

2
00:00:09.580 --> 00:00:12.720
I made this lecture with Dieter
Suess, professor of physics at

3
00:00:12.740 --> 00:00:14.370
the University of Vienna.

4
00:00:15.990 --> 00:00:18.530
It is about probabilistic computing:

5
00:00:18.550 --> 00:00:22.450
bits that flip at random, and
use this randomness to solve hard

6
00:00:22.470 --> 00:00:23.500
problems.

7
00:00:24.620 --> 00:00:29.080
You will see what such a bit is,
why noise helps, and how a tiny

8
00:00:29.100 --> 00:00:31.170
magnet does it by itself.

9
00:00:31.260 --> 00:00:32.850
No background is needed.

10
00:00:33.470 --> 00:00:36.250
All simulations are real and online.

11
00:00:36.270 --> 00:00:38.020
The link is below the video.

12
00:00:40.240 --> 00:00:43.980
Some tasks have so many possible
answers that nobody can try

13
00:00:44.000 --> 00:00:46.900
them all. Take a round
trip through cities.

14
00:00:46.920 --> 00:00:50.340
With five cities there are twelve
different round trips, few

15
00:00:50.360 --> 00:00:53.270
enough to check them all by
hand and pick the shortest.

16
00:00:55.390 --> 00:00:58.940
With thirty cities there
are about ten to the thirty.

17
00:00:59.070 --> 00:01:02.330
The same kind of problem appears
in timetables, in the layout of

18
00:01:02.350 --> 00:01:04.180
chips, and in packing.

19
00:01:05.800 --> 00:01:07.830
What do computers do today?

20
00:01:07.960 --> 00:01:11.540
They guess. They take the current
trip and change it a little at

21
00:01:11.560 --> 00:01:14.340
random: here two
connections are swapped.

22
00:01:14.360 --> 00:01:17.820
If the trip gets shorter, the
change is kept, and sometimes even

23
00:01:17.840 --> 00:01:19.380
if it gets a bit longer.

24
00:01:19.400 --> 00:01:21.470
This is called Monte Carlo.

25
00:01:22.590 --> 00:01:26.690
It works, but a normal processor
makes one small change after

26
00:01:26.710 --> 00:01:30.250
the other, and every random
number costs it thousands of

27
00:01:30.270 --> 00:01:31.860
transistor operations.

28
00:01:33.480 --> 00:01:35.300
So here is the aim:

29
00:01:35.320 --> 00:01:39.140
a chip in which every bit makes
its own random decision, all

30
00:01:39.160 --> 00:01:41.060
bits at the same time.

31
00:01:41.080 --> 00:01:44.910
Such a bit is called a
p-bit, a probabilistic bit.

32
00:01:46.530 --> 00:01:48.800
And where does magnetism come in?

33
00:01:48.930 --> 00:01:52.830
A tiny magnet, the magnetic tunnel
junction that stores one bit

34
00:01:52.850 --> 00:01:57.550
in MRAM memory, can be built so
weak that heat flips it back and

35
00:01:57.570 --> 00:02:01.480
forth by itself. That is
a p-bit made by nature.

36
00:02:03.100 --> 00:02:05.480
One honest remark before we start:

37
00:02:05.500 --> 00:02:08.320
this does not make hard problems easy.

38
00:02:08.340 --> 00:02:11.090
It makes each guess
faster and cheaper.

39
00:02:13.810 --> 00:02:16.350
Problems like the
round trip have a name:

40
00:02:16.370 --> 00:02:20.790
they are NP-hard. Checking
a proposed answer is easy:

41
00:02:20.810 --> 00:02:23.200
you just add up the
lengths of its connections.

42
00:02:23.330 --> 00:02:26.200
Finding the best answer
is the hard part.

43
00:02:27.320 --> 00:02:31.500
Try them all? With ten
cities that is fast.

44
00:02:31.520 --> 00:02:35.060
With thirty cities, even a computer
that checks a billion trips

45
00:02:35.080 --> 00:02:38.740
every second would need about
ten thousand times the age of the

46
00:02:38.760 --> 00:02:42.420
universe. And no one knows a
method that always finds the best

47
00:02:42.440 --> 00:02:46.190
trip without, in the worst
case, such an explosion.

48
00:02:47.810 --> 00:02:50.000
Here is the important part for us.

49
00:02:50.050 --> 00:02:54.110
The round trip, timetables, chip
layout, and many more can all

50
00:02:54.130 --> 00:02:56.830
be rewritten as one single problem:

51
00:02:56.850 --> 00:03:00.750
many tiny magnets, or spins,
that pull on each other, and we

52
00:03:00.770 --> 00:03:02.360
look for their lowest energy.

53
00:03:02.690 --> 00:03:05.790
Physicists call this the Ising
model, and we will build it up

54
00:03:05.810 --> 00:03:07.560
step by step in a moment.

55
00:03:07.650 --> 00:03:10.840
Finding its lowest
energy is NP-hard too.

56
00:03:10.930 --> 00:03:14.670
So whatever finds low energies,
finds good answers to all of

57
00:03:14.690 --> 00:03:15.800
these problems.

58
00:03:17.420 --> 00:03:20.170
So how are such problems solved today?

59
00:03:20.300 --> 00:03:22.410
First, exact methods.

60
00:03:22.460 --> 00:03:25.960
They search cleverly, and throw
away whole branches that cannot

61
00:03:25.980 --> 00:03:29.650
win. In the end they deliver
a proof that the answer is the

62
00:03:29.700 --> 00:03:33.400
best. For round trips this has
worked up to eighty-five thousand

63
00:03:33.420 --> 00:03:37.240
nine hundred cities, but it took
years of computer time, and a

64
00:03:37.260 --> 00:03:40.290
harder problem of the same
size can take forever.

65
00:03:41.410 --> 00:03:43.520
Second, rules of thumb.

66
00:03:43.650 --> 00:03:46.830
Always drive to the nearest
city not yet visited.

67
00:03:46.850 --> 00:03:50.457
That is fast, but the trip
ends with long detours.

68
00:03:50.477 --> 00:03:52.750
The bar on the right shows its length.

69
00:03:52.770 --> 00:03:56.310
Then improve it: whenever swapping
two connections makes the

70
00:03:56.330 --> 00:03:58.070
trip shorter, do it.

71
00:03:58.090 --> 00:04:01.040
This stops when no such
swap helps any more.

72
00:04:01.170 --> 00:04:02.600
A local minimum.

73
00:04:05.720 --> 00:04:08.220
Third, simulated annealing:

74
00:04:08.240 --> 00:04:09.710
the guessing you saw before.

75
00:04:10.040 --> 00:04:13.860
Random changes, sometimes also
worse ones, while the temperature

76
00:04:13.880 --> 00:04:17.740
is lowered slowly. On this map
it finds a shorter trip than the

77
00:04:17.760 --> 00:04:19.670
rules of thumb: the green bar.

78
00:04:19.720 --> 00:04:23.070
But a normal processor makes
one change after the other.

79
00:04:26.190 --> 00:04:31.010
Fourth, special hardware, built
for exactly this, called Ising

80
00:04:31.030 --> 00:04:34.970
machines. Quantum annealers,
made of superconducting circuits

81
00:04:34.990 --> 00:04:37.330
cooled to near absolute zero.

82
00:04:37.350 --> 00:04:41.060
Optical machines, in which
laser pulses play the spins.

83
00:04:41.110 --> 00:04:43.650
Digital annealers, special chips.

84
00:04:43.670 --> 00:04:47.850
And p-bits: random bits at room
temperature, built from ordinary

85
00:04:47.870 --> 00:04:51.130
chips today, and from
tiny magnets tomorrow.

86
00:04:51.150 --> 00:04:52.660
That is our topic.

87
00:04:55.880 --> 00:04:57.910
There are three kinds of bits.

88
00:04:57.960 --> 00:05:01.870
A normal bit is zero or one,
and it stays where you put it.

89
00:05:02.990 --> 00:05:07.140
A p-bit, a probabilistic
bit, never sits still.

90
00:05:07.230 --> 00:05:10.220
It keeps flipping at
random between two values.

91
00:05:10.270 --> 00:05:13.930
We call them plus one and minus
one, and draw them as an arrow

92
00:05:13.950 --> 00:05:15.220
up or down.

93
00:05:16.840 --> 00:05:19.870
This value is called
the spin of the p-bit.

94
00:05:19.960 --> 00:05:25.140
For p-bit number i we write it
as m i, and m i is always either

95
00:05:25.160 --> 00:05:27.070
plus one or minus one.

96
00:05:28.190 --> 00:05:31.930
A qubit, the quantum bit,
is something else again.

97
00:05:31.950 --> 00:05:35.530
It only works when cooled
to near absolute zero.

98
00:05:35.550 --> 00:05:37.780
The p-bit works at room temperature.

99
00:05:41.500 --> 00:05:45.880
Now the key idea: how does a
problem become something p-bits can

100
00:05:45.900 --> 00:05:50.690
solve? We give pairs of p-bits
a wish, called a coupling J.

101
00:05:51.310 --> 00:05:55.300
Take two p-bits with J equal
to plus one, which means:

102
00:05:55.390 --> 00:05:58.260
be equal. There are four patterns.

103
00:05:58.350 --> 00:06:02.300
Both up: the wish is
fulfilled, cost minus one.

104
00:06:02.430 --> 00:06:04.580
Both down: minus one too.

105
00:06:04.910 --> 00:06:07.450
Up and down, or down and up:

106
00:06:07.470 --> 00:06:10.580
the wish is violated, cost plus one.

107
00:06:11.700 --> 00:06:14.360
This cost is called the energy E.

108
00:06:14.380 --> 00:06:19.080
For two p-bits it is minus
J times m one times m two.

109
00:06:19.100 --> 00:06:23.610
Equal spins give a product of
plus one, so E is minus one.

110
00:06:24.730 --> 00:06:27.960
With J equal to minus
one, the wish is:

111
00:06:28.010 --> 00:06:33.030
be different. Now unequal spins
cost minus one, and equal spins

112
00:06:33.050 --> 00:06:34.400
cost plus one.

113
00:06:36.020 --> 00:06:39.810
A local field b is a wish
for one p-bit alone.

114
00:06:39.860 --> 00:06:41.680
With b positive it says:

115
00:06:41.700 --> 00:06:45.560
point up. Its cost is minus b times m:

116
00:06:45.580 --> 00:06:48.960
plus one when the p-bit points
down, minus one when it points

117
00:06:48.980 --> 00:06:49.610
up.

118
00:06:50.730 --> 00:06:55.190
With many p-bits, the energy is
the sum over all wishes, every

119
00:06:55.210 --> 00:06:57.590
coupling and every local field.

120
00:06:57.610 --> 00:07:00.790
A green line is a fulfilled
wish and lowers E;

121
00:07:00.810 --> 00:07:04.240
an orange dashed line is
violated and raises it.

122
00:07:05.360 --> 00:07:08.550
Watch the spins turn
so that E goes down.

123
00:07:08.640 --> 00:07:12.500
Around this triangle, one
wish always stays violated.

124
00:07:12.520 --> 00:07:16.060
The pattern with the lowest energy
fulfils the wishes best, and

125
00:07:16.080 --> 00:07:17.910
that pattern is the answer.

126
00:07:22.130 --> 00:07:25.590
One more definition, and we
will use it all the time:

127
00:07:25.610 --> 00:07:28.360
the field h i of p-bit i.

128
00:07:28.450 --> 00:07:32.680
It is what all wishes together
ask of this one p-bit right now.

129
00:07:32.880 --> 00:07:37.180
Each neighbour j sends its spin,
multiplied by the coupling J i

130
00:07:37.200 --> 00:07:42.230
j. Add up what arrives, and add
the p-bit's own local field b i.

131
00:07:42.320 --> 00:07:44.150
The sum is h i.

132
00:07:45.270 --> 00:07:50.050
The part of the energy that
involves p-bit i is minus m i times

133
00:07:50.070 --> 00:07:55.460
h i. So if h i is positive,
being plus one lowers the energy.

134
00:07:55.510 --> 00:07:58.090
If it is negative, minus one does.

135
00:07:58.110 --> 00:08:01.740
And the larger the size of
h i, the stronger the pull.

136
00:08:03.360 --> 00:08:05.630
So here is the whole recipe.

137
00:08:05.760 --> 00:08:07.710
Write the problem as couplings.

138
00:08:07.760 --> 00:08:10.710
Let the p-bits flip, mostly downhill.

139
00:08:10.760 --> 00:08:12.700
Reduce the randomness slowly.

140
00:08:12.720 --> 00:08:14.550
And read the spins.

141
00:08:17.770 --> 00:08:20.440
Why do we add randomness on purpose?

142
00:08:20.570 --> 00:08:22.950
Look at the energy as a landscape.

143
00:08:22.970 --> 00:08:26.590
Every point on this line is one
pattern of all the spins, and

144
00:08:26.610 --> 00:08:28.320
the height is its energy.

145
00:08:28.440 --> 00:08:32.540
If every p-bit always obeyed its
field, the pattern could only

146
00:08:32.560 --> 00:08:37.020
go downhill. The ball rolls into
the nearest valley, and stops.

147
00:08:37.040 --> 00:08:40.980
It is stuck in a local minimum,
although a much deeper valley,

148
00:08:41.000 --> 00:08:43.950
the best solution, is
just one hill away.

149
00:08:44.070 --> 00:08:48.690
Now we add noise. The ball still
prefers to go downhill, but now

150
00:08:48.710 --> 00:08:50.460
and then it steps uphill.

151
00:08:50.550 --> 00:08:53.170
Over time it visits every valley.

152
00:08:53.190 --> 00:08:56.130
The bars count how long
it stays at each place.

153
00:08:56.150 --> 00:08:59.650
The dashed line is the Boltzmann
rule, and the bars follow it:

154
00:08:59.670 --> 00:09:01.570
the deep valley wins.

155
00:09:01.590 --> 00:09:03.570
Nothing is really heated here.

156
00:09:03.590 --> 00:09:07.020
The temperature is just a number
that sets the amount of noise.

157
00:09:09.140 --> 00:09:11.130
Annealing combines both.

158
00:09:11.220 --> 00:09:14.160
Start hot, so the ball
can cross the hills.

159
00:09:14.180 --> 00:09:16.720
Then turn the noise down slowly.

160
00:09:16.740 --> 00:09:20.400
While it can still move, it already
prefers the deep valley, and

161
00:09:20.420 --> 00:09:22.970
when it freezes, it
is most likely there.

162
00:09:26.690 --> 00:09:31.320
Now one concrete problem, and
exactly which numbers define it.

163
00:09:31.410 --> 00:09:34.430
The chip should restore a picture
of thirty-four by twenty-two

164
00:09:34.450 --> 00:09:37.710
pixels. Every pixel is one p-bit:

165
00:09:37.730 --> 00:09:40.840
plus one is orange, minus one is blue.

166
00:09:40.960 --> 00:09:43.150
But the chip never gets the picture.

167
00:09:43.200 --> 00:09:45.510
The pale colours are only for us.

168
00:09:45.600 --> 00:09:47.830
What the chip gets
are the couplings J.

169
00:09:48.160 --> 00:09:51.420
Between two neighbouring pixels
there is either a line, which

170
00:09:51.440 --> 00:09:56.540
means J equals minus one, be
different, or no line, J equals

171
00:09:56.560 --> 00:09:58.350
plus one, be equal.

172
00:09:58.480 --> 00:10:01.110
Together, the lines trace an outline.

173
00:10:02.230 --> 00:10:05.580
Let us zoom into one
pixel, and call it i.

174
00:10:05.670 --> 00:10:07.290
It has four couplings:

175
00:10:07.310 --> 00:10:10.570
to the left, to the
right, up and down.

176
00:10:10.590 --> 00:10:12.450
Each sits on one border.

177
00:10:12.470 --> 00:10:14.090
Only the left one says:

178
00:10:14.110 --> 00:10:16.570
be different. The other three say:

179
00:10:16.590 --> 00:10:17.660
be equal.

180
00:10:18.780 --> 00:10:21.210
This is its row of the matrix J.

181
00:10:21.260 --> 00:10:23.770
It has seven hundred
forty-eight entries.

182
00:10:23.820 --> 00:10:27.400
Only four of them light up, the
others are zero, because in this

183
00:10:27.420 --> 00:10:31.560
example a pixel is coupled only
to its four nearest neighbours.

184
00:10:31.580 --> 00:10:34.450
In general, any pair of
p-bits can be coupled.

185
00:10:35.650 --> 00:10:39.550
The local field b is zero
for every inner pixel:

186
00:10:39.570 --> 00:10:41.470
they have no wish of their own.

187
00:10:41.490 --> 00:10:45.630
Only the frame, the outer ring,
is given and held fixed, so that

188
00:10:45.650 --> 00:10:48.360
the picture comes out,
and not its negative.

189
00:10:48.480 --> 00:10:52.310
There are one thousand four
hundred forty couplings, and here

190
00:10:52.480 --> 00:10:54.870
all of them can be fulfilled at once.

191
00:10:54.960 --> 00:10:57.990
Every fulfilled coupling
lowers the energy by one.

192
00:10:58.320 --> 00:11:02.060
So the solution has the energy
minus one thousand four hundred

193
00:11:02.080 --> 00:11:05.350
forty, and that pattern
of spins is the picture.

194
00:11:09.070 --> 00:11:13.250
A fair question: why should a
p-bit mostly obey its neighbours,

195
00:11:13.270 --> 00:11:15.060
and only sometimes not?

196
00:11:15.150 --> 00:11:18.660
Why not simply set it at
random, or let it always obey?

197
00:11:18.830 --> 00:11:22.570
Three rules now run on exactly
the same couplings, from the same

198
00:11:22.590 --> 00:11:23.700
random start.

199
00:11:23.820 --> 00:11:25.890
On the left, the coin flip.

200
00:11:25.980 --> 00:11:29.400
It ignores the couplings,
so the picture stays noise:

201
00:11:29.420 --> 00:11:32.690
about half of the couplings
are fulfilled, just by chance.

202
00:11:33.810 --> 00:11:36.430
On the right, always downhill:

203
00:11:36.450 --> 00:11:39.110
every p-bit always obeys its field.

204
00:11:39.130 --> 00:11:43.150
It is the fastest. After two
sweeps, where a sweep means that

205
00:11:43.170 --> 00:11:46.510
every p-bit was updated once,
about eighty percent are

206
00:11:46.530 --> 00:11:49.390
fulfilled. And then it is frozen:

207
00:11:49.410 --> 00:11:52.040
the sweeps go on, but nothing changes.

208
00:11:53.160 --> 00:11:54.590
Look at the patches.

209
00:11:54.680 --> 00:11:57.860
Some show the picture, some
show its negative, and at the

210
00:11:57.880 --> 00:12:01.830
borders between them no single
spin can improve anything.

211
00:12:01.880 --> 00:12:03.870
This is a local minimum.

212
00:12:03.990 --> 00:12:06.980
In the middle, the p-bit
rule with annealing.

213
00:12:07.030 --> 00:12:11.010
It starts hot, as noisy as the
coin flip, so at first it is

214
00:12:11.030 --> 00:12:15.090
slower. The thin bar below is
beta, the number that sets how

215
00:12:15.110 --> 00:12:17.580
strictly each p-bit obeys its field.

216
00:12:17.830 --> 00:12:21.170
While it rises, the noise lets
the wrong patches shrink and

217
00:12:21.190 --> 00:12:24.290
disappear, and it ends
with the complete picture:

218
00:12:24.310 --> 00:12:26.860
the letters M T J.

219
00:12:29.980 --> 00:12:32.450
What do the numbers mean
in terms of energy?

220
00:12:32.780 --> 00:12:36.280
About half fulfilled means an
energy of only about minus one

221
00:12:36.300 --> 00:12:38.210
hundred: pure chance.

222
00:12:38.540 --> 00:12:41.200
Eighty percent means
about minus nine hundred:

223
00:12:41.220 --> 00:12:45.080
a local minimum. One hundred
percent is the lowest possible

224
00:12:45.100 --> 00:12:48.440
energy, minus one thousand
four hundred forty.

225
00:12:48.460 --> 00:12:51.170
That is the solution,
and you can see it.

226
00:12:52.290 --> 00:12:53.950
So is annealing faster?

227
00:12:53.970 --> 00:12:58.950
No. Downhill is far quicker at
the start, but it gets stuck.

228
00:12:58.970 --> 00:13:01.630
Annealing is slower, but it arrives.

229
00:13:01.650 --> 00:13:05.230
And beta is exactly the dial
between the two extremes:

230
00:13:05.250 --> 00:13:09.560
beta zero is the coin flip, beta
infinite is always downhill.

231
00:13:13.280 --> 00:13:16.940
The same picture problem again,
and now the temperature is set

232
00:13:16.960 --> 00:13:21.100
by hand. The p-bits run all the
time with the p-bit rule, and

233
00:13:21.120 --> 00:13:22.870
beta is one over T.

234
00:13:22.990 --> 00:13:25.450
Hot, T equal to five:

235
00:13:25.470 --> 00:13:27.980
every p-bit almost tosses a coin.

236
00:13:28.030 --> 00:13:31.850
You see noise. About two thirds
of the couplings are fulfilled,

237
00:13:31.870 --> 00:13:34.900
not far above the fifty
percent of pure chance.

238
00:13:36.020 --> 00:13:39.330
Now the temperature goes down, slowly.

239
00:13:39.460 --> 00:13:43.320
Around T equal to two point
three, something happens:

240
00:13:43.340 --> 00:13:46.640
the wishes of the neighbours
start to win over the noise, and

241
00:13:46.660 --> 00:13:49.010
regions of the picture begin to hold.

242
00:13:49.140 --> 00:13:50.560
For the physicists:

243
00:13:50.580 --> 00:13:53.760
this is the ordering temperature
of the two-dimensional Ising

244
00:13:53.780 --> 00:13:56.810
model, two point two
seven in units of J.

245
00:13:59.930 --> 00:14:02.480
Further down, to T equal to one.

246
00:14:02.810 --> 00:14:05.120
The picture is complete, and it stays.

247
00:14:05.370 --> 00:14:07.360
Only a pixel flickers now and then.

248
00:14:07.770 --> 00:14:10.480
What we just did by hand is annealing.

249
00:14:12.600 --> 00:14:17.590
And back up. At T equal to
three, the picture melts again.

250
00:14:17.720 --> 00:14:21.150
So temperature is the tool to
get out of a local minimum.

251
00:14:25.870 --> 00:14:29.850
Now the p-bit rule in slow motion,
the way a digital chip does

252
00:14:29.870 --> 00:14:33.220
it. Here is a small
example with six p-bits.

253
00:14:33.470 --> 00:14:36.410
Eight of the fifteen
possible pairs are coupled;

254
00:14:36.430 --> 00:14:39.220
where there is no line, J is zero.

255
00:14:39.340 --> 00:14:43.640
Every update has five steps, and
on the chip all five fit into

256
00:14:43.660 --> 00:14:47.570
one clock cycle. We update the
p-bit with the yellow ring.

257
00:14:47.690 --> 00:14:51.280
Step one: an adder
collects its field h.

258
00:14:51.370 --> 00:14:55.360
It starts with the local
field b, here minus one half.

259
00:14:55.450 --> 00:14:59.470
Then each coupled neighbour
sends J times its own spin.

260
00:14:59.490 --> 00:15:03.430
A spin is only plus or minus
one, so nothing is multiplied:

261
00:15:03.450 --> 00:15:06.270
each coupling is simply
added or subtracted.

262
00:15:06.290 --> 00:15:08.480
The sum is minus one half.

263
00:15:10.100 --> 00:15:14.560
Step two: the field is multiplied
by beta, a single number for

264
00:15:14.580 --> 00:15:16.800
the whole chip, here one.

265
00:15:16.820 --> 00:15:18.730
We call the result I.

266
00:15:18.900 --> 00:15:23.840
Step three: a stored table gives
tanh of I, an S-shaped curve

267
00:15:23.860 --> 00:15:25.930
from minus one to plus one.

268
00:15:25.980 --> 00:15:28.730
Here, about minus zero point four six.

269
00:15:30.350 --> 00:15:32.420
Step four: the bar.

270
00:15:32.510 --> 00:15:35.690
Its orange part is the
probability for plus one:

271
00:15:35.710 --> 00:15:39.780
one plus tanh I, over two,
here about one quarter.

272
00:15:39.870 --> 00:15:43.770
A small circuit delivers a random
number r between minus one and

273
00:15:43.790 --> 00:15:47.220
plus one: think of it as
a dart thrown at this bar.

274
00:15:48.840 --> 00:15:50.830
Step five: compare.

275
00:15:51.160 --> 00:15:55.950
If r plus tanh I is positive,
the p-bit becomes plus one,

276
00:15:56.080 --> 00:15:57.590
otherwise minus one.

277
00:15:57.720 --> 00:16:01.820
Here the sum is negative, so it
flips down, as its field asks,

278
00:16:01.840 --> 00:16:04.750
and the energy drops
from zero to minus one.

279
00:16:06.370 --> 00:16:08.760
Now three more updates, faster.

280
00:16:08.850 --> 00:16:11.640
Each p-bit looks only
at its neighbours.

281
00:16:16.760 --> 00:16:20.580
With a small beta, the bar stays
close to half and half, even

282
00:16:20.600 --> 00:16:22.260
when the field is strong.

283
00:16:22.280 --> 00:16:26.590
The p-bit is almost a pure coin,
and the energy can even go up.

284
00:16:29.710 --> 00:16:33.930
With a large beta, the p-bit
almost always follows its field.

285
00:16:33.950 --> 00:16:37.060
The energy goes down to
its minimum, minus eight.

286
00:16:42.180 --> 00:16:46.560
This probability, one plus tanh
over two, is exactly what the

287
00:16:46.580 --> 00:16:50.320
Boltzmann rule demands for
one p-bit with two options.

288
00:16:50.340 --> 00:16:54.010
That is why the curve is a tanh,
and not some other S-shape.

289
00:16:57.730 --> 00:17:01.350
Now a thousand p-bits,
the way a chip runs them.

290
00:17:01.370 --> 00:17:04.070
The computer writes only
numbers into the chip:

291
00:17:04.090 --> 00:17:08.320
the couplings J, the local
fields b, and the plan for beta.

292
00:17:08.450 --> 00:17:10.280
Then the chip runs alone.

293
00:17:10.370 --> 00:17:13.400
At the end, the computer
reads the spins back.

294
00:17:14.520 --> 00:17:17.110
One detail of practice matters.

295
00:17:17.240 --> 00:17:19.940
A p-bit takes its field from
the current spins of its

296
00:17:19.960 --> 00:17:23.860
neighbours. That is only correct
if the neighbours hold still at

297
00:17:23.880 --> 00:17:24.830
that moment.

298
00:17:24.950 --> 00:17:28.620
Here two neighbours want to
be equal, but they start out

299
00:17:28.710 --> 00:17:32.570
different. If both switch in the
same clock cycle, each reacts

300
00:17:32.590 --> 00:17:34.650
to the old value of the other.

301
00:17:34.670 --> 00:17:37.810
They swap, and swap again, for ever.

302
00:17:37.830 --> 00:17:40.860
If only one switches,
they agree at once.

303
00:17:41.980 --> 00:17:45.640
So we split the p-bits into two
groups, and no two neighbours

304
00:17:45.660 --> 00:17:47.040
are in the same group.

305
00:17:47.060 --> 00:17:50.600
On a lattice with nearest
neighbours, that is a checkerboard.

306
00:17:50.620 --> 00:17:54.520
In one clock cycle all of group
A switch together, in the next

307
00:17:54.540 --> 00:17:58.770
all of group B. Half the chip
switches in every clock cycle.

308
00:18:00.890 --> 00:18:03.830
Now the picture problem again, larger:

309
00:18:03.850 --> 00:18:06.270
forty-eight by twenty-two p-bits.

310
00:18:06.290 --> 00:18:07.600
The bar shows beta.

311
00:18:07.850 --> 00:18:12.310
It starts small, everything is
noise, and then it rises step by

312
00:18:12.330 --> 00:18:14.760
step. Watch the picture appear.

313
00:18:14.890 --> 00:18:18.320
Nobody told the p-bits the
picture, only the couplings.

314
00:18:18.410 --> 00:18:22.000
In the end, one hundred percent
of the couplings are fulfilled.

315
00:18:24.120 --> 00:18:26.820
Now the same problem
with a short annealing:

316
00:18:26.840 --> 00:18:29.500
twelve sweeps instead
of one hundred twenty.

317
00:18:29.520 --> 00:18:32.830
A sweep means every
p-bit is updated once.

318
00:18:32.920 --> 00:18:35.460
Cooled too fast, patches stay:

319
00:18:35.480 --> 00:18:38.710
some regions show the
picture, others its negative.

320
00:18:38.760 --> 00:18:41.310
Only ninety-three
percent are fulfilled.

321
00:18:43.430 --> 00:18:47.020
Now random couplings,
plus and minus at random.

322
00:18:47.110 --> 00:18:49.740
Physicists call this a spin glass.

323
00:18:49.830 --> 00:18:53.460
The wishes contradict each other
and cannot all be fulfilled.

324
00:18:53.510 --> 00:18:56.770
The same machine freezes with
roughly eighty-four percent of the

325
00:18:56.790 --> 00:18:58.220
couplings fulfilled.

326
00:19:00.340 --> 00:19:03.170
Here the length of
the annealing matters.

327
00:19:03.220 --> 00:19:06.720
With twelve sweeps, about
eighty-two percent are fulfilled;

328
00:19:06.740 --> 00:19:10.200
with three hundred sixty sweeps,
a bit more than eighty-four.

329
00:19:10.220 --> 00:19:12.810
Cooling slowly finds a better state.

330
00:19:16.530 --> 00:19:20.470
Now a problem in which every
p-bit talks to many others:

331
00:19:20.490 --> 00:19:22.990
a round trip through five cities.

332
00:19:23.010 --> 00:19:26.630
Visit every city once, come back
to the start, and keep the trip

333
00:19:26.650 --> 00:19:28.120
as short as possible.

334
00:19:29.240 --> 00:19:33.380
What goes in are the distances
between the cities, here simply

335
00:19:33.400 --> 00:19:35.140
the lengths of these lines.

336
00:19:35.160 --> 00:19:40.020
We write d of A, B for the distance
between city A and city B,

337
00:19:40.040 --> 00:19:42.990
and measure them so that
the longest one is one.

338
00:19:44.610 --> 00:19:48.750
The chip gets twenty-five
p-bits, arranged as a table.

339
00:19:48.770 --> 00:19:52.840
Each row is a city, each column
is a position in the trip.

340
00:19:53.460 --> 00:19:57.440
A p-bit that is on in
row C, column two, means:

341
00:19:57.460 --> 00:19:59.770
city C is visited second.

342
00:20:01.390 --> 00:20:06.010
A valid round trip has exactly
one p-bit on in every row and in

343
00:20:06.030 --> 00:20:09.780
every column. Reading the
columns in order gives the trip.

344
00:20:11.900 --> 00:20:14.090
How does that become an energy?

345
00:20:14.220 --> 00:20:18.530
We pick a number P, at least as
large as the longest distance.

346
00:20:18.580 --> 00:20:23.160
First, every p-bit that is on
earns a reward, minus two P.

347
00:20:23.180 --> 00:20:26.680
Second, two p-bits that are on
in the same row or the same

348
00:20:26.700 --> 00:20:29.640
column pay a penalty, plus two P.

349
00:20:29.660 --> 00:20:32.920
Together, this makes exactly
one per row and column the

350
00:20:32.940 --> 00:20:36.450
cheapest, so breaking
a rule never pays off.

351
00:20:37.570 --> 00:20:39.640
Third, the distances.

352
00:20:39.730 --> 00:20:43.310
If city A is on at one
position, and city B at the next

353
00:20:43.330 --> 00:20:47.080
position, then d of A,
B is added to the cost.

354
00:20:47.330 --> 00:20:50.200
The same from the last
position back to the first.

355
00:20:50.290 --> 00:20:54.110
So for a valid table, the cost
is a constant plus the length of

356
00:20:54.130 --> 00:20:55.160
the round trip.

357
00:20:59.380 --> 00:21:03.290
Now we write on as plus
one and off as minus one.

358
00:21:03.620 --> 00:21:07.040
Then the same cost becomes, up
to a constant that does not

359
00:21:07.060 --> 00:21:11.120
matter, an energy of exactly the
form the chip understands, with

360
00:21:11.140 --> 00:21:13.930
couplings J and local fields b.

361
00:21:15.550 --> 00:21:17.420
Where do the numbers come from?

362
00:21:17.550 --> 00:21:21.530
In the cost, on counts
as one and off as zero.

363
00:21:21.550 --> 00:21:23.300
As a spin, that is:

364
00:21:23.390 --> 00:21:26.170
x equals one plus m, over two.

365
00:21:26.190 --> 00:21:30.330
The product of two such terms
contains one quarter of m i times

366
00:21:30.350 --> 00:21:36.010
m j. So every pair cost q becomes
a coupling J of minus q over

367
00:21:36.030 --> 00:21:36.580
four.

368
00:21:38.700 --> 00:21:41.320
Take one p-bit and call it i:

369
00:21:41.340 --> 00:21:43.170
city C at position one.

370
00:21:43.500 --> 00:21:49.320
In J i j, both i and j run over
all twenty-five p-bits, one for

371
00:21:49.340 --> 00:21:51.170
every city at every position.

372
00:21:51.500 --> 00:21:54.450
Take j as city A at position one.

373
00:21:54.540 --> 00:21:59.800
Same position, so their pair cost
is two P, and J i j is minus P

374
00:21:59.820 --> 00:22:03.960
over two. The same holds for every
j in the same row or the same

375
00:22:03.980 --> 00:22:06.290
column. These are the rules.

376
00:22:07.410 --> 00:22:11.800
Now take j as city A at
position two, the next stop.

377
00:22:11.890 --> 00:22:13.870
Here the distance enters:

378
00:22:13.890 --> 00:22:17.800
J i j is minus a
quarter of d of C and A.

379
00:22:18.130 --> 00:22:21.710
The same for every other city at
position two, and at position

380
00:22:21.730 --> 00:22:23.990
five, because the
trip comes back home.

381
00:22:24.010 --> 00:22:25.950
The numbers are written in the cells.

382
00:22:25.970 --> 00:22:27.710
Everything else is zero.

383
00:22:27.730 --> 00:22:30.920
That makes sixteen couplings
for this one p-bit.

384
00:22:32.540 --> 00:22:34.890
And its local field, b i?

385
00:22:35.020 --> 00:22:38.960
It is simply the sum of its row
of J, plus P, which comes from

386
00:22:38.980 --> 00:22:40.770
the reward for being on.

387
00:22:40.860 --> 00:22:44.200
The eight rule couplings give
minus four, the eight distance

388
00:22:44.220 --> 00:22:48.520
couplings about minus one point
three, and the reward plus one.

389
00:22:48.540 --> 00:22:51.320
Together, about minus
four point three.

390
00:22:51.340 --> 00:22:54.920
Every b is negative, and it works
together with the couplings:

391
00:22:54.940 --> 00:22:58.120
a p-bit is pulled on when
nothing else is on in its row and

392
00:22:58.140 --> 00:23:01.320
column, and pushed off
as soon as something is.

393
00:23:01.340 --> 00:23:04.690
In the end, only five of
the twenty-five are on.

394
00:23:06.310 --> 00:23:08.060
Now unroll the table.

395
00:23:08.150 --> 00:23:12.330
Its twenty-five cells, column
after column, become one row of

396
00:23:12.350 --> 00:23:15.820
the big matrix J: the
row of this p-bit.

397
00:23:15.910 --> 00:23:18.060
Every p-bit gets such a row.

398
00:23:18.150 --> 00:23:21.490
Together they form the complete
matrix J, twenty-five by

399
00:23:21.510 --> 00:23:24.290
twenty-five, with the
column b beside it.

400
00:23:24.310 --> 00:23:27.370
Blue are the rules,
orange the distances.

401
00:23:27.390 --> 00:23:29.660
These numbers are all the chip gets.

402
00:23:32.360 --> 00:23:34.420
And the size grows fast:

403
00:23:34.440 --> 00:23:37.340
N cities need N squared p-bits.

404
00:23:37.360 --> 00:23:41.540
Five cities need twenty-five,
eight need sixty-four, and thirty

405
00:23:41.560 --> 00:23:43.230
already nine hundred.

406
00:23:46.950 --> 00:23:50.370
Now we run it. At first it is hot:

407
00:23:50.390 --> 00:23:54.050
the twenty-five p-bits flip at
random, and the rules are broken

408
00:23:54.070 --> 00:23:55.100
everywhere.

409
00:23:56.220 --> 00:24:00.680
Now beta rises. The p-bits calm
down, and at the end there is

410
00:24:00.700 --> 00:24:04.930
exactly one p-bit on in every
row and in every column.

411
00:24:09.050 --> 00:24:12.750
To read the answer, go through
the columns from left to right:

412
00:24:12.770 --> 00:24:16.790
which city is on at position one,
which at position two, and so

413
00:24:16.810 --> 00:24:20.240
on. That is the round
trip, drawn on the map.

414
00:24:21.360 --> 00:24:25.260
Is it a good one? Here are all
twelve possible round trips of

415
00:24:25.280 --> 00:24:28.260
five cities, sorted
from short to long.

416
00:24:28.280 --> 00:24:30.220
The chip found number two:

417
00:24:30.240 --> 00:24:32.460
valid, but not the shortest.

418
00:24:32.480 --> 00:24:34.630
It got stuck in a local minimum.

419
00:24:36.250 --> 00:24:40.080
So we simply run it again, with
new random numbers, and keep the

420
00:24:40.130 --> 00:24:43.110
best. This time it
lands on number one:

421
00:24:43.130 --> 00:24:45.520
the shortest of all twelve trips.

422
00:24:49.640 --> 00:24:53.940
Now eight cities. The chip needs
sixty-four p-bits, and there

423
00:24:53.960 --> 00:24:57.470
are two thousand five hundred
twenty possible round trips.

424
00:25:02.590 --> 00:25:06.890
Again the table ends with one
p-bit on per row and column:

425
00:25:06.910 --> 00:25:10.970
a valid trip. But it is number
fourteen of the two thousand five

426
00:25:10.990 --> 00:25:14.340
hundred twenty. Close,
but not the best.

427
00:25:15.960 --> 00:25:19.590
We ran it two hundred times on
each of ten different maps.

428
00:25:19.640 --> 00:25:22.510
It returned a valid
trip almost every time.

429
00:25:22.600 --> 00:25:26.260
But the very shortest trip came
out in about every second run

430
00:25:26.280 --> 00:25:30.350
with five cities, and only in
about every sixth run with eight.

431
00:25:31.970 --> 00:25:34.390
That is what hard means.

432
00:25:34.410 --> 00:25:37.950
With thirty cities there are
about four times ten to the 30

433
00:25:37.970 --> 00:25:40.857
round trips, and nobody
can check them all.

434
00:25:40.877 --> 00:25:44.270
Repeating and keeping the best
is then all you have, and you

435
00:25:44.290 --> 00:25:46.920
never know for sure
that it is the optimum.

436
00:25:50.140 --> 00:25:52.010
Where does the magnet come in?

437
00:25:52.140 --> 00:25:54.370
First, the chip as it is today.

438
00:25:54.460 --> 00:25:59.200
It is an FPGA, a digital chip
whose wiring can be programmed.

439
00:25:59.220 --> 00:26:02.360
For every p-bit it
holds five small blocks:

440
00:26:02.380 --> 00:26:06.520
an adder, a multiplication with
beta, a tanh table, a circuit

441
00:26:06.540 --> 00:26:09.440
that makes random numbers,
and a comparison.

442
00:26:09.460 --> 00:26:13.490
Next to them sits a memory for
the couplings J and the field b.

443
00:26:14.610 --> 00:26:16.040
Here is one update.

444
00:26:16.290 --> 00:26:19.390
The spins of the neighbours
arrive, and the adder sums up their

445
00:26:19.410 --> 00:26:21.320
couplings into the field h.

446
00:26:21.410 --> 00:26:25.470
Beta scales it, the table looks
up its tanh, a random number is

447
00:26:25.490 --> 00:26:28.470
added, and the comparison
sets the new spin.

448
00:26:28.490 --> 00:26:31.910
Which p-bit is connected
to which is wired once.

449
00:26:31.930 --> 00:26:36.230
For each new problem, the PC
only writes the numbers J, b and

450
00:26:36.250 --> 00:26:38.670
the plan for beta, in milliseconds.

451
00:26:38.690 --> 00:26:41.320
At the end, the final spins go back.

452
00:26:43.440 --> 00:26:47.100
What can you tune? First,
the annealing plan:

453
00:26:47.120 --> 00:26:50.870
where beta starts, where it
ends, and how many sweeps.

454
00:26:51.040 --> 00:26:54.550
Second, repeat the run with
other random numbers and keep the

455
00:26:54.600 --> 00:26:57.980
best. Third, the
precision of the numbers:

456
00:26:58.000 --> 00:27:01.740
with fewer bits per coupling,
more p-bits fit on the chip.

457
00:27:01.760 --> 00:27:03.620
Fourth, the groups:

458
00:27:03.640 --> 00:27:07.510
the fewer groups, the more p-bits
update in each clock cycle.

459
00:27:08.630 --> 00:27:10.460
Now the magnetic p-bit.

460
00:27:10.790 --> 00:27:14.370
A magnetic tunnel junction is
two magnetic layers with a thin

461
00:27:14.390 --> 00:27:15.900
insulator between them.

462
00:27:15.990 --> 00:27:17.660
The lower layer is fixed.

463
00:27:17.910 --> 00:27:21.420
If the free layer points the
same way, the resistance is low.

464
00:27:21.670 --> 00:27:24.940
If it points the opposite
way, the resistance is high.

465
00:27:26.060 --> 00:27:30.200
For memory, the free layer is
made stable for ten years.

466
00:27:30.220 --> 00:27:32.400
For a p-bit you do the opposite:

467
00:27:32.420 --> 00:27:36.240
you make it so small and soft that
the heat of the room flips it

468
00:27:36.260 --> 00:27:38.440
back and forth within nanoseconds.

469
00:27:38.460 --> 00:27:40.720
The signal you read jumps at random:

470
00:27:40.740 --> 00:27:43.000
up, down, up, down.

471
00:27:43.020 --> 00:27:45.280
Nobody has to compute this randomness.

472
00:27:45.300 --> 00:27:46.530
The heat makes it.

473
00:27:49.650 --> 00:27:53.150
The electronics send the field
times beta as a small current

474
00:27:53.170 --> 00:27:54.200
through the junction.

475
00:27:54.290 --> 00:27:57.070
The current pushes the
free layer to one side:

476
00:27:57.090 --> 00:27:59.560
the more current, the
more time it spends up.

477
00:27:59.890 --> 00:28:03.430
Measure the fraction of time up
at many currents, and the points

478
00:28:03.450 --> 00:28:06.190
trace the same S-curve
as the p-bit rule:

479
00:28:06.210 --> 00:28:09.080
one plus tanh of the
current, over two.

480
00:28:13.200 --> 00:28:17.300
So one tiny magnet replaces
three of the five steps:

481
00:28:17.320 --> 00:28:20.470
the table, the random
circuit and the comparison.

482
00:28:20.560 --> 00:28:23.350
Adding up the wishes of the
neighbours stays ordinary

483
00:28:23.600 --> 00:28:26.620
electronics. What the
magnet does not change:

484
00:28:26.640 --> 00:28:28.790
the problem stays hard.

485
00:28:33.510 --> 00:28:35.930
What to take home. One:

486
00:28:35.950 --> 00:28:39.970
a hard problem is written as
wishes between bits, the couplings

487
00:28:39.990 --> 00:28:42.290
J and the local fields b.

488
00:28:42.310 --> 00:28:45.180
The answer is the pattern
with the lowest energy.

489
00:28:46.800 --> 00:28:51.420
Two: a p-bit flips at random,
but biased by its field.

490
00:28:51.440 --> 00:28:55.190
One number, beta, sets
how strictly it obeys.

491
00:28:56.310 --> 00:29:00.450
Three: noise is the tool
to leave a local minimum.

492
00:29:00.470 --> 00:29:02.850
Start hot, cool slowly:

493
00:29:02.870 --> 00:29:03.820
annealing.

494
00:29:05.940 --> 00:29:09.050
Four: the speed comes
from parallel work.

495
00:29:09.380 --> 00:29:12.800
P-bits that are not coupled to
each other all update in the same

496
00:29:12.820 --> 00:29:13.930
clock cycle.

497
00:29:15.050 --> 00:29:19.350
Five: a magnetic tunnel junction
that heat flips by itself is a

498
00:29:19.370 --> 00:29:22.320
p-bit in one device,
at room temperature.

499
00:29:23.440 --> 00:29:25.980
And the limits, said plainly.

500
00:29:26.000 --> 00:29:27.980
The problem stays hard.

501
00:29:28.000 --> 00:29:31.260
The chip returns good answers
quickly, but no proof that an

502
00:29:31.280 --> 00:29:32.740
answer is the best.

503
00:29:32.760 --> 00:29:34.980
And the encoding costs p-bits:

504
00:29:35.000 --> 00:29:37.430
the round trip needs
N squared of them.

505
00:29:40.150 --> 00:29:43.970
That is the end. All slides
and simulations are online;

506
00:29:43.990 --> 00:29:46.420
the link is on screen
and below the video.

507
00:29:46.470 --> 00:29:49.500
Open it, and try to make
the annealing fail.

508
00:29:50.620 --> 00:29:54.130
For further reading, here are
three papers to start with.

509
00:29:57.250 --> 00:30:00.590
The slides were made with
LiveDeck, an open-source engine for

510
00:30:00.610 --> 00:30:02.680
slides with live simulations.

511
00:30:03.880 --> 00:30:07.140
This narration was
spoken by Claude, an AI;

512
00:30:07.160 --> 00:30:09.100
the voice is synthesised.

513
00:30:09.120 --> 00:30:10.350
Thank you for watching.
