[Improvement] Add Abstract class(ABC) for MeasurementControl.settable() and MeasurementControl.gettable()
Description
Add abstract class that defines the interface for:
class BaseParameter(object):
@abstractmethod
def prepare(self) -> None:
pass
...
- Property:
.batched (default=False)
- Method:
.prepare() -> None
- Method:
.finish() -> None
Motivation
Due to the nature of quantify
as a software framework it should have defined clear interfaces for its users.
The input parameter for MeasurementControl.settable(...)
and MeasurementControl.gettable(...)
is clearly defined.
settable_pars
or gettable_pars
is a list
or tuple
.
from typing import Union, List
def settables(self, settable_pars: Union[List[BaseParameter], Tuple[...] ]):
...
def gettables(self, gettable_pars: Union[List[BaseParameter] ...):
...
Utimately improving:
- autocompletion
- readability
- ability to reference to in the docs
Edited by Thomas Reynders