Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove typing on control bounds
  • Loading branch information
andgoldschmidt committed Jun 24, 2025
commit a4bac5b0c8be7ac16a224977c4155a22fa2911dc
4 changes: 2 additions & 2 deletions src/problem_templates/quantum_state_sampling_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function QuantumStateSamplingProblem(
a_bounds=fill(a_bound, systems[1].n_drives),
a_guess::Union{Matrix{Float64},Nothing}=nothing,
da_bound::Float64=Inf,
da_bounds::Vector{Float64}=fill(da_bound, systems[1].n_drives),
da_bounds=fill(da_bound, systems[1].n_drives),
dda_bound::Float64=1.0,
dda_bounds::Vector{Float64}=fill(dda_bound, systems[1].n_drives),
dda_bounds=fill(dda_bound, systems[1].n_drives),
Δt_min::Float64=0.5 * minimum(Δt),
Δt_max::Float64=2.0 * maximum(Δt),
Q::Float64=100.0,
Expand Down
12 changes: 6 additions & 6 deletions src/problem_templates/quantum_state_smooth_pulse_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ with
- `timestep_name::Symbol=:Δt`: The name of the timestep variable.
- `init_trajectory::Union{NamedTrajectory, Nothing}=nothing`: The initial trajectory.
- `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 pulse.
- `a_bounds=fill(a_bound, length(system.G_drives))`: The bounds on the control pulse.
- `a_guess::Union{Matrix{Float64}, Nothing}=nothing`: The initial guess for the control pulse.
- `da_bound::Float64=Inf`: The bound on the first derivative of the control pulse.
- `da_bounds::Vector{Float64}=fill(da_bound, length(system.G_drives))`: The bounds on the first derivative of the control pulse.
- `da_bounds=fill(da_bound, length(system.G_drives))`: The bounds on the first derivative of the control pulse.
- `dda_bound::Float64=1.0`: The bound on the second derivative of the control pulse.
- `dda_bounds::Vector{Float64}=fill(dda_bound, length(system.G_drives))`: The bounds on the second derivative of the control pulse.
- `dda_bounds=fill(dda_bound, length(system.G_drives))`: The bounds on the second derivative of the control pulse.
- `Δt_min::Float64=0.5 * Δt`: The minimum timestep size.
- `Δt_max::Float64=1.5 * Δt`: The maximum timestep size.
- `drive_derivative_σ::Float64=0.01`: The standard deviation of the drive derivative random initialization.
Expand All @@ -63,12 +63,12 @@ function QuantumStateSmoothPulseProblem(
timestep_name::Symbol=:Δt,
init_trajectory::Union{NamedTrajectory, Nothing}=nothing,
a_bound::Float64=1.0,
a_bounds::Vector{Float64}=fill(a_bound, sys.n_drives),
a_bounds=fill(a_bound, sys.n_drives),
a_guess::Union{AbstractMatrix{Float64}, Nothing}=nothing,
da_bound::Float64=Inf,
da_bounds::Vector{Float64}=fill(da_bound, sys.n_drives),
da_bounds=fill(da_bound, sys.n_drives),
dda_bound::Float64=1.0,
dda_bounds::Vector{Float64}=fill(dda_bound, sys.n_drives),
dda_bounds=fill(dda_bound, sys.n_drives),
Δt_min::Float64=0.5 * minimum(Δt),
Δt_max::Float64=2.0 * maximum(Δt),
Q::Float64=100.0,
Expand Down
10 changes: 5 additions & 5 deletions src/problem_templates/unitary_sampling_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ robust solution by including multiple systems reflecting the problem uncertainty
- `timestep_name::Symbol = :Δt`: The name of the timestep variable.
- `constraints::Vector{<:AbstractConstraint} = AbstractConstraint[]`: The constraints.
- `a_bound::Float64 = 1.0`: The bound for the control amplitudes.
- `a_bounds::Vector{Float64} = fill(a_bound, length(systems[1].G_drives))`: The bounds for the control amplitudes.
- `a_bounds = fill(a_bound, length(systems[1].G_drives))`: The bounds for the control amplitudes.
- `a_guess::Union{Matrix{Float64}, Nothing} = nothing`: The initial guess for the control amplitudes.
- `da_bound::Float64 = Inf`: The bound for the control first derivatives.
- `da_bounds::Vector{Float64} = fill(da_bound, length(systems[1].G_drives))`: The bounds for the control first derivatives.
- `da_bounds = fill(da_bound, length(systems[1].G_drives))`: The bounds for the control first derivatives.
- `dda_bound::Float64 = 1.0`: The bound for the control second derivatives.
- `dda_bounds::Vector{Float64} = fill(dda_bound, length(systems[1].G_drives))`: The bounds for the control second derivatives.
- `dda_bounds = fill(dda_bound, length(systems[1].G_drives))`: The bounds for the control second derivatives.
- `Δt_min::Float64 = 0.5 * Δt`: The minimum time step size.
- `Δt_max::Float64 = 1.5 * Δt`: The maximum time step size.
- `Q::Float64 = 100.0`: The fidelity weight.
Expand Down Expand Up @@ -58,9 +58,9 @@ function UnitarySamplingProblem(
a_bounds=fill(a_bound, systems[1].n_drives),
a_guess::Union{Matrix{Float64},Nothing}=nothing,
da_bound::Float64=Inf,
da_bounds::Vector{Float64}=fill(da_bound, systems[1].n_drives),
da_bounds=fill(da_bound, systems[1].n_drives),
dda_bound::Float64=1.0,
dda_bounds::Vector{Float64}=fill(dda_bound, systems[1].n_drives),
dda_bounds=fill(dda_bound, systems[1].n_drives),
Δt_min::Float64=0.5 * minimum(Δt),
Δt_max::Float64=2.0 * maximum(Δt),
Q::Float64=100.0,
Expand Down
10 changes: 5 additions & 5 deletions src/problem_templates/unitary_smooth_pulse_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ with
- `init_trajectory::Union{NamedTrajectory, Nothing}=nothing`: an initial trajectory to use
- `a_guess::Union{Matrix{Float64}, Nothing}=nothing`: an initial guess for the control pulses
- `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_bounds=fill(a_bound, length(system.G_drives))`: the bounds on the control pulses, one for each drive
- `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
- `da_bounds=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 second derivative
- `dda_bounds::Vector{Float64}=fill(dda_bound, length(system.G_drives))`: the bounds on the control pulse second derivatives, one for each drive
- `dda_bounds=fill(dda_bound, length(system.G_drives))`: the bounds on the control pulse second derivatives, one for each drive
- `Δt_min::Float64=Δt isa Float64 ? 0.5 * Δt : 0.5 * mean(Δt)`: the minimum time step size
- `Δt_max::Float64=Δt isa Float64 ? 1.5 * Δt : 1.5 * mean(Δt)`: the maximum time step size
- `Q::Float64=100.0`: the weight on the infidelity objective
Expand All @@ -79,9 +79,9 @@ function UnitarySmoothPulseProblem(
a_bound::Float64=1.0,
a_bounds=fill(a_bound, system.n_drives),
da_bound::Float64=Inf,
da_bounds::Vector{Float64}=fill(da_bound, system.n_drives),
da_bounds=fill(da_bound, system.n_drives),
dda_bound::Float64=1.0,
dda_bounds::Vector{Float64}=fill(dda_bound, system.n_drives),
dda_bounds=fill(dda_bound, system.n_drives),
Δt_min::Float64=0.5 * minimum(Δt),
Δt_max::Float64=2.0 * maximum(Δt),
Q::Float64=100.0,
Expand Down
10 changes: 5 additions & 5 deletions src/problem_templates/unitary_variational_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Constructs a unitary variational problem for optimizing quantum control trajecto
- `timestep_name::Symbol`: The name of the timestep variable (default: `:Δt`).
- `init_trajectory::Union{NamedTrajectory, Nothing}`: An optional initial trajectory to start optimization.
- `a_bound::Float64`: The bound for the control variable `a` (default: `1.0`).
- `a_bounds::Vector`: Bounds for each control variable (default: filled with `a_bound`).
- `a_bounds`: Bounds for each control variable (default: filled with `a_bound`).
- `da_bound::Float64`: The bound for the derivative of the control variable (default: `Inf`).
- `da_bounds::Vector`: Bounds for each derivative of the control variable.
- `da_bounds`: Bounds for each derivative of the control variable.
- `dda_bound::Float64`: The bound for the second derivative of the control variable (default: `1.0`).
- `dda_bounds::Vector`: Bounds for each second derivative of the control variable.
- `dda_bounds`: Bounds for each second derivative of the control variable.
- `Δt_min::Float64`: Minimum allowed timestep duration.
- `Δt_max::Float64`: Maximum allowed timestep duration.
- `Q::Float64`: Weight for the unitary infidelity objective (default: `100.0`).
Expand Down Expand Up @@ -78,9 +78,9 @@ function UnitaryVariationalProblem(
a_bound::Float64=1.0,
a_bounds=fill(a_bound, system.n_drives),
da_bound::Float64=Inf,
da_bounds::Vector{Float64}=fill(da_bound, system.n_drives),
da_bounds=fill(da_bound, system.n_drives),
dda_bound::Float64=1.0,
dda_bounds::Vector{Float64}=fill(dda_bound, system.n_drives),
dda_bounds=fill(dda_bound, system.n_drives),
Δt_min::Float64=0.5 * minimum(Δt),
Δt_max::Float64=2.0 * maximum(Δt),
Q::Float64=100.0,
Expand Down