You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The present Drag is nothing else than the DRAG scheme applied to a Gaussian pulse, but it does not implement the general DRAG procedure.
This is similar to the case for the Iir filter, which adopts a different strategy, and currently wraps an entire other envelope.
One is related to a proper implementation of a general envelope-modifier scheme, and it's serialization. Wrapping an object like in the Iir is a potential solution, that would cater for the serialization, and Pydantic's duck-typing serialization may boost this strategy. Others may be taken into account.
The second challenge is specific to the DRAG scheme, which requires a derivative of the pulse itself to compute the Q component.
This can be achieved in multiple ways:
applying another auto-differentiation framework (e.g. JAX)
numerically, by
crude finite differences
a suitable Savgol filter, whose parameters may be
constant, optimized for the average use case
adaptive, taking into account the number of samples, or the sharpness of the original waveform's variations
The main complexity for this derivative affair is not much in the implementation, which are all pretty feasible for the proposed solution, but which is the optimality criterion for the final result (the main differences are expected for very short pulses, containing few samples - but even sampling the analytic derivative in those cases may be not the optimal solution).
Plugins
This is just about to allow the user to register further envelopes, allowing experimenting without the need of a full Custom every time, and retaining the original parametrization.
This now requires patching Qibolab itself.
Applying the same infrastructure of ConfigKinds it can be (easily enough) integrated with the serialization.
The text was updated successfully, but these errors were encountered:
The envelopes in the 0.2 release have been manipulated wrt their 0.1 counterpart, but no drastic change has been implemented.
In particular, there are a couple of leftover features that have been considered, but not realized
Envelopes extensions
Modifiers
The present
Drag
is nothing else than the DRAG scheme applied to a Gaussian pulse, but it does not implement the general DRAG procedure.This is similar to the case for the
Iir
filter, which adopts a different strategy, and currently wraps an entire other envelope.qibolab/src/qibolab/_core/pulses/envelope.py
Line 218 in 80bd287
There are two challenges in here.
One is related to a proper implementation of a general envelope-modifier scheme, and it's serialization. Wrapping an object like in the
Iir
is a potential solution, that would cater for the serialization, and Pydantic's duck-typing serialization may boost this strategy. Others may be taken into account.The second challenge is specific to the DRAG scheme, which requires a derivative of the pulse itself to compute the Q component.
This can be achieved in multiple ways:
diff
, over a generic callableThe main complexity for this derivative affair is not much in the implementation, which are all pretty feasible for the proposed solution, but which is the optimality criterion for the final result (the main differences are expected for very short pulses, containing few samples - but even sampling the analytic derivative in those cases may be not the optimal solution).
Plugins
This is just about to allow the user to register further envelopes, allowing experimenting without the need of a full
Custom
every time, and retaining the original parametrization.This now requires patching Qibolab itself.
Applying the same infrastructure of
ConfigKinds
it can be (easily enough) integrated with the serialization.The text was updated successfully, but these errors were encountered: