Oten in trajectories there will be a decision variable that works globally on the problem as a parameter.
Some examples are (specific to Quantum Control trajectories):
$\alpha$, $\beta$ parameters of some virtual Z gate
Carrier frequency for time dependent Hamiltonian
Global parameters shall be stored as vectors in a named tuple, in order that the values may be mutable. The params field should be added to the NamedTrajecotry struct with the type signature
params::NamedTuple{pnames, <:Tuple{Vararg{AbstractVector{R}}}} where pnames
These global parameters would ideally be exposed via some interface like the following:
# some global params as a NamedTuple
params = (
α = rand(1),
β = rand(1)
)
# build trajectory (with params as an optional arg)
traj = NamedTrajectory(components; timestep=dt, controls=:u, params=params)
# gives params back as NamedTuple
traj.params
# (α = [0.12], β = [0.39])
)
Feature Description
Oten in trajectories there will be a decision variable that works globally on the problem as a parameter.
Some examples are (specific to Quantum Control trajectories):
Global parameters shall be stored as vectors in a named tuple, in order that the values may be mutable. The
params
field should be added to the NamedTrajecotry struct with the type signatureThese global parameters would ideally be exposed via some interface like the following:
Implementation requirements
params
field to struct and constructor methods insrc/struct_named_trajectory.jl
test_constructors.jl
to thetest
dir that creates a simpleNamedTrajectory
with params. seetest/test_methods.jl
for reference.docs/literate/man
that goes through a simple example (can be identical to what is in the test file, with some exposition)Importance
1 (lowest)
What does this feature affect?