paraqeet.signal.waveform.Waveform#

class paraqeet.signal.waveform.Waveform#

Bases: Optimizable, Differentiable

Classical electronics.

__init__()#

Methods

__init__()

get_parameters()

Return all parameters of this class that can be optimized.

get_time_and_parameter_gradient(times)

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

all_optimizable_parameters

Get the optimizable parameters

name

Get the name of the parameter.

optimizable_parameters

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()#

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)#

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)#

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)#

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)#

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)#

Set all optimizable parameters in the optimization.

Parameters:
  • params (List[Quantity]) – List of optimizable parameters to be set.

  • all_params (list[Quantity])

Return type:

None

set_optimizable_parameters(params)#

Set optimizable parameters for optimization.

Parameters:

params (list[Quantity]) – Input list of parameters to be set.

Return type:

None