Menu

Reference.Programs.qm_optimal

Burkhard Schmidt
Attachments
Control.gif (13526 bytes)

qm_optimal: Optimal control of bilinear system

This Matlab function solves bilinear control problems as described in the page on the qm_abncd function. The optimal control problem consists of maximizing the following functional

J = J1 − J2 − J3

by means of iterated backward-forward propagations, trying to satisfy the following requirements, see also the corresponding page in the WavePacket central Wiki.

  • Maximize output/observable/target at given final time T
    J1[x] = 2 ℜ ( ⟨cj|x(T)⟩+ ⟨xe|Dj|x(T)⟩ ) + ⟨x(T)|Dj|x(T)⟩
    with state vector |x(t)⟩ and where vectors cj and/or matrices Dj stand for the j-th (linear or quadratic) output/observables and where constant terms ⟨cj|xe⟩ and/or ⟨xe|Dj|xe⟩ coming from the shift |x⟩ → |x⟩−|xe⟩ have been omitted.

  • Minimize cost/energy associated with input/control field(s) u(t)
    J2[u] = ∑k αk0T uk²(t) / sk(t)
    with penalty factors αk > 0 and with prescribed shape function sk(t).

  • Minimize deviation from exact evolution
    J3[u,x,z] = 2 ℜ ∫0T dt ⟨z(t)+xe | ∂t−L | x(t)xe
    with Lagrange multiplier |z(t)⟩.

The total functional J=J1−J2−J3 becomes extremal if the time evolution of state |x(t)⟩ (forward in time) and Lagrange multiplier |z(t)⟩ (backward in time) are given in terms of the matrices A, B, N and C, D, identical to the description given for qm_control see also the corresponding page in the WavePacket central Wiki

t |x(t)+xe⟩ = L |x(t)+xe⟩ = ( A+i∑kuk(t)Nk ) |x(t)⟩ + i∑kuk(t)|bk⟩, x(t=0)=x0−|xe

t |z(t)+xe⟩ = − L |z(t)+xe⟩ = (−A+i∑kuk(t)Nk ) |z(t)⟩ + i∑kuk(t)|bk⟩, |z(t=T)⟩ = |cj⟩+Dj|x(T)⟩+Dj|xe⟩−|xe

with |bk⟩ ≡ Nk |xe⟩ and with A |xe⟩ = 0. The optimal control field is calculated as

uk(t)=−sk(t}ℑ(⟨z(t)+xe|Nk|x(t)+xe⟩)/αk

For a description of numerical techniques to solve the optimal control problem in quantum mechanics, see also the corresponding page in the WavePacket central Wiki.

Source code

The MATLAB function qm_optimal.m can be found here

Note that qm_optimal.m works only with objects of the main classes given in the following table:

class name description
ket state vecors, in eigen/energy representation
rho density matrices, in eigen/energy representation

Input parameters

The following input parameters are required when calling the function qm_propa.m

parameter description
string1 A text string specifying the numerical method to be employed (ODE solver)
param1 An additional parameter (optional)
  • A choice of numerical solvers used for propagations both of objects of class ket or class rho can be found here. Note that when string1 is not specified by the user, the default is to use a Runge-Kutta method of sixth order (for constant stepsize).

File I/O

The required matrices A, B, N and C, D as well as the vectors xi and xe etc are read from input data files ket_0.mat or rho_0.mat. Typically they are provided by previously running qm_abncd which generates them for quantum dynamics in either TDSE or LvNE setting, respectively. Alternatively, input data files can come from qm_balance and qm_truncate or from qm_H2model where the dimension of the LvNE problem has been reduced down to lower dimensionality. In that case, there will be specific file name suffixes, see here for more details.

Algorithms

To solve the control problem, we provide a choice simple of self-written integrators based on Runge-Kutta methods (with constant step size)

To solve the optimization problem, we use iterated backward-forward propagations by Rabitz et al., see the WavePacket central Wiki. Of particular interest may be the following :

Variables

Note that function qm_init should be run previously in order to initialize all variables in use. Of particular interest are the following structures:


Related

Blog: 2019/02/version-530-released-30-may-2017
Wiki: Download.Installation.Main
Wiki: Reference.Files.Main
Wiki: Reference.Programs.Main
Wiki: Reference.Programs.qm_H2model
Wiki: Reference.Programs.qm_abncd
Wiki: Reference.Programs.qm_balance
Wiki: Reference.Programs.qm_init
Wiki: Reference.Programs.qm_matrix
Wiki: Reference.Programs.qm_truncate
Wiki: Reference.Variables.control
Wiki: Reference.Variables.time.frog
Wiki: Reference.Variables.time.propa.ode
Wiki: Reference.Variables.time.steps
Wiki: Reference.Variables.time

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.