1
00:00:03,160 --> 00:00:08,820
 Hello, Bonjour, Sa-wat-dee, Vitayu!

2
00:00:08,820 --> 00:00:14,780
Welcome to the the seventh week of
Statistical Mechanics: Algorithms and Computations

3
00:00:14,780 --> 00:00:18,720
from the Physics Department of Ecole normale supérieure.

4
00:00:19,120 --> 00:00:25,920
This lecture is the third and last one on quantum statistical mechanics,

5
00:00:26,880 --> 00:00:31,920
and the lecture and the entire program of this week

6
00:00:31,980 --> 00:00:43,920
is dedicated to a discussion, and even a celebration of quantum-indiscernability and Bose-Einstein condensation.

7
00:00:44,440 --> 00:00:52,560
As several times already during this course, we push very far our two main approaches

8
00:00:52,840 --> 00:01:00,520
Markov chain Monte-Carlo sampling and direct sampling, here for the ideal Bose gas

9
00:01:00,960 --> 00:01:08,120
A very powerful Markov-chain Monte-Carlo algorithm will arise in the lecture

10
00:01:08,560 --> 00:01:19,220
whereas a direct sampling algorithm and the detailed understanding of permutations will be the subject of this week's tutorial

11
00:01:19,220 --> 00:01:30,020
Of course, whenever there is a direct sampling algorithm, there is an analytic solution just around the corner

12
00:01:30,020 --> 00:01:32,920
and we will obtain it also.

13
00:01:33,820 --> 00:01:43,920
 Finally, in this week's homework session, you will take over yourself the path integral Monte-Carlo program that I present here

14
00:01:43,920 --> 00:01:49,700
and analyze its output at high and low temperature. 

15
00:01:53,400 --> 00:02:00,120
Before starting, let me explain our goals for this week.

16
00:02:00,120 --> 00:02:11,040
Our discussion of Bose-Einstein condensation will result in a short Python program that produces the following output:

17
00:02:11,300 --> 00:02:23,280
you see configurations x, y and z of about 1000 ideal bosons in an harmonic trap at termperature T.

18
00:02:23,880 --> 00:02:35,660
At a well defined temperature, Bosons clump together in the center of the trap: this is Bose-Einstein condensation.

19
00:02:35,980 --> 00:02:50,040
It was first achieved, in experimental harmonic traps just like ours , in 1995, by Cornell and Wieman, and also by Ketterle,

20
00:02:50,040 --> 00:02:58,520
and all 3 were awarded the 2001 Nobel prize in Physics for their achievement.

21
00:02:58,520 --> 00:03:10,500
You will create yourself the Bose-Einstein condensates later in this week, and you will also modify and analyze the program.

22
00:03:10,500 --> 00:03:23,040
 One thing you can do by just changing 2 lines in your program is to turn off the bosonic nature of particles and make them distinguishable.

23
00:03:23,040 --> 00:03:33,700
You can then run your code for the same number of particles, at the same mass and the same temperature, in the same harmonic potential

24
00:03:33,700 --> 00:03:45,400
and you will see that at the temperature at which the bosons condense, nothing happens for the distinguishable particles.

25
00:03:45,400 --> 00:03:54,740
So you see that Bose-Einstein condensation is due to the bosonic nature of particles, as the name indicates.

26
00:03:54,740 --> 00:04:01,120
You can look at your Bose-Einstein condensates just like the atomic physicist

27
00:04:01,120 --> 00:04:05,340
who controls the atomic cloud through lasers.

28
00:04:05,340 --> 00:04:14,680
But attention! don't forget to wear your glasses to protect youself against the powerful laser light!

29
00:04:14,680 --> 00:04:24,780
To follow what we discuss here, you only need to understand what we discussed during the last 2 weeks:

30
00:04:24,780 --> 00:04:31,920
the density matrix, and the Levy quantum path in a harmonic potential.

31
00:04:31,920 --> 00:04:40,560
So, let's get started, with week 7 of Statistical Mechanics: Algorithms and Computations.

32
00:04:44,400 --> 00:04:53,560
Before running a quantum Monte-Carlo simulation for Bosons, we must understand the bosonic density matrix.

33
00:04:53,560 --> 00:04:57,260
Let's go back to a single particle. 

34
00:04:57,660 --> 00:05:03,760
The partition function of a single particle at temperature T

35
00:05:03,760 --> 00:05:13,220
is given by....

36
00:05:13,220 --> 00:05:23,720
or in other words, by the sum of all the paths from x to x, integrated over x.

37
00:05:23,720 --> 00:05:34,220
The partition function Z is a sum over the diagonal density matrix, as you found out for yourself during the last 2 homework sessions,

38
00:05:34,220 --> 00:05:41,540
and the off-diagonal density matrix intervenes in the construction of the paths.

39
00:05:41,540 --> 00:05:54,040
Naturally, x can be a position in a 3-dimensional space, and the paths are independent paths in x, y and z.

40
00:05:54,820 --> 00:05:59,840
Next, let us consider two particles.

41
00:06:00,260 --> 00:06:06,800
The statistical weight of a position x = (x0, x1)

42
00:06:06,800 --> 00:06:11,780
involves a density matrix as before

43
00:06:11,780 --> 00:06:19,600
 and the paths are now from x0 to x0 and from x1 to x1. 

44
00:06:20,980 --> 00:06:30,620
The partition function is an integral over all the paths x0 to x0 and from x1 to x1,

45
00:06:30,620 --> 00:06:35,980
integrated over x0 and integrated over x1.

46
00:06:35,980 --> 00:06:44,140
For non-interacting particles, we are already done: the partition function is the trace

47
00:06:44,140 --> 00:06:50,580
- the integral over dx0 dx1... and so on... of the diagonal paths.

48
00:06:50,920 --> 00:06:55,320
These paths are independent.

49
00:06:55,320 --> 00:07:03,800
Now, interacting systems are described by paths

50
00:07:03,800 --> 00:07:12,700
whose weight is modified through the Trotter decomposition: this correlates the paths.

51
00:07:13,740 --> 00:07:23,620
Now, we can color these paths, make them blue, yellow, green, and so on...

52
00:07:23,620 --> 00:07:32,360
and we see that with this formalism, we describe in fact distinguishable quantum particles.

53
00:07:32,360 --> 00:07:44,360
To go from distinguishable to indistiguishable particles is very easy, and we will restrict ourselves to bosons.

54
00:07:44,360 --> 00:07:52,120
The partition function again involves positions, here on the bottom,

55
00:07:52,120 --> 00:07:56,820
and the same positions on the top.

56
00:07:56,820 --> 00:08:04,860
These positions must be the same, because we are concerned with the diagonal density matrix,

57
00:08:04,860 --> 00:08:10,380
but now, there can be permutations.

58
00:08:10,800 --> 00:08:22,020
So you see, the green particle becomes red, and the red particle becomes blue, and so on...

59
00:08:22,020 --> 00:08:29,420
There is no need for colors anymore, the particles have become indistinguishable.

60
00:08:29,420 --> 00:08:39,480
In fact, the bosonic partition function is given by an average over all permutations

61
00:08:39,480 --> 00:08:51,340
of the paths from x0 to x of a permutation of 0, from x1 to x of a permutation of 1, and so on...

62
00:08:51,340 --> 00:09:03,160
This formula can be rigorously derived using symmetric wavefunctions, but its spirit is very clear.

63
00:09:03,800 --> 00:09:17,280
For interacting particles, we can now cut up the density matrix into little slices, and interfere with the Trotter decomposition.

64
00:09:17,560 --> 00:09:26,560
But for non-interacting particles, there is no need for intermediate slices, and no need for Trotter decomposition,

65
00:09:26,560 --> 00:09:36,740
so we arrive at the partition function of non-interacting ideal bosons, as shown here.

66
00:09:36,740 --> 00:09:45,240
 So here, we have a multiple integral over paths, and a sum over permuations.

67
00:09:45,240 --> 00:09:54,620
The structure shown here is completely general, and the only simplification of the ideal Bose gas,

68
00:09:54,620 --> 00:10:04,500
is the fact that the many-body density matrix breaks up into a product over single-particle density matrices,

69
00:10:04,500 --> 00:10:12,180
or in other words, the fact that the paths are independent.

70
00:10:16,020 --> 00:10:24,140
In this week's tutorial, we will analytically describe the partition function described in the last section.

71
00:10:24,480 --> 00:10:33,040
But here, let us consider the sampling problem. We face, in fact, two challenges:

72
00:10:33,380 --> 00:10:40,700
the sampling of the permutations, and the sampling of the positions.

73
00:10:41,380 --> 00:10:52,040
Let us consider the sampling of the permutations first, and let us radically simplify the problem discussed here

74
00:10:52,040 --> 00:10:58,340
by replacing everything that depends of space by 1,

75
00:10:58,340 --> 00:11:11,200
so instead of sampling bosonic permutations, we consider for a few minutes the permutations of n elements in a list.

76
00:11:11,400 --> 00:11:19,000
At each step, we may exchange two random elements.

77
00:11:19,480 --> 00:11:31,200
This random transposition algorithm, a Markov-Chain algorithm, is contained in the algorithm permutation_sample.py.

78
00:11:32,220 --> 00:11:42,880
Look here, at the two indices i and j, and here, the exchange of L[i] and L[j].

79
00:11:43,740 --> 00:11:53,880
Ouput of this program is shown here. You see the permutations represented in bottom-up fashion

80
00:11:53,880 --> 00:12:04,320
which means for this permutation that 0->0, 1->3, 2->1 and 3->2.

81
00:12:04,320 --> 00:12:09,320
The random transposition algorithm is correct.

82
00:12:09,320 --> 00:12:16,500
It satisfies detailed balance, is irreducible, and aperiodic,

83
00:12:17,120 --> 00:12:26,020
and you see that the frequency of our 24 permutations comes out just right.

84
00:12:26,340 --> 00:12:33,780
The second element of our simulation program is the sampling of positions.

85
00:12:34,020 --> 00:12:42,120
Let us look again at the average over permutations, and pick one of them,

86
00:12:42,320 --> 00:12:49,640
 the one we just looked at, the permutation 0->0, 1->3, 2->1 and 3->2.

87
00:12:50,620 --> 00:13:00,540
We can represent this permutation graphically, and you see there is one cycle of length 1,

88
00:13:00,540 --> 00:13:10,940
and one cycle of length 3: the cycle 1->3->2->1.

89
00:13:11,760 --> 00:13:21,020
This cycle has a curious action. Have you seen this before?

90
00:13:21,580 --> 00:13:27,860
Of course ! The integral over x3

91
00:13:27,960 --> 00:13:32,460
is just like it was in the convolution theorem.

92
00:13:32,460 --> 00:13:41,380
It gives the density matrix rho(x1, x2) at 2 beta.

93
00:13:42,180 --> 00:13:51,880
and the integral over x2 again can be used in the convolution theorem.

94
00:13:51,880 --> 00:14:00,000
It gives an integral over x1, x1, 3 beta.

95
00:14:00,000 --> 00:14:13,320
So in this permutation part of the partition function, we have one particle, the particle 0, at temperature beta,

96
00:14:13,320 --> 00:14:25,780
and the particles on the cycle of length three, 1, 3 and 2, are in fact at temperature 3 beta,

97
00:14:25,780 --> 00:14:30,620
this means at three times lower temperature.

98
00:14:30,620 --> 00:14:40,860
To sample the partition function for this particular permutation, we may use what we learned in last week's homework,

99
00:14:40,860 --> 00:14:50,740
we may sample x0 from the diagonal density matrix rho_harmonic of x0, x0, beta,

100
00:14:50,740 --> 00:14:55,040
and similarly in y and in z.

101
00:14:55,040 --> 00:15:09,080
Analogously, we may sample the position x1 from the diagonal density matrix rho_harmonic of x1, x1, 3 beta.

102
00:15:10,360 --> 00:15:20,600
The positions of x3 and x2 are the intermediate points in a Lévy construction

103
00:15:20,600 --> 00:15:29,200
at inverse termperature 3 beta with 3 slices at temperature beta and 2 beta.

104
00:15:29,200 --> 00:15:41,000
The moves in positions have no rejections. In contrast, we must sample the permutations with the metropolis acceptance probability.

105
00:15:41,460 --> 00:15:50,420
For example, in our permutation 0->0, 1->3, 2->1 and 3->2,

106
00:15:50,420 --> 00:15:59,640
let us pick 2 random elements, for example 1 and 2, and exchange where they point to.

107
00:15:59,640 --> 00:16:09,160
So the new permutation is 1->1 and 2->3.

108
00:16:09,160 --> 00:16:25,880
The old weight of the permutation is proportional to...

109
00:16:26,600 --> 00:16:39,340
and the new weight is proprtional to...

110
00:16:39,480 --> 00:16:50,420
We accept this move with the Metropolis acceptance probability min(1, pi_new/pi_old).

111
00:16:50,420 --> 00:16:59,400
For what follows, please take a moment to download, run and modify the program discussed in this section.

112
00:16:59,400 --> 00:17:12,940
The algorithm permutation_sample.py is really simple, yet it may familiarize you to the way we write permutations from bottom to top,

113
00:17:12,940 --> 00:17:24,620
and with the transpositions that constitute a Markov chain with the stationary probability distribution of random permutations.

114
00:17:27,860 --> 00:17:41,780
For the following discussions, please pull up the fact-sheet of last week, where we discussed the harmonic density matrix, and the harmonic path sampling.

115
00:17:41,780 --> 00:17:44,460
We have provided it again today.

116
00:17:44,460 --> 00:17:49,440
 To simulate ideal bosons in a 3D harmonic trap,

117
00:17:49,440 --> 00:18:03,920
we start with the identity permutation and with random positions sampled from the diagonal harmonic density matrix in x, y and z.

118
00:18:03,920 --> 00:18:14,220
For each particle move, we sample a random particle, identify its permutation cycle,

119
00:18:14,220 --> 00:18:22,680
and sample a new Lévy quantum path for the entire cycle.

120
00:18:22,680 --> 00:18:32,320
For each permutation move, we sample 2 random particles like this and this,

121
00:18:32,320 --> 00:18:38,700
and we attempt an exchange of their permutation partners.

122
00:18:39,080 --> 00:18:47,560
In Python, this gives the following program, markov_harmonic_boson.py

123
00:18:48,000 --> 00:18:56,120
This program has 2 functions: the first function, levy_harmonic_path,

124
00:18:56,120 --> 00:19:04,940
is used at multiples of the inverse temperature beta, corresponding to the length of the permutation cycle.

125
00:19:04,940 --> 00:19:10,160
We use it to resample the positions of the entire cycle.

126
00:19:10,160 --> 00:19:18,440
The second function computes the off-diagonal harmonic density matrix.

127
00:19:18,920 --> 00:19:25,300
We use it to organize the exchange of two elements.

128
00:19:25,300 --> 00:19:30,160
And here is the second part of this program.

129
00:19:30,160 --> 00:19:40,540
After an initialization, exactly as announced, we enter a short iteration loop.

130
00:19:40,540 --> 00:19:49,400
We sample a random particle and compute the permutation cycle it is on.

131
00:19:49,400 --> 00:20:00,540
Then, we simply resample the entire path of the cycle from the Lévy quantum path.

132
00:20:01,160 --> 00:20:09,120
And here, we pick two particles and attempt an exhange.

133
00:20:09,660 --> 00:20:15,120
This is all there is to this program.

134
00:20:15,120 --> 00:20:22,100
In this very short program, there are no particle indices.

135
00:20:22,100 --> 00:20:32,300
The particle positions x, y and z, are the "keys" of a "dictionary" called "positions".

136
00:20:33,160 --> 00:20:40,720
These are the positions at tau=0. The "values" of this dictionary

137
00:20:40,720 --> 00:20:47,620
are the positions at tau=beta, the positions of the permutation partners.

138
00:20:48,280 --> 00:20:58,440
So here, we sample a random key, and the pop operation outputs

139
00:20:58,440 --> 00:21:02,920
the positions of the permutation partner.

140
00:21:02,920 --> 00:21:10,160
Output of markov_harmonic_bosons.py is show here.

141
00:21:10,440 --> 00:21:16,620
At high temperature, particles are quite far from each other,

142
00:21:16,620 --> 00:21:23,140
and attempts to perform a transposition are usually rejected.

143
00:21:23,660 --> 00:21:33,500
At lower temperature, beta becomes larger and the transpositions are accepted more easily.

144
00:21:34,120 --> 00:21:43,260
All of a sudden particles clamp together. The transpositions are accepted

145
00:21:43,260 --> 00:21:49,000
and particles are on long permutation cycles.

146
00:21:49,700 --> 00:21:56,540
On long permutation cycles, they seem to be at much lower temperature.

147
00:21:56,540 --> 00:22:06,400
In fact, they are in the ground state. This is the essence of Bose-Einstein condensation.

148
00:22:06,400 --> 00:22:13,460
We will treat it again in more detail in this week's tutorial.

149
00:22:14,440 --> 00:22:23,940
So here is the program we discussed during this lecture, markov_harmonic_bosons.py,

150
00:22:23,940 --> 00:22:34,440
as well as its movie version that produced the nice graphics outputs you saw all during this lecture.

151
00:22:34,940 --> 00:22:43,600
In this week's homework session, you will take over the steering wheel of this beautiful program,

152
00:22:43,600 --> 00:22:48,680
and run it at high and at low temperature.

153
00:22:49,500 --> 00:22:59,300
Notice this program is short enough for you to gain complete understanding of how it works.

154
00:23:01,300 --> 00:23:08,040
So in conclusion, we have studied in this lecture Bose-Einstein condensation,

155
00:23:08,040 --> 00:23:17,180
and set up a really compact Path Integral Monte-Carlo simulation for hundreds and thousands of bosons.

156
00:23:17,620 --> 00:23:22,700
We could look ourselves to the Bose-Einstein condensation,

157
00:23:23,320 --> 00:23:29,700
so now is time for me to let you play with this algorithm,

158
00:23:30,160 --> 00:23:35,700
and to learn how it works. More details will be provided

159
00:23:35,700 --> 00:23:39,780
 in this week's tutorial and homework session.

160
00:23:40,240 --> 00:23:46,400
So now, finally, let me thank you for your attention

161
00:23:46,760 --> 00:23:56,880
and see you again later on this week and in further sessions of Statistical Mechanics: Algorithms and Computations.