Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/nulinspiratie/SilQ
Browse files Browse the repository at this point in the history
  • Loading branch information
nulinspiratie committed Dec 23, 2016
2 parents be62671 + 90d59c2 commit d4ad1be
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 126 deletions.
2 changes: 1 addition & 1 deletion Qcodes
160 changes: 42 additions & 118 deletions silq.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -6,131 +6,55 @@ Home-page: https://github.com/nulinspiratie/SilQ
Author: Serwan Asaad, Stefanie Tenberg
Author-email: [email protected]
License: Private
Description: # QCoDeS [![Build Status](https://travis-ci.com/qdev-dk/Qcodes.svg?token=H7MjHi74teZgv8JHTYhx&branch=master)](https://travis-ci.com/qdev-dk/Qcodes)

QCoDeS is a Python-based data acquisition framework developed by the Copenhagen / Delft / Sydney / Microsoft quantum computing consortium. While it has been developed to serve the needs of nanoelectronic device experiments, it is not inherently limited to such experiments, and can be used anywhere a system with many degrees of freedom is controllable by computer.

QCoDeS has taken inspiration from many similar frameworks that have come before it, including:
- [QTLab](https://github.com/heeres/qtlab)
- [Special Measure](https://github.com/yacobylab/special-measure)
- "Alex Igor Procedures" see [thesis](http://qdev.nbi.ku.dk/student_theses/pdf_files/A_Johnson_thesis.pdf) appendix D and [successors](http://www.igorexchange.com/project/Expt_Procedures)
- and countless smaller components created by students and postdocs throughout the quantum computing community

QCoDeS is compatible with Python 3.4+. It is primarily intended for use from Jupyter notebooks, but can be used from traditional terminal-based shells and in stand-alone scripts as well.
Although some feature at the moment are b0rken outside the notebook.

## Install

### PyPi
PyPi is the fastest way to install QCoDeS, will be avaiable once out of beta/private.

### Developer

We use virtualenv and pyenv to make sure all the system are the same, this rules out issues and the usual "it works on my machine".
Install virtual env (optionally virtualenvwrapper for convenience, if you are on linux) and pyenv according to your distribution.
Once all is installed, and working:

```bash
pyenv install 3.4.5
pyenv local 3.4.5
mkvirtualenv qcodes-dev -r develop_requirements.txt --python $HOME/.pyenv/versions/3.4.5/bin/python3.4
git clone https://github.com/qdev-dk/Qcodes.git $QCODES_INSTALL_DIR
cd $QCODES_INSTALL_DIR
pip install -r develop_requirements.txt
pip install -e .
python qcodes/test.py -f
```

If the tests pass you are ready to hack!
Note that sometimes the test suite because there is a bug somewhere in the mulitprocessing architecture.

This is the reference setup one needs to have to contribute, otherwise too many non-reproducible environments will show up.

### Anaconda

We recommend [Anaconda](https://www.continuum.io/downloads) as an easy way to get most of the dependencies out-of-the-box.

As the project is still private, install it directly from this repository:

- Install git: the [command-line toolset](https://git-scm.com/) is the most powerful but the [desktop GUI from github](https://desktop.github.com/) is also quite good

- Clone this repository somewhere on your hard drive. If you're using command line git, open a terminal window in the directory where you'd like to put QCoDeS and type:
```
git clone https://github.com/qdev-dk/Qcodes.git
```
#### the easy way
- Open the 'navigator' app that was installed with anaconda.
- On the left side click on "Environments".
- Then on the "import" icon, on the bottom.
- Pick a name, and click on the folder icon next to file to import from.
- Make sure you select "Pip requirement files" from the "Files of type" dialog then navigate to the qcodes folder and select `basic_requirements.txt`.
- Finally click import, and wait until done.
- The enviroment is now created, click on the green arrow to open a terminal inside it.
- Navigate again with the terminal (or drag and drop the the folder on OsX)
- Most likely you will want to plot stuff, so type:

`conda install matplotlib`

and after if you want qtplot

`conda install pyqtgraph`

- Then type
` pip install -e . `


Finally bring Giulio to Sabøtoren, Fensmarkgade 27, 2200 København N.


#### the not so easy way that often does not work

- Register qcoes with Python, and install dependencies if any are missing: run this from the root directory of the repository you just cloned:
```
python setup.py develop
```

Now QCoDeS should be available to import into all Python sessions you run. To test, run `python` from some other directory (not where you just ran `setup.py`) and type `import qcodes`. If it works without an error you're ready to go.

### Plotting Requirements

Because these can sometimes be tricky to install (and not everyone will want all of them), the plotting packages are not set as required dependencies, so setup.py will not automatically install them. You can install them with `pip`:

- For `qcodes.MatPlot`: matplotlib version 1.5 or higher
- For `qcodes.QtPlot`: pyqtgraph version 0.9.10 or higher

### Updating QCoDeS

If you registered QCoDeS with Python via `setup.py develop`, all you need to do to get the latest code is open a terminal window pointing to anywhere inside the repository and run `git pull`

## Usage

Read the [docs](http://qdev-dk.github.io/Qcodes) and the notebooks in [docs/examples](docs/examples)


## Contributing

See [Contributing](CONTRIBUTING.rst) for information about bug/issue reports, contributing code, style, and testing
See the [Roadmap](http://qdev-dk.github.io/Qcodes/roadmap.html) an overview of where the project intends to go.


## Docs

We use sphinx for documentations, makefiles are provied boht for Windows, and *nix.

Go to the directory `docs` and

Description: #SilQ

SilQ is a measurement software designed to control spin-based systems. It utilizes the QCoDeS data acquisition framework.


## Installation

### Install Python
1. Download [Anaconda 64bit python 3.5](https://www.continuum.io/downloads)
2. Install Anaconda (make sure to tick the options add to system path and register as python 3.5
### Install Github
1. Download and install [Github Desktop]9https://desktop.github.com/) and create a [Github account](https://github.com/)
2. Give Serwan your account details to add you to the private git repository
### Install SilQ+QCodes
1. Clone the repository [SilQ](https://github.com/nulinspiratie/SilQ) (includes QCodes) into your hard drive
(e.g. User/Documents/PythonSoftware) using the installed Github desktop
2. SilQ: Open Command prompt (type cmd into start menu and right click to open as administrator)
1. Navigate to SilQ folder on your computer (not SilQ/silq)
2. Run “python setup.py develop”
3. It will likely say that packages are missing (usually lmfit and peakutils).
Install these missing packages like instructed (conda (or pip) install lmfit and peakutils)
3. QCodes: Open command prompt, Navigate to the Qcodes folder on your computer (SilQ/Qcodes),
run ‘python setup.py develop’ and install missing packages (usually coverage and pyqtgraph)

## Using SilQ
The measurement software SilQ and QCodes can be imported as a package, just like any other python packages.
To use the measurement software in your script, use the following line
```
make html
import qcodes as qc
import silq
```

This generate a webpage, index.html, in `docs/_build/html` with the rendered html.
Documentation is updated and deployed on every successful build.

## Using GitHub
1. Commit your changes to the master branch including a meaningful heading and commentary
2. Sync with the master branch to get other people’s changes

## License
## Choosing an IDE
### PyCharm
1. Download, install, and open PyCharm Community Edition (or use the professional version which is free for students)
2. Open SilQ project
3. Go to file -> default settings -> project interpreter
4. Set interpreter to the newly installed Python Anaconda 3.5
5. Restart PyCharm

QCoDeS is currently a private development of Microsoft's Station Q collaboration, and IS NOT licensed for distribution outside the collaboration except by arrangement. We intend to release it as open source software once it is robust and reasonably stable, under the MIT license. See [License](LICENSE.md).
When using PyCharm, code must be executed in scripts. To run QCoDeS, write your commands after `if __name__ == "__main__":`

### Jupyter Notebook
should be already installed alongside Anaconda Python
Platform: UNKNOWN
Classifier: Development Status :: 1 - Alpha
Classifier: Intended Audience :: Science/Research
Expand Down
45 changes: 39 additions & 6 deletions silq.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
setup.py
silq/__init__.py
silq/configurations.py
silq/version.py
silq.egg-info/PKG-INFO
silq.egg-info/SOURCES.txt
Expand All @@ -10,17 +11,49 @@ silq.egg-info/top_level.txt
silq/analysis/__init__.py
silq/analysis/analysis.py
silq/analysis/fit_toolbox.py
silq/meta_instruments/HackInstrument.py
silq/instrument_interfaces/__init__.py
silq/instrument_interfaces/chip_interface.py
silq/instrument_interfaces/interface.py
silq/instrument_interfaces/AlazarTech/ATS_interface.py
silq/instrument_interfaces/AlazarTech/__init__.py
silq/instrument_interfaces/keysight/E8267D_interface.py
silq/instrument_interfaces/keysight/__init__.py
silq/instrument_interfaces/lecroy/ArbStudio1104_interface.py
silq/instrument_interfaces/lecroy/__init__.py
silq/instrument_interfaces/spincore/PulseBlasterESRPRO_interface.py
silq/instrument_interfaces/spincore/__init__.py
silq/meta_instruments/Lockin.py
silq/meta_instruments/PulseMaster_old.py
silq/meta_instruments/Pulsemaster.py
silq/meta_instruments/Simrack.py
silq/meta_instruments/VoltageControl.py
silq/meta_instruments/__init__.py
silq/meta_instruments/pulsemaster/PulseMaster.py
silq/meta_instruments/pulsemaster/__init__.py
silq/meta_instruments/chip.py
silq/meta_instruments/hack_instrument.py
silq/meta_instruments/layout.py
silq/meta_instruments/lockin.py
silq/meta_instruments/simrack.py
silq/meta_instruments/voltage_control.py
silq/meta_instruments/mock_instruments/__init__.py
silq/meta_instruments/mock_instruments/mock_ATS.py
silq/meta_instruments/mock_instruments/mock_acquisition_controller.py
silq/meta_instruments/mock_instruments/mock_arbstudio.py
silq/meta_instruments/mock_instruments/mock_instrument.py
silq/meta_instruments/mock_instruments/mock_pulseblaster.py
silq/parameters/__init__.py
silq/parameters/acquisition_parameters.py
silq/parameters/general_parameters.py
silq/parameters/instrument_parameters.py
silq/parameters/loop_parameters.py
silq/parameters/measurement_parameters.py
silq/pulses/__init__.py
silq/pulses/pulse_modules.py
silq/pulses/pulse_types.py
silq/tests/__init__.py
silq/tests/test_gui.py
silq/tests/test_instruments.py
silq/tests/test_parameters.py
silq/tools/__init__.py
silq/tools/data_tools.py
silq/tools/ring.py
silq/tools/fit_toolbox.py
silq/tools/general_tools.py
silq/tools/instrument_tools.py
silq/tools/notebook_tools.py
2 changes: 2 additions & 0 deletions silq.egg-info/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ pyvisa>=1.8
IPython>=4.0
ipywidgets>=4.1
h5py>=2.6
pyperclip>=1.5
ipympl>=0.0.2

[Non-Linear Least-Squares Minimization and Curve-Fitting]
lmfit>=0.9.5
Expand Down
58 changes: 58 additions & 0 deletions silq/tests/test_gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import time
from threading import Thread
from winsound import Beep
import sys
from PyQt4 import QtGui

from qcodes.process.server import BaseServer


class GUIServer(BaseServer):
def __init__(self, query_queue, response_queue, extras=None):
super().__init__(query_queue, response_queue, extras)

app = QtGui.QApplication(sys.argv)
self.gui = ExampleGui(query_queue, response_queue)
sys.exit(app.exec_())

def handle_add_text(self, text):
self.example_gui.add_text(text)

class ExampleGui(QtGui.QMainWindow):
def __init__(self, query_queue, response_queue):
super().__init__()

self.initUI()
self.textEdit.append('hi')

def initUI(self):
textEdit = QtGui.QTextEdit()
self.setCentralWidget(textEdit)
self.textEdit = textEdit

exitAction = QtGui.QAction(QtGui.QIcon('exit24.png'), 'Exit', self)
exitAction.setShortcut('Ctrl+Q')
exitAction.setStatusTip('Exit application')
exitAction.triggered.connect(self.close)

self.statusBar()

menubar = self.menuBar()
fileMenu = menubar.addMenu('&File')
fileMenu.addAction(exitAction)

toolbar = self.addToolBar('Exit')
toolbar.addAction(exitAction)

self.setGeometry(300, 300, 350, 250)
self.setWindowTitle('Main window')
self.show()

def add_text(self, text):
self.textEdit.append(text)

def create_gui(*args, **kwargs):
app = QtGui.QApplication(sys.argv)
example_gui = ExampleGui(*args, **kwargs)

sys.exit(app.exec_())
5 changes: 4 additions & 1 deletion silq/tests/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ def __init__(self, name, **kwargs):
vals=vals.Anything())

def set_x(self, val):
self.x = val
self.x = val

def print(self):
print('printing from test instrument')

0 comments on commit d4ad1be

Please sign in to comment.