nulinspiratie / SilQ

Software for quantum control of donor atoms in silicon
Other
6 stars 1 forks source link

Feature: optionally link parameters to settings script #106

Open nulinspiratie opened 5 years ago

nulinspiratie commented 5 years ago

Currently, more complex parameters (e.g. AcquisitionParameters) have a setup cell containing all the code for its initialization, plus its settings can be easily modified, which will also be applied during the next initialization. While it's not a bad solution, there are some minor issues with this:

One potentially better solution is to link a parameter to a specific settings script.
In this case, the settings script is run during initialization (silq.initialize or silq.run_scripts), and can be edited and run again via the parameter.

IPython magic

Additionally, via IPython magics, a command such as %%parameter.modify_settings can be run, in which case the cell's code will transform into the settings script. It can then be modified, and when it's executed, it will also be saved to the settings script. An additional check could be implemented that verifies that the settings script hasn't been modified in the mean time. Furthermore, upon executing the cell containing the setting script, it can again be transformed back to the original code %%parameter.modify_settings to limit the notebook bulkiness

nulinspiratie commented 5 years ago

Perhaps this should be combined with a similar topic: initializing a silq environment.

At the moment this happens in two ways:

The functionality of these additional scripts are quite similar to the proposed parameter scripts, and so maybe a new approach to initialization should be designed.

Proposed initialization and settings design

Remove the initialize folder, and place everything in the scripts folder instead.
This scripts folder can have different folders for different initialization modes (measurement, analysis etc). These subfolders can themselves also contain folders (parameters etc.) Which will be run by default the respective mode

Additionally, there are scripts that need to be run regardless of the mode.

Also let the file execution order no longer depend on the numerical prefix.