paraqeet.signal.envelopes.GaussEnvelope#
- class paraqeet.signal.envelopes.GaussEnvelope(amplitude=None, t_final=None)[source]#
Bases:
EnvelopeCreate a simple Gauss envelope.
- _amplitude: Quantity
The amplitude of the envelope.
- _t_final: Quantity
The length in time of the envelope.
- _gradient_function: Callable | None
The function to calculate the gradient with respect to a set of previously defined parameters.
- _grad_arg_nums: tuple[int, …]
The identifying indices of which parameters to calculate the gradient with respect to.
Methods
__init__([amplitude, t_final])Get a list of parameters of the envelope.
Compute the double derivative with respect to parameter and time.
get_time_gradient(times)Compute a Gaussian signals time derivative.
get_value(times)Compute a Gaussian signal.
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 amplitude of the system.
Get the name of the parameter.
Get the optimizable parameters
Get the length of the tone.
- 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]
- property amplitude: Quantity#
Get the amplitude of the system.
- Returns:
Amplitude of the system.
- Return type:
- get_parameters()[source]#
Get a list of parameters of the envelope.
- Returns:
List of parameters of the envelope.
- 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 Gaussian signals time derivative.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns a vector gaussian signals time derivative.
- Return type:
Array
- get_value(times)[source]#
Compute a Gaussian signal.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns a vector gaussian signal.
- 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]
- set_all_optimizable_parameters(all_params)[source]#
Set all optimizable parameters in the optimization.