Problem Templates

We provide a number of problem templates for making it simple and easy to set up and solve certain types of quantum optimal control problems. These templates all construct a QuantumControlProblem object. The problem templates are:

Unitary Smooth Pulse Problem

QuantumCollocation.ProblemTemplates.UnitarySmoothPulseProblemFunction
UnitarySmoothPulseProblem(system::QuantumSystem, operator, T, Δt; kwargs...)

Construct a QuantumControlProblem for a free-time unitary gate problem with smooth control pulses enforced by constraining the second derivative of the pulse trajectory, i.e.,

\[\begin{aligned} \underset{\vec{\tilde{U}}, a, \dot{a}, \ddot{a}, \Delta t}{\text{minimize}} & \quad Q \cdot \ell\qty(\vec{\tilde{U}}_T, \vec{\tilde{U}}_{\text{goal}}) + \frac{1}{2} \sum_t \qty(R_a a_t^2 + R_{\dot{a}} \dot{a}_t^2 + R_{\ddot{a}} \ddot{a}_t^2) \\ \text{ subject to } & \quad \vb{P}^{(n)}\qty(\vec{\tilde{U}}_{t+1}, \vec{\tilde{U}}_t, a_t, \Delta t_t) = 0 \\ & a_{t+1} - a_t - \dot{a}_t \Delta t_t = 0 \\ & \quad \dot{a}_{t+1} - \dot{a}_t - \ddot{a}_t \Delta t_t = 0 \\ & \quad |a_t| \leq a_{\text{bound}} \\ & \quad |\ddot{a}_t| \leq \ddot{a}_{\text{bound}} \\ & \quad \Delta t_{\text{min}} \leq \Delta t_t \leq \Delta t_{\text{max}} \\ \end{aligned}\]

where, for $U \in SU(N)$,

\[\ell\qty(\vec{\tilde{U}}_T, \vec{\tilde{U}}_{\text{goal}}) = \abs{1 - \frac{1}{N} \abs{ \tr \qty(U_{\text{goal}}, U_T)} }\]

is the infidelity objective function, $Q$ is a weight, $R_a$, $R_{\dot{a}}$, and $R_{\ddot{a}}$ are weights on the regularization terms, and $\vb{P}^{(n)}$ is the $n$th-order Pade integrator.

Arguments

  • H_drift::AbstractMatrix{<:Number}: the drift hamiltonian
  • H_drives::Vector{<:AbstractMatrix{<:Number}}: the control hamiltonians

or

  • system::QuantumSystem: the system to be controlled

with

  • operator::OperatorType: the target unitary, either in the form of an EmbeddedOperator or a `Matrix{ComplexF64}
  • T::Int: the number of timesteps
  • Δt::Float64: the (initial) time step size

Keyword Arguments

  • ipopt_options::IpoptOptions=IpoptOptions(): the options for the Ipopt solver
  • piccolo_options::PiccoloOptions=PiccoloOptions(): the options for the Piccolo solver
  • constraints::Vector{<:AbstractConstraint}=AbstractConstraint[]: the constraints to enforce
  • init_trajectory::Union{NamedTrajectory, Nothing}=nothing: an initial trajectory to use
  • a_bound::Float64=1.0: the bound on the control pulse
  • a_bounds::Vector{Float64}=fill(a_bound, length(system.G_drives)): the bounds on the control pulses, one for each drive
  • a_guess::Union{Matrix{Float64}, Nothing}=nothing: an initial guess for the control pulses
  • da_bound::Float64=Inf: the bound on the control pulse derivative
  • da_bounds::Vector{Float64}=fill(da_bound, length(system.G_drives)): the bounds on the control pulse derivatives, one for each drive
  • dda_bound::Float64=1.0: the bound on the control pulse derivative
  • dda_bounds::Vector{Float64}=fill(dda_bound, length(system.G_drives)): the bounds on the control pulse derivatives, one for each drive
  • Δt_min::Float64=0.5 * Δt: the minimum time step size
  • Δt_max::Float64=1.5 * Δt: the maximum time step size
  • drive_derivative_σ::Float64=0.01: the standard deviation of the initial guess for the control pulse derivatives
  • Q::Float64=100.0: the weight on the infidelity objective
  • R=1e-2: the weight on the regularization terms
  • R_a::Union{Float64, Vector{Float64}}=R: the weight on the regularization term for the control pulses
  • R_da::Union{Float64, Vector{Float64}}=R: the weight on the regularization term for the control pulse derivatives
  • R_dda::Union{Float64, Vector{Float64}}=R: the weight on the regularization term for the control pulse second derivatives
  • leakage_suppression::Bool=false: whether or not to suppress leakage to higher energy states
  • R_leakage=1e-1: the weight on the leakage suppression term
  • bound_unitary=integrator == :exponential: whether or not to bound the unitary
  • control_norm_constraint=false: whether or not to enforce a constraint on the control pulse norm
  • control_norm_constraint_components=nothing: the components of the control pulse to use for the norm constraint
  • control_norm_R=nothing: the weight on the control pulse norm constraint

TODO: control modulus norm, advanced feature, needs documentation

source
UnitarySmoothPulseProblem(
    H_drift::AbstractMatrix{<:Number},
    H_drives::Vector{<:AbstractMatrix{<:Number}},
    operator,
    T,
    Δt;
    kwargs...
)

Constructor for a UnitarySmoothPulseProblem from a drift Hamiltonian and a set of control Hamiltonians.

source

Unitary Minimum Time Problem

QuantumCollocation.ProblemTemplates.UnitaryMinimumTimeProblemFunction
UnitaryMinimumTimeProblem(
    trajectory::NamedTrajectory,
    system::AbstractQuantumSystem,
    objective::Objective,
    integrators::Vector{<:AbstractIntegrator},
    constraints::Vector{<:AbstractConstraint};
    kwargs...
)

UnitaryMinimumTimeProblem(
    prob::QuantumControlProblem;
    kwargs...
)

Create a minimum-time problem for unitary control.

\[\begin{aligned} \underset{\vec{\tilde{U}}, a, \dot{a}, \ddot{a}, \Delta t}{\text{minimize}} & \quad J(\vec{\tilde{U}}, a, \dot{a}, \ddot{a}) + D \sum_t \Delta t_t \\ \text{ subject to } & \quad \vb{P}^{(n)}\qty(\vec{\tilde{U}}_{t+1}, \vec{\tilde{U}}_t, a_t, \Delta t_t) = 0 \\ & c(\vec{\tilde{U}}, a, \dot{a}, \ddot{a}) = 0 \\ & \quad \Delta t_{\text{min}} \leq \Delta t_t \leq \Delta t_{\text{max}} \\ \end{aligned}\]

Arguments

  • trajectory::NamedTrajectory: The initial trajectory.
  • system::AbstractQuantumSystem: The quantum system.
  • objective::Objective: The objective function (additional to the minimum-time objective).
  • integrators::Vector{<:AbstractIntegrator}: The integrators.
  • constraints::Vector{<:AbstractConstraint}: The constraints.

Keyword Arguments

  • unitary_symbol::Symbol=:Ũ⃗: The symbol for the unitary control.
  • final_fidelity::Float64=0.99: The final fidelity.
  • D=1.0: The weight for the minimum-time objective.
  • ipopt_options::IpoptOptions=IpoptOptions(): The options for the Ipopt solver.
  • piccolo_options::PiccoloOptions=PiccoloOptions(): The options for the Piccolo solver.
  • kwargs...: Additional keyword arguments to pass to QuantumControlProblem.
source

This page was generated using Literate.jl.