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.UnitarySmoothPulseProblem
— FunctionUnitarySmoothPulseProblem(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 hamiltonianH_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 anEmbeddedOperator
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 solverpiccolo_options::PiccoloOptions=PiccoloOptions()
: the options for the Piccolo solverconstraints::Vector{<:AbstractConstraint}=AbstractConstraint[]
: the constraints to enforceinit_trajectory::Union{NamedTrajectory, Nothing}=nothing
: an initial trajectory to usea_bound::Float64=1.0
: the bound on the control pulsea_bounds::Vector{Float64}=fill(a_bound, length(system.G_drives))
: the bounds on the control pulses, one for each drivea_guess::Union{Matrix{Float64}, Nothing}=nothing
: an initial guess for the control pulsesda_bound::Float64=Inf
: the bound on the control pulse derivativeda_bounds::Vector{Float64}=fill(da_bound, length(system.G_drives))
: the bounds on the control pulse derivatives, one for each drivedda_bound::Float64=1.0
: the bound on the control pulse derivativedda_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 sizedrive_derivative_σ::Float64=0.01
: the standard deviation of the initial guess for the control pulse derivativesQ::Float64=100.0
: the weight on the infidelity objectiveR=1e-2
: the weight on the regularization termsR_a::Union{Float64, Vector{Float64}}=R
: the weight on the regularization term for the control pulsesR_da::Union{Float64, Vector{Float64}}=R
: the weight on the regularization term for the control pulse derivativesR_dda::Union{Float64, Vector{Float64}}=R
: the weight on the regularization term for the control pulse second derivativesleakage_suppression::Bool=false
: whether or not to suppress leakage to higher energy statesR_leakage=1e-1
: the weight on the leakage suppression termbound_unitary=integrator == :exponential
: whether or not to bound the unitarycontrol_norm_constraint=false
: whether or not to enforce a constraint on the control pulse normcontrol_norm_constraint_components=nothing
: the components of the control pulse to use for the norm constraintcontrol_norm_R=nothing
: the weight on the control pulse norm constraint
TODO: control modulus norm, advanced feature, needs documentation
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.
Unitary Minimum Time Problem
QuantumCollocation.ProblemTemplates.UnitaryMinimumTimeProblem
— FunctionUnitaryMinimumTimeProblem(
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 toQuantumControlProblem
.
This page was generated using Literate.jl.