-
Couldn't load subscription status.
- Fork 20
Instrument server documentation #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,12 @@ This will open the GUI of the server and start running it. | |
|  | ||
|
|
||
| !!! note | ||
| The server can be run without a gui by passing the `--gui False` argument. | ||
| The server can be run without a gui by passing the `--gui False` argument. | ||
|
|
||
| If running the instrumentserver without the gui, the gui can be opened separately using the following command: | ||
| ```bash | ||
| $ instrumentserver-detached | ||
| ``` | ||
|
|
||
| By default, instrumentserver listens to the local host IP address (127.0.0.1) and the port 5555. To be able to communicate | ||
| with the server through other devices in the network we have to specify the IP address we want the server to listen to. | ||
|
|
@@ -141,3 +146,82 @@ Changing things in the GUI will also be reflected in the code. | |
| Changing something from the GUI only changes the code if we are calling the parameter manager directly. | ||
| If we store a value in a separate variable and then change the GUI, the value in the variable might not get update. | ||
| Because of this, we always recommend to call the Parameter Manager directly instead of saving the values in variables. | ||
|
|
||
| ## Config Files | ||
|
|
||
| The instrumentserver also contains functionality for config files. These config files contain set-up for QCoDeS instruments. These config files can then be used by the instrumentserver | ||
| on start-up to have the desired instruments already created without having to manually add them after starting the server. | ||
|
|
||
| To open the instrument server with a config file, we can use the '-c' flag to specify a config file, followed by the path to the config file: | ||
|
|
||
| ```bash | ||
| $ instrumentserver -c serverConfig.yml | ||
| ``` | ||
|
|
||
|
|
||
| Below is a sample config file to initialize a DummyInstrument and an Oxford Triton dilution refrigerator | ||
|
|
||
| `instruments`: this field will contain each instrument you wish to create. Under this field should be the names of each instrument you are creating | ||
|
|
||
| `type`: This specifies which QCoDeS driver the instrumentserver should use to create the instrument. Can either be a local file or a community-created driver | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it has to be the python import path. If they put a path this will not work. The only way to passing this to a file is if they have that file in a package that install in editable mode. |
||
|
|
||
| `address`: the tcp/ip address of the instrument on the same network as the instrumentserver | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is whatever the instrument uses as an address. Sometimes its a tcp/ip other times a usb adress others a serial port or even the serial number if that driver uses that |
||
|
|
||
| `port`: which port (of the instrument) to communicate with (can generally be found in the manual of the instrument) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not part of the defaults arguments. This is specific to that instrument and that is why you need to put it inside of the |
||
|
|
||
| ```yaml | ||
| instruments: | ||
| dummy_instrument_random_number: | ||
| type: instrumentserver.testing.dummy_instruments.generic.DummyInstrumentRandomNumber | ||
| initialize: True | ||
| fridge_test: | ||
| type: labcore.instruments.qcodes_drivers.Oxford.triton.OxfordTriton | ||
| address: 192.168.999.999 | ||
| init: | ||
| port: 33576 | ||
| ``` | ||
|
|
||
| This is the result of running the instrument server with this config file: | ||
|
|
||
|  | ||
|
|
||
| ### Parameter Manager with Config Files | ||
|
|
||
| The instrumentserver also comes with the virtual instrument Parameter Manager. | ||
| The Parameter Manager allows us to store values in an instrument inside of the Instrumentserver, allowing access from any process or device in the same network. | ||
| The idea of it is to have a single source of truth for parameters whose values change frequently, and it provides a GUI from which you can change the values and easily see what they are. | ||
|
|
||
| The following is an example config file to add the parameter manager as a virtual instrument | ||
|
|
||
| ```yaml | ||
| instruments: | ||
| parameter_manager: | ||
| type: instrumentserver.params.ParameterManager | ||
| initialize: True | ||
| gui: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add the parameter manager with the custom GUI in the example before so you can mention how the instrumentserver supports custom gui's for instruments that need to be specified like this. |
||
| type: instrumentserver.gui.instruments.ParameterManagerGui | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
|
|
||
|  | ||
|
|
||
| The instrumentserver also supports loading parameters from a file. They can also be created manually either from the terminal or the GUI. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. replace the If you want to load parameters from file, then name of that file is important. Depending on the name it will either: not load the parameters, fully replace the parameters (add a warning about how they are all lost if that happens), make a new profile that you can switch to the other parameters there. |
||
|
|
||
|  | ||
|
|
||
| Below is an example of a parameter file | ||
|
|
||
| ```json | ||
| { | ||
| "parameter_manager.active.qubit": { | ||
| "unit": "", | ||
| "value": "qC" | ||
| }, | ||
| "parameter_manager.opx.const_amp": { | ||
| "unit": "", | ||
| "value": 5 | ||
| } | ||
| } | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeated
These config ...start on 2 sentences in a row.I think the wording is a little confusing. The instruments are not already created, instead the server will instantiate those instruments at startup. There is a minor difference there.