Suggestion for restructure of pulse/acquisition libraries
Issue spawned as a result of suggestions made by @mjwoudstra.
Proposal:
Replace the user dict implementation of the pulse and acquisition library by a python dataclass.
Based on Martin's comments, I would suggest something like: upon adding it to the schedule, we add a str reference to the definition of the class itself and convert it to a dictionary. The class inherits from an abstract class that ensures the presence of a evaluate_waveform(t: numpy.ndarray) -> numpy.ndarray method. We could make use of dataclasses_json to aid in the serialization.
Then we can add a factory function that re-instantiates the class from the dictionary definition, which allows the function to be evaluated.