Package: autodepgraph
AutoDepGraphAutoDepGraph is a framework for using dependency graphs to calibrate a system. It is heavily inspired by"Physical qubit calibration on a directed acyclic graph".OverviewAutoDepGraph consists of two main classes, the CalibrationNode and the Graph.
Calibration is done by calling a node that one wants to execute, the node contains the logic required to satisfy the nodes it depends on (parents).A CalibrationNode contains:parametersstateGood (green): check passesneeds calibration (yellow): calibration is not up to date anymore and needs to be updatedBad (red): calibration or check has failedunknown (grayed): checks of the node should be runactive (blue): calibration or check in progressparents: the nodes it depends onchildren: nodes that depend on this nodecheck_function : name of function to be executed when check is called. This can be a method of another instrument.calibrate_function : name of function to be executed when calibrate is called. This can be a method of another instrument.calibration_timeout: time in (s) after which a calibration times out.functionexecute or callPerforms the logic of a node (check state, satisfy requirements) with the goal of moving to a "good" statecheckPerforms checks to determine and the state of a nodecalibrateExecutes the calibration routines of the nodeA Graph is a container of nodes, it is used for:new graphs can be created by instantiating a graph and then using the add_node method to define new nodes.loading and saving the graphreal-time visualization using pyqtgraphstate of the node determines color of a nodeif a node has no calibrate function defined it is a manual node and has a hexagonal instead of a circle as symbolmouseover information lists more properties (planned)ExamplesFor an introductory example see the example notebook. If you want to see how to use a specific function, see the tests located in the autodepgraph/tests folder.InstallationClone the repositoryinstall therequirementsnavigate to the repository and runpip install -e .verify success of installation by runningpy.testN.B. windows can be "problematic"Installation on windows is a bit more difficult, this relates mostly to the installation of pygraphviz. To install graphviz and pygraphviz on windows follow these steps:get the 64 bit version of, copy it to e.g., program files and add the bin folder to the system path.the 64 bit version lacks the libxml2.dll, you most likely have this from some other program. You can find this by searching forlibxml2.dllin the program files folder. After that just copy paste it to the bin folder of graphviz.get pygraphviz by downloading the master from github.Now you will need to edit pygraphviz/graphviz.i and pygraphviz/graphviz_wrap.c according to the changes athttps://github.com/Kagami/pygraphviz/tree/py3-windows-iobase. A reference can be found in the _install folderNext install usingpython setup.py install --include-path="C:\Program Files\graphviz-2.38_x64\include" --library-path="C:\Program Files\graphviz-2.38_x64\lib"then install autodepgraph and test the installation usingpy.testAcknowledgementsI would like to thank Julian Kelly for the idea of using a dependency graph for calibrations and for early discussions. I would like to thank Joe Weston for discussions and help in working out the initial design. I would like to acknowledge Livio Ciorciaro for disucssions and as a coauthor of this project.