Wavepacket Transport on a Moving Grid¶
This example illustrates the use of the qdyn
library to apply
optimal control algorithms with moving grids in both coordinate and
momentum space. We optimize the transport of a wavepacket, such that the
final state is the same the initial state, only displaced along
\(x\).
Running the Example¶
To compile the example, you should just run make
, assuming that the
qdyn
library is installed.
To run the example, simply run oct_movgrid
.
If you want to compile a visualization of the results, you can run
visoutput ./
, which will compile a pdf consisting of animation
frames. You can also compile an avi movie using visoutput --avi ./
if ffmpeg
is installed. Here is the usage information for
visoutput
.
Usage: visoutput [options] INPUT OUTPUT
Options:
-h, --help show this help message and exit
-n NFRAMES, --nframes=NFRAMES
number of frames to make [default 100]
-t NTHREADS, --nthreads=NTHREADS
number of threads to use [default 1]
-g, --goal show the goal wavefunction
-p, --potential show the potential in x-space
-o OUTPUT, --output=OUTPUT
The output format. Can be 'pdf' (the default), 'avi',
or 'png'
Details¶
A harmonic oscillator eigenstate is centered at \(x = 0\), and five harmonic potentials are defined with their minima equidistant along the interval [0:10], so that the \(i\)-th potential can be written as
where \(x_i = (i - 1)5/2\) and \(\varepsilon_i(t)\) is the pulse associated with the potential. The potential at any time \(t\) is just the sum of these:
The goal is to transfer the wavepacket from its initial position at \(x = 0\) to the goal position at \(x = 10\). At the initial time, the wavefunction is the ground state of the harmonic oscillator \(U_1(x, 0)\), and the goal wavefunction is the ground state of the harmonic oscillator \(U_5(x, T)\), where \(T = 10\) is the final time. This can be seen in the following figure.
The initial guess for the controls \(\varepsilon_i(t)\) is simply a gaussian for each, such that the maximum of the gaussian is attained for the \(i\)th pulse at time \(t_i = (i - 1)5/2\). This is shown in the figure below.
We see that at the initial time \(t=0\) only the first pulse \(\varepsilon_1\) is ‘on’, with all others set to zero. Hence \(U(x,0) = U_1(x,0)\). Similarly, at the final time \(T = 10\), only the final pulse \(\varepsilon_5\) is ‘on’, such that \(U(x,T) = U_5(x,T)\). In order to fix these boundary conditions during transport, we set the shape function of the pulses to a flat-top function, which is shown below.