Package: labscript-suite
thelabscript suiteExperiment control and automation systemThelabscript suiteis a powerful and extensible framework for experimentcomposition,control,execution, andanalysis. Developed for quantum science and quantum engineering; deployable in laboratory and in-field devices. Also applicable to optics, microscopy, materials engineering, biophysics, and any application predicated on the repetition of parameterised, hardware-timed experiments.This is a metapackage for thelabscript suite. Formerly thelabscript suiteinstaller repository, prior to the packages being installable viaPyPIandAnaconda Cloud.Features:Flexible and automated oversight of heterogeneous hardware.The most mature and widely used open-source control system in quantum science.Multiple analysis-based feedback modes.Extensible plugin architecture (e.g. machine learning online optimisation).Readily integrates with other software, including image acquisition, analysis, and even other control systems.Compose experiments as human-readable Python code, leveraging modularity, revision control and re-use.Dynamic visualisation of experiment composition and results.Remote operation: different modules can run on physically separate hosts / single modules can be run on multiple hosts (including hardware supervisor,blacs).Auto-generating user-interfaces.High-level scripting: user-interface interaction can be programatically synthesised.Table of contentsInstalling thelabscript suiteRecent changes to thelabscript suiteProfile directoriesSecure communicationApplication shortcutsSource code structure (developer installation)Versioning (developer installation)BitBucket archiveContributing to thelabscript suiteIssue trackingRequest for developersCiting thelabscript suiteInstalling thelabscript suiteWe're excited to announce that accompanying the recent migration to GitHub,labscript suitecomponents are now distributed as Python packages onPyPIandAnaconda Cloud.This makes it far easier to get started using thelabscript suite, as you no longer require a Mercurial or Git installation (or any knowledge of version control software); components can be installed and upgraded using:pip: the standard package manager common to all Python distributions; orconda: a binary package and environment manager, part of theAnaconda Pythondistribution.For further information, please see thedocumentation, which includes information about both regular and developer (editable) installations of thelabscript suite.Recent changes to thelabscript suiteUpon migrating the code base to GitHub and publishing distributions on PyPI in April–May 2020, existing users should be aware of the following recent changes.Profile directoriesThelabscript suiteprofile directory, containing application configurations, logs, and user-side code, is now located by default in the current user's home directory, e.g. for a local user namedwkheisenbergthis is:C:\Users\wkheisenberg\labscript-suiteon Windows.~/labscript-suiteor/home/wkheisenberg/labscript-suiteon Linux and Mac OS X.A typical structure of the profile directory is:~/labscript-suite/
    ├── app_saved_configs/
    │   ├── default_experiment/
    ├── labconfig/
    ├── logs/
    └── userlib/
        ├── analysislib/
        ├── labscriptlib/
        ├── pythonlib/
        └── user_devices/This structure is created by calling the commandlabscript-profile-createin a terminal after installinglabscript-utils(per theinstallation instructions).Note:As oflabscript-suite/labscript-utils#37an editable installation can be located within the labscript-suite profile directory.Secure communicationInterprocess communication between components of thelabscript suiteis based on theZeroMQ(ZMQ) messaging protocol. We have supported secure interprocess communication via encrypted ZMQ messaging since February 2019 (labscript-utils 2.11.0).As of labscript-utils 2.16.0,encryted interprocess communication will be the default. If you haven't already, this means you'll need to create a new shared secret (orpre-shared key) as follows:Runpython -m zprocess.makesecretfrom the labconfig directory.Specify the path of the resultingshared_secretin your labconfig. For example:[security]shared_secret=%(labscript_suite)s/labconfig/zpsecret-09f6dfa0.keyCopy the same pre-shared key to all computers running thelabscript suitethat need to communicate with each other, repeating step 2 for each of them.Treat this file like a password; it allows anyone on the same network access tolabscript suiteprograms.If you are on a trusted network and don't want to use secure communication, you may instead set:[security]allow_insecure=TrueNotes:Steps 1 and 2 are executed automatically as part of thelabscript-profile-createcommand. However, for multiple hosts, step 3 above must still be followed to ensure the same public-key is used by all hosts runninglabscript suiteprograms.There is an outstanding issue with the ZMQ Python bindings on Windows (zeromq/pyzmq#1148), whereby encryption is significantly slower for Python distributions other thanAnaconda. Until this issue is resolved, we recommend that Windows users on an untrusted network use the Anaconda Python distribution (and installpyzmqusingconda install pyzmq).Application shortcutsOperating-system menu shortcuts, correct taskbar behaviour, and environment activation for the Python GUI applications (blacs, lyse, runmanager, and runviewer) is now handled by a standalone Python packagedesktop-app(per installation instructions above). This currently supports Windows and Linux (Mac OS X support is forthcoming).Source code structure (developer installation)Existing users who move to a developer (editable) installation, please note the following structural changes to thelabscript suitesource code:Each package has a top-level folder containing setup.py and setup.cfg used to build a distribution from source. The functional code base now resides in a subfolder corresponding to the name of the Python module, e.g. an editable installation might contain folders:<path-to-your-labscript-installation>/
├── blacs/
│   └── blacs/
├── labscript/
│   └── labscript/
├── labscript-devices/
│   └── labscript_devices/
├── labscript-utils/
│   └── labscript_utils/
├── lyse/
│   ├── lyse/
├── runmanager/
│   └── runmanager/
└── runviewer/
    └── runviewer/Package names (shared by repositories and top-level folders) are now hyphenated, e.g. labscript-devices and labscript-utils.Module names remain underscored, e.g. labscript_devices and labscript_utils.The mixing of hyphen and underscores is inelegant but conventional.All references to blacs are now lowercase.As installation no longer requires a separate package, the repository formerly named ‘installer’ has been renamed to ‘labscript-suite’, and is a metapackage for thelabscript suite(installing it viapip/condainstalls the suite).Versioning (developer installation)Aside from the maintenance branches documentedhere, versions of the labscript suite packages are introspected at run-time using either theimportlib.metadatalibrary (regular installations) orsetuptools_scm(developer installations). Thus any changes to an editable install will be traceable by local version numbers, e.g. editing the released version of a package with version 2.4.0 will result in 2.4.0dev1+gc28fe94, for example. This will help us diagnose issues users have with their editable installations.BitBucket archiveIn April–May 2020 thelabscript suitecode base was migrated from BitBucket to GitHub. All commit history and issues was preserved, however some repository metadata (such as pull request discussions) could not be migrated directly. As such, we have created an archived copy of everything that was on BitBucket. This includes:Issues (as they appear on BitBucket);Pull requests discussions;Commit comments for every labscript suite repository; andEvery public fork (as of 1st February, 2020).This archive can be found atbitbucket-archive.labscriptsuite.org(this page can take some time to load for the first time). Copies of every public fork of our repositories are atgithub.com/labscript-suite-bitbucket-archive. As this is an archive, we will not be transferring ownership of these repositories back to their original owners. However, should you wish to continue development on one of those repositories you can fork it into your own account through the GitHub web interface. Should you have uncommitted changes (or changes made after 1st February, 2020) that you wish to have archived, please contact us to discuss the best approach to including these. Please note that we are not recommending continuing development in such forks long term, due to the changes in package structure outlined above.Further information about migrating your own customisations of the labscript suite can be foundhere.Contributing to thelabscript suiteWe are very grateful for all the contributions users have made in the past decade to make thelabscript suitethe most widely used open-source experiment control and automation system in quantum science. These include development, suggestions, and feedback, and we look forward to this continuing on GitHub.Issue trackingThe issue tracking on GitHub is very similar to BitBucket, with the added advantage that you can add inter-repository issue references, e.g. referring tolabscript-suite/runmanager#68in any issue or pull request will link to the corresponding issue. We have imported all issues from the BitBucket repositories into the GitHub repositories. This import is not perfect (as each comment is now posted by Phil Starkey) but the comments have been modified to contain the original author attribution. We have also updated all links to files, pull requests, issues, and commits so that they point to the equivalent GitHub location and/or the archived copy of the data (as discussed above).Please use the issue tracker of the relevant GitHub repository for:Reportingbugs(when something doesn't work or works in a way you didn't expect);Suggestingenhancements: new features or requests;Issues relating toinstallation,performance, ordocumentation.For advice onhowto use the existing functionality of thelabscript suite, please use ourmailing list.Request for developersWe would like to reaffirm our invitation for users to directly contribute toward developing thelabscript suite. We have established a separate discussion forum on Zulip for discussing development direction and design. If you are interested in being a part of these discussions, and/or testing and merging pull requests, pleasereach out to us.Further guidance on contributing—including the branching model we use, and the procedure for issuing pull requests—can be found in thedocumentation.Citing thelabscript suiteIf you use thelabscript suiteto control your experiment or perform analysis, please cite one or more of the following publications:P. T. Starkey,A software framework for control and automation of precisely timed experiments.PhD thesis, Monash University (2019).@phdthesis{starkey_phd_2019,title={State-dependent forces in cold quantum gases},author={Starkey, P. T.},year={2019},url={https://doi.org/10.26180/5d1db8ffe29ef},doi={10.26180/5d1db8ffe29ef},school={Monash University},}C. J. Billington,State-dependent forces in cold quantum gases.PhD thesis, Monash University (2018).@phdthesis{billington_phd_2018,title={State-dependent forces in cold quantum gases},author={Billington, C. J.},year={2018},url={https://doi.org/10.26180/5bd68acaf0696},doi={10.26180/5bd68acaf0696},school={Monash University},}A scripted control system for autonomous hardware-timed experiments,Review of Scientific Instruments84, 085111 (2013). arXiv:1303.0080.@article{labscript_2013,author={Starkey, P. T. and Billington, C. J. and Johnstone, S. P. andJasperse, M. and Helmerson, K. and Turner, L. D. and Anderson, R. P.},title={A scripted control system for autonomous hardware-timed experiments},journal={Review of Scientific Instruments},volume={84},number={8},pages={085111},year={2013},doi={10.1063/1.4817213},url={https://doi.org/10.1063/1.4817213},eprint={https://doi.org/10.1063/1.4817213}}