@@ -10,7 +10,7 @@ export SquareParametrization,
1010using QuantumPropagators. Controls: discretize_on_midpoints
1111using QuantumPropagators. Amplitudes: ControlAmplitude, ShapedAmplitude
1212
13- import QuantumPropagators. Controls: evaluate
13+ import QuantumPropagators. Controls: evaluate, get_controls
1414import QuantumControlBase: get_control_deriv
1515
1616
@@ -229,13 +229,13 @@ function ParametrizedAmplitude(
229229 return ParametrizedPulseAmplitude (control, parametrization)
230230 else
231231 try
232- S_t = shape (0.0 )
232+ ϵ_t = control (0.0 )
233233 catch
234234 error (
235235 " A ParametrizedAmplitude control must either be a vector of values or a callable"
236236 )
237237 end
238- return ParametrizedContinousAmplitude (control, parametrization)
238+ return ParametrizedContinuousAmplitude (control, parametrization)
239239 end
240240 else
241241 if (control isa Vector{Float64}) && (shape isa Vector{Float64})
@@ -319,15 +319,15 @@ struct ShapedParametrizedContinuousAmplitude <: ShapedParametrizedAmplitude
319319end
320320
321321
322- function evaluate (ampl:: ParametrizedAmplitude , tlist, n; vals_dict )
323- ϵ = evaluate (ampl. control, tlist, n; vals_dict )
322+ function evaluate (ampl:: ParametrizedAmplitude , args ... ; kwargs ... )
323+ ϵ = evaluate (ampl. control, args ... ; kwargs ... )
324324 return ampl. parametrization. a_of_epsilon (ϵ)
325325end
326326
327327
328- function evaluate (ampl:: ShapedParametrizedAmplitude , args... ; vals_dict = IdDict () )
329- ϵ = evaluate (ampl. control, args... ; vals_dict )
330- S = evaluate (ampl. shape, args... ; vals_dict )
328+ function evaluate (ampl:: ShapedParametrizedAmplitude , args... ; kwargs ... )
329+ ϵ = evaluate (ampl. control, args... ; kwargs ... )
330+ S = evaluate (ampl. shape, args... ; kwargs ... )
331331 return S * ampl. parametrization. a_of_epsilon (ϵ)
332332end
333333
@@ -337,6 +337,11 @@ function Base.Array(ampl::ShapedParametrizedPulseAmplitude)
337337end
338338
339339
340+ function get_controls (ampl:: ParametrizedAmplitude )
341+ return (ampl. control,)
342+ end
343+
344+
340345function get_control_deriv (ampl:: ParametrizedAmplitude , control)
341346 if control ≡ ampl. control
342347 return ParametrizationDerivative (control, ampl. parametrization. da_deps_derivative)
0 commit comments