Lecture4 Quantum Python
Lecture4 Quantum Python
Quantum Python
1 / 19
i~
(x, t)
~2 2 (x, t)
+ V (x)(x, t)
=
t
2m
x 2
Quantum Python
2 / 19
i~
(x, t)
~2 2 (x, t)
+ V (x)(x, t)
=
t
2m
x 2
Quantum Python
2 / 19
FDTD: re-mapping
(xt , tn ) := n (l)
Quantum Python
3 / 19
FDTD: discretization
=
t
t
t
(x
,
t
)
(x
,
t
)
(xl , tn )
n+1/2 (l) n1/2 (l)
l n+1/2
l n1/2
=
t
t
t
Spatial derivatives exactly as before
2 n (l)
n (l + 1) 2n (l) + n (l 1)
x 2
x 2
Medo & Zhang (UNIFR)
Quantum Python
4 / 19
FDTD: equations
Quantum Python
5 / 19
maxx,t V (x,t) 1
2
See http://www.scipy.org/Cookbook/SchrodingerFDTD
(there is the rest of theory as well)
This is only orientational (e.g., V (x) somewhere does not
necessarily mean t 0)
Finer grid = smaller time steps needed
To reach the same physical time, simulation time grows as 1/x 3
Check whether we are really in the stable (convergent) regime:
halve t and see whether the results change substantially (they
should not)
Quantum Python
6 / 19
1 21 iHt
1 + 12 iHt
Quantum Python
7 / 19
Quantum Python
8 / 19
pot
= V (x) = (x, t + t) = (x, t)eiV (x)t/~
t
, t)eikx dk
(k
~2 k 2
= (k
, t + t) kin
, t)ei~k 2 t/2m
=
+ iV
= (k
t
2m
k
Quantum Python
9 / 19
k = 2/(b a),
xn = a + n x,
k0 = /x,
km = k0 + m k
Vn := V (xn ),
Quantum Python
m (t) = (k
m , t)
10 / 19
m from n
FFT: computes
m
m exp[i~k 2 t/2m]
A full step in k :
m
Inverse FFT: computes n from
Quantum Python
11 / 19
norm = 1.000
1.0
t=4
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0.0 150
1.0
100
50
50
norm = 1.000
100
150
0.0 150
1.0
t=8
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0.0 150
100
50
50
100
150
norm = 1.000
100
50
t=6
50
norm = 1.000
0.0 150
Quantum Python
100
50
100
150
t = 10
50
100
150
12 / 19
Quantum Python
13 / 19
Escript:
For non-linear, time-dependent partial differential equations
https://launchpad.net/escript-finley
Quantum Python
14 / 19
Quantum Python
15 / 19
Quantum Python
16 / 19
Quantum Python
16 / 19
Quantum Python
17 / 19
Quantum Python
17 / 19
even
odd
(4)
20
0
20
400
Quantum Python
18 / 19
even
odd
(4)
20
0
20
400
Quantum Python
18 / 19
Quantum Python
19 / 19