Propagation
Simple quantum time propagation in 1d and 2d.
All physical quantities are in (Hartree) atomic units (numerical values: hbar = e = m = k_B = 1; c=1/alpha), cmp. also http://en.wikipedia.org/wiki/Atomic_units
Propagator
Base class for wavepacket time-propagation.
step(grid, dt)
To be implemented in subclasses.
SplitOperator(renormalize_every=0, workers=-1, order=2)
Bases: Propagator
Split operator time propagation.
Uses the symmetrized (Strang) splitting \(e^{-iH\Delta t} \approx e^{-iV\Delta t/2} e^{-iT\Delta t} e^{-iV\Delta t/2}\) with a local error of \(O(\Delta t^3)\). The kinetic part is applied in momentum space via FFT.
For a time-dependent potential, the opening half step uses \(V(t)\) and the closing one \(V(t+\Delta t)\), \(e^{-iV(t+\Delta t)\Delta t/2} e^{-iT\Delta t} e^{-iV(t)\Delta t/2}\), which keeps the scheme symmetric in time and second order accurate.
In :meth:propagate, the closing potential half step of one step and the
opening half step of the next one use the same potential and are merged
into a single full step as long as no callback or renormalization comes
in between. This gives the same result with one array multiplication less
per step, and the potential is evaluated only once per step.
With order=4 or order=6, one step is a symmetric composition of
3 or 9 Strang steps \(S(c_j\Delta t)\) (Yoshida's triple jump, applied once
or twice), which makes the global error \(O(\Delta t^4)\) or
\(O(\Delta t^6)\) for the cost of 3 or 9 FFT pairs per step. Some of the
\(c_j\) are negative, so the substeps briefly go back in time; this is
harmless in real time but not in imaginary time, where a backward
kinetic step amplifies high momenta, so higher orders need a real
\(\Delta t\).
A time step with negative imaginary part, \(\Delta t = -i\tau\), performs imaginary time evolution, which relaxes to the ground state.
Create a split operator propagator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
renormalize_every
|
int
|
Renormalize the wavefunction after this many steps have been made. Use 0 if you do not want renormalization. |
0
|
order
|
(2, 4, 6)
|
Order of the splitting in the time step. |
2
|
workers
|
int
|
Number of threads for the FFTs, passed on to |
-1
|
step(grid, dt)
Advance time by one step dt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grid
|
Grid object
|
The grid that holds all information needed to advance time. |
required |
dt
|
complex
|
Time step. |
required |
propagate(grid, dt, n_steps, callback=None, every=1)
Do several time steps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grid
|
Grid object
|
The grid to be propagated. |
required |
dt
|
complex
|
Time step. |
required |
n_steps
|
int
|
Number of steps. |
required |
callback
|
callable or sequence of callables
|
Called as |
None
|
every
|
int
|
Callback interval. |
1
|