kestrelquantum / QuantumCollocation.jl

Quantum Optimal Control with Direct Collocation
MIT License
29 stars 7 forks source link

[Feature] Override quantum control problem defaults in problem templates #56

Closed andgoldschmidt closed 3 months ago

andgoldschmidt commented 10 months ago

Is your feature request related to a problem? Please describe. Min time and robustness problem templates constructed from a QuantumControlProblem use the problem's constraints and objective. Sometimes, we might want to reset or change these. However, we don't care to redefine the initial trajectory, system, or other problem-specific intializations.

Describe the solution you'd like Example,

function UnitaryRobustnessProblem(
    Hₑ::AbstractMatrix{<:Number},
    prob::QuantumControlProblem;
    constraints::Union{Vector{<:AbstractConstraint}, Nothing}=nothing,
    objective::Union{Objective, Nothing}=nothing,
    kwargs...
)

would use the problem defaults if nothing, else the provided values.

We will also need to add a default convenience objective that acts as a zero. It might also be nice to treat any usage of zero as referring to this objective, when doing addition of objectives.

andgoldschmidt commented 3 months ago

Closed by #136