paraqeet.signal.waveform.Waveform#
- class paraqeet.signal.waveform.Waveform[source]#
Bases:
Optimizable,DifferentiableClassical electronics.
- __init__()#
Methods
__init__()Return all parameters of this class that can be optimized.
Compute the double derivative with respect to parameter and time.
get_time_gradient(times)Compute a signal envelopes time derivative.
get_value(times)Compute the output.
get_value_and_gradient(times)Compute the gradient of the _evaluate method.
set_all_optimizable_parameters(all_params)Set all optimizable parameters in the optimization.
set_optimizable_parameters(params)Set optimizable parameters for optimization.
Attributes
Get the optimizable parameters
Get the name of the parameter.
Get the optimizable parameters
- property all_optimizable_parameters: list[Quantity]#
Get the optimizable parameters
- Returns:
The list of all the optimizable parameters considered in the optimization
- Return type:
list[Quantity]
- abstract get_parameters()[source]#
Return all parameters of this class that can be optimized.
- Raises:
NotImplementedError – Subclasses derived from this class must implement this method.
- Return type:
list[Quantity]
- get_time_and_parameter_gradient(times)[source]#
Compute the double derivative with respect to parameter and time.
This function computes $\frac{\partial^2 \Omega}{\partial t \partial alpha}$ for a pulse $\Omega(t)$ and parameter $\alpha$.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns a vector signals time derivative.
- Return type:
Array
- get_time_gradient(times)[source]#
Compute a signal envelopes time derivative.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns a vector signals time derivative.
- Return type:
Array
- abstract get_value(times)[source]#
Compute the output.
- Parameters:
times (Array) – One-dimensional vector of timestamps or a single value.
- Returns:
Output of the computation.
- Return type:
Array
- get_value_and_gradient(times)[source]#
Compute the gradient of the _evaluate method.
Uses Automatic differentiation as a fallback. The _evaluate method should be a pure function (should take the optimizable parameters as function arguments and doesn’t depend on global variables). Refer to https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html for functionally pure functions. To implement analytical gradients / other methods for gradient computation overwrite this method in the inherited class.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns the gradient array of the _evaluate method.
- Return type:
Array
- property name: str | None#
Get the name of the parameter.
- Returns:
Name of the parameter.
- Return type:
str | None
- property optimizable_parameters: list[Quantity]#
Get the optimizable parameters
- Returns:
The list of optimizable parameters associated with the object.
- Return type:
list[Quantity]