API

ParameterizedQuantumControl.optimize_parametersMethod
using ParameterizedQuantumControl
result = optimize(problem; method=ParameterizedQuantumControl, kwargs...)

optimizes the given control problem by varying a set of control parameters in order to minimize the functional

\[J(\{u_{n}\}) = J_T(\{|ϕ_k(T)⟩\})\]

where $|ϕ_k(T)⟩$ is the result of propagating the initial state of the $k$'th trajectory under the parameters $\{u_n\}$

Returns a ParameterizedOptResult.

Keyword arguments that control the optimization are taken from the keyword arguments used in the instantiation of problem; any of these can be overridden with explicit keyword arguments to optimize.

Required problem keyword arguments

  • backend: A package to perform the optimization, e.g., Optimization (for Optimization.jl)
  • optimizer: A backend-specific object to perform the optimizatino, e.g., NLopt.LN_NELDERMEAD() from NLOpt/OptimizationNLOpt
  • J_T: A function J_T(ϕ, trajectories; τ=τ) that evaluates the final time functional from a vector ϕ of forward-propagated states and problem.trajectories. For all trajectories that define a target_state, the element τₖ of the vector τ will contain the overlap of the state ϕₖ with the target_state of the k'th trajectory, or NaN otherwise.

Optional problem keyword arguments

  • parameters: An AbstractVector of parameters to tune in the optimization. By default, parameters=get_parameters(problem). If given explicitly, the vector must alias values inside the generators used in problem.trajectories so that mutating the parameters array directly affects any subsequent propagation.
  • lb: An AbstractVector of lower bound values for a box constraint. Must be a vector similar to (and of the same size as parameters)
  • ub: An AbstractVector of upper bound values for a box constraint, cf. lb
  • use_threads: If given a true, propagate trajectories in parallel
  • iter_stop: The maximum number of iterations
source