{ "info": { "author": "RWTH Aachen Quantum Technology Group", "author_email": "julian.teske@rwth-aachen.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Topic :: Scientific/Engineering :: Physics" ], "description": "# qtune Readme: Introduction\nThe qtune package contains tools for the setup of a general optimization program. It is originally designed for the \nautomatic fine-tuning of semiconductor spin qubits based on gate defined quantum dots, but applicable to general \noptimization problems with dependent target parameters. \nAn interface to the physical back-end must be provided. With this back-end, control \nparameters (here assumed to be voltages) are set and target parameters are measured. \nClass names are written **bold** and functions *cursive* throughout the readme. UML class diagrams are inserted to show \nthe heritage and dependencies, and UML activity diagrams visualize function calls.\nThe package abbreviations are pd for pandas and np for numpy.\n\n# Installation\nqtune is compatible with Python 3.5+. \nFor development we recommend cloning the git repository\n[https://github.com/qutech/qtune](https://https://github.com/qutech/qtune) and installing by:\n\n python setup.py develop\n\nIt can also be installed as pip package:\n\n pip install qtune\n\n# Interface of the Physical Back-End\nThe core features of this program package do not require a specific structure of the measurement software. This section \nconcerns only the required interface of the physical back-end.\nThe **Experiment** class serves as abstraction of the physical experiment. It provides an interface to the control \nparameters with two functions called *read_gate_voltages*() and *set_gate_voltages*(new_voltages). The function\n*set_gate_voltages*(new_voltages) returns the voltages it has actually set to the experiment, which is useful if the\nhardware connected to the physical experiment uses a different floating point accuracy, or the **Experiment** is \nordered to set voltages exceeding physical or safety limits.\n\nThe **Evaluator** class provides the function *evaluate*() which returns a fixed number of parameters and a measurement\nerror, which is interpreted as the variance of the evaluation.\n\n# Proposed Measurement and Evaluation Structure\nThe implementation of a physical back-end, as contained in the qtune package, should be regarded as proposal.\n\nThe **Experiment** provides the function *measure*(**Measurement**), which receives an instance of the **Measurement** \nclass and returns the raw data.\nThe **Measurement** contains a dictionary of data of any type used to define the physical measurement.\nThe **Evaluator** class calls the function **Experiment**.*measure*(**Measurement**) to initiate the physical \nmeasurements. It contains a list of \n**Measurements** and the analysis software required to extract the parameters from the raw data returned by the \nexperiment. This could be for example a fitting function or an edge detection. \n\n[evaluation image]: docs/_static/resources/EvaluationParameter.png\n[autotuner coordination]: docs/_static/resources/AutotunerCoordination.png\n[newton solver gradient]: docs/_static/resources/NewtonSolverGradient.png\n[tuner solver]: docs/_static/resources/TunerSolver.png\n[autotuner flow]: docs/_static/resources/AutotunerFlow.png\n\n![UML class diagram depicting the dependencies of the **Evaluator**. The **Measurements** stores the instructions\nfor the **Experiment** in the dictionary called options. When *evaluate*() is called on the Evaluator, it calls \n*measure*(**Measurement**) on the **Experiment**.][evaluation image]\n\n# Parameter Tuning\nThis section describes how the dependency between parameters is taken into account.\nThe parameters are grouped by instances of the **ParameterTuner** class. Each group is tuned simultaneously, i.e. \ndepends on the same set of distinct parameters. The dependencies are assumed always one directional and static. The\n**Autotuner** structures the groups of parameters in an hierarchy, which is represented as list of **ParameterTuners**.\n\nConsider the following example from the tuning of a quantum dot array.\nImagine the following hierarchy consisting of three groups of parameters i.e. three **ParameterTuners**:\n\n1. Contrast in the Sensing Dot Signal\n2. Chemical Potentials / Positions of the Charge Stability Diagram\n3. Tunnel Couplings\n\nAll scans require a good contrast in the sensing dot for an accurate evaluation of the parameters. Therefore the \ncontrast in the sensing dot signal is the first element in the hierarchy. The measurement of tunnel couplings requires\nknowledge of the positions of transitions in the charge diagram. If the chemical potentials change, the charge \ndiagram is shifted, therefore the position of the charge diagram i.e. the chemical potentials must be tuned before the \ntunnel couplings. \n\n![UML class diagram depicting the dependencies of the **Autotuner**. When the **Autotuner** calls \n*is_tuned*(current_voltages), the **ParameterTuner** calls *evaluate*() on its list of evaluator and returns True if\nthe parameter values are within the desired range. The **Autotuner** calls also *get_next_voltages*() and sets these\nvoltages on the experiment.][autotuner coordination]\n\nA **ParameterTuner** suggests voltages to tune the parameters in his group. \nIt can be restricted to use any set of gates. It can also slice the voltage corrections \nto restrict the step size so that the algorithm is less vulnerable to the non-linearity of the target parameters. \nThe tuning of a group of parameters does ideally not detune the parameters which the group depends on i.e. which are \nhigher in the hierarchy.\n\nThe **Autotuner** \nclass handles the coordination between the groups of parameters in the following sense. It decides which group of \nparameters must currently be evaluated or tuned and calls the **ParameterTuner** to evaluate the corresponding\ngroup of parameters or to suggest new voltages. It also sets the new voltages on the Experiment.\nIt works as finite-state machine as described in the UML activity diagram below. \n\n![UML activity diagram of the tuning on the level of the **Autotuner**. n is the current index in the tuning hierarchy. \nThe index n is incremented every time every time the parameters of the **ParameterTuner** at index n is tuned. Otherwise\nthe voltages suggested by this **ParameterTuner** are set to the **Experiment** and the index is reset to 0.\n][autotuner flow]\n\n# Optimization Algorithms\n\nThe voltage steps of each **ParameterTuner** are calculated by its member instance of the **Solver** class. This class \ncan implement any optimization algorithm e.g. Nelder-Mead or Gauss-Newton algorithm. \nGradient based **Solvers** like the Gauss-Newton algorithm use a instance of the **GradientEstimator** class for the\ncalculation of the gradient of target parameter. \n\n![UML class diagram depicting the dependency between the **ParameterTuner** and the **Solver**. Any time the function\n*is_tuned*() is called by the **Autotuner**, the **ParameterTuner** calls *evaluate*() and uses *update_after_step*() to\nupdate the **Solver** with the measured values. When *get_next_voltages*() is called on the **ParameterTuner**, it calls\n*suggest_next_position()* on the Solver.][tuner solver]\n\nThe **GradientEstimator** subclasses implement different methods for the gradient estimation. One example is the \nKalman filter in the **KalmanGradientEstimator**. This is an algorithm which calculates updates on the gradient by \ninterpreting each measurement as finite difference measurement with respect to the last voltages. The accuracy of the\nparameter evaluation is then compared to the uncertainty of the estimation of the gradient in order to find the \nmost likely gradient estimation. Thereby, the gradient estimation is described as multidimensional normal distribution,\ndefined by a mean and a covariance matrix. If the covariance becomes to large in a certain direction, the \n**KalmanGradientEstimator** suggests a tuning step in the direction of the maximal covariance. This tuning step does not\noptimize any parameter but should be understood as finite difference measurement.\n\n![UML class diagram depicting the dependencies between the **NewtonSolver** and various **GradientEstimator** \nsubclasses. The subclasses **FiniteDifferenceGradientEstimator** and **KalmanGradientEstimator** implement the \nestimation of the gradient by finite difference measurements and updates with the Kalman filter respectively.\nThe class**SelfInitializingKalmanEstimator** combines the two approaches by calculating the initial gradient using \nfinite differences and subsequently the Kalman filter for updates.][newton solver gradient]\n\nThe crucial point in the optimization of non orthogonal systems is the ability to tune certain parameters without\nchanging the other ones. This requires communication between the **Solver** instances. Different **Solvers** can \ntherefore share the same instances of the **GradientEstimators** so that they know the dependency of these parameters\non the gate voltages. \n\nFurthermore, the **Autotuner** communicates which parameters are already tuned to the **ParameterTuners**. A \n**ParameterTuner** can share this information with it's **Solver**, which then calculates update steps\nin the null space of the gradients belonging to parameters which are tuned by another **ParameterTuners**. \nA **Solver** also passes this information on to it's **GradientEstimators**, which calculate the gradients only in the \nmentioned null space.\n\n# Getting Started\nThe IPython notebook \"setup_tutorial.ipynb\" gives a detailed\ntutorial for the setup of an automated fine-tuning program. The physical back-end is replaced by a simulation to enable\nthe tutorial to be executed before the connection to an experiment. \nIn this simulated experiment, a double quantum dot and a sensing dot are tuned. The tuning hierarchy is given by \n\nThe **ParameterTuners** and **Solvers** which are used in the setup serve as an illustrative example.\nThey are structured in the tuning hierarchy:\n\n1. the sensing dot \n2. the x and y position of the charge diagram\n3. two parameters, being the inter dot tunnel coupling and the singlet reload time \n\nThe gates of the sensing dot are assumed to have only an negligible effect on the positions and \nparameters. Therefore the **Solver** of the sensing dot is independent of the others. The other gates are simultaneously\ntuning the positions and parameters. The positions and parameters are tuned by **ParameterTuners** restricted to the\nsame gates and their **Solver** instances share all **GradientEstimators**. The **GradientEstimators** belonging to the \nparameters estimate the gradients only in the null space of the gradients belonging to the positions.\n\n# Features\n## Storage\nAfter each evaluation of parameters, change in voltages or estimation of gradients, \nthe full state of all classes except for the experiment is serialized and stored \nin an HDF5 file. The full state of the program can be reinitialized from any library file. This way, \nthe program can be set back to any point during the tuning. The **History** class \nadditionally saves all relevant information for the evaluation of the performance. The **History** class can plot the\ngradients, last fits, control and target parameters.\n## GUI\nFor real-time plotting of parameters and gradients, the user can couple the **History** and the\n**Autotuner** to the GUI. The GUI automatically stores the program data in the HDF5 library and lets the user start and\nstop the program conveniently. The program can also be ordered to execute only one step at a time. The program is \nlogging its activity and the user can chose how detailed the logging describes the current activity by\nsetting the log level. \n# Naming Convention\n## Voltages\nare used in the Evaluator class to describe the voltages on the gates in the experiment.\n## Positions\nare an abstraction of gate voltages in the Gradient and Solver classes. These classes\ncould not only be used for the tuning algorithm but they could be reused in any gradient \nbased solving algorithm.\n## Parameters\ncorrespond to properties of the physical experiment. They are extracted from the measurement data \nby the Evaluator class and handed over to the ParameterTuner class.\n## Values\nare the abstraction of parameters in the Gradient and Solver classes.\n## Options\ndescribe the measurements in the Measurement class.\n\n# License\n Copyright (c) 2017 and later, JARA-FIT Institute for Quantum Information,\n Forschungszentrum J\u00c3\u00bclich GmbH and RWTH Aachen University\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/qutech/qtune", "keywords": "autotune quantum", "license": "GNU GPLv3+", "maintainer": "", "maintainer_email": "", "name": "qtune", "package_url": "https://pypi.org/project/qtune/", "platform": "", "project_url": "https://pypi.org/project/qtune/", "project_urls": { "Homepage": "https://github.com/qutech/qtune" }, "release_url": "https://pypi.org/project/qtune/0.1.0/", "requires_dist": [ "pandas", "numpy", "filterpy", "scipy", "h5py", "sympy" ], "requires_python": "", "summary": "Quantum dot auto tune framework", "version": "0.1.0" }, "last_serial": 4873843, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fba0bc0bd1e758ffd147378e1c8fd9c8", "sha256": "51ce9ae2984e684651d370bd4d4a1588dfd140e577b176beaea533c8b74def31" }, "downloads": -1, "filename": "qtune-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fba0bc0bd1e758ffd147378e1c8fd9c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 75392, "upload_time": "2019-02-27T11:47:59", "url": "https://files.pythonhosted.org/packages/9d/1b/877f887f38999d8050239113dd0f5454fcd425df371cfb33a75cb773d438/qtune-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4e87b8e669def7284d2965e6e137d47", "sha256": "37bca9c088651dbea5c067c125deaea71450069264bdb3fc5286b2585d5ba5dd" }, "downloads": -1, "filename": "qtune-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a4e87b8e669def7284d2965e6e137d47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74319, "upload_time": "2019-02-27T11:48:02", "url": "https://files.pythonhosted.org/packages/00/2a/6d7a25662f7ad9801eaf7fb9b3242e16e79ebef0e6bd0c6a50abb30385b3/qtune-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fba0bc0bd1e758ffd147378e1c8fd9c8", "sha256": "51ce9ae2984e684651d370bd4d4a1588dfd140e577b176beaea533c8b74def31" }, "downloads": -1, "filename": "qtune-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fba0bc0bd1e758ffd147378e1c8fd9c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 75392, "upload_time": "2019-02-27T11:47:59", "url": "https://files.pythonhosted.org/packages/9d/1b/877f887f38999d8050239113dd0f5454fcd425df371cfb33a75cb773d438/qtune-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4e87b8e669def7284d2965e6e137d47", "sha256": "37bca9c088651dbea5c067c125deaea71450069264bdb3fc5286b2585d5ba5dd" }, "downloads": -1, "filename": "qtune-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a4e87b8e669def7284d2965e6e137d47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74319, "upload_time": "2019-02-27T11:48:02", "url": "https://files.pythonhosted.org/packages/00/2a/6d7a25662f7ad9801eaf7fb9b3242e16e79ebef0e6bd0c6a50abb30385b3/qtune-0.1.0.tar.gz" } ] }