qdev-dk / qdev-wrappers Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
After updating to the new dataset and latest version of qcodes (a few months since last update) we see quite a few warnings in the initialization at T3.
Should these be ignored or fixed in some way?
@Dominik-Vogel tagging you as I think you have been most involved with the decadac and R&S ZNB.
Requests not implemented in #83 before merge. Would eb good to have a discussion whether there is a reason not to implement if that is the choice.
I have a couple of request:
How do people feel about restructuring the repository? I know that this by default is pretty annoying but I think it would be a lot easier to use and save a lot of headache later. My ideas are
Would be nice if the history logging split the log file for each day rather than just having a single file.
The pythonlog part does this already.
Apparently, Invoke-WebRequest
fails on (ancient) powershell versions older than major version 3. The installation script could check the version and warn.
The former is depreciated so we should go through and replace.
When measuring and live plotting with multiple subplots the window with the plots does not resize itself to have reasonably sized subplots. Could we either make this configurable or set it to just do this to some good value automatically?
As discussed on slack; The do1d
and do2d
functions do not log any information about the sweeps they are starting. They ought to do that. In the core repo, the Loop
also has a few print
function calls that we should convert into log messages.
@qdev-dk/118
As far as I can see, the log level that is set int the qcodesrc is not used from within qcodes. Instead of setting the loglevel in the wrappers, here:
There is a bug with the numbering of channels on Qdac. Python starts counting channels at 0 while the channel outputs on the qdac are named 01-48.
So when setting in the config file 0 = name, .... The qdac output channel set by this line is Ch01.
can we delete this branch now? @jenshnielsen @Dominik-Vogel
it should be possible to choose which subplot you want to load or liveplot as often we want to save the data of multiple subplots but not actually liveplot all of them (eg alazar controllers currently plotting raw_data!)
Moving towards more and more parallel measurements it would be nice to have liveplotting done with the plots in two rows (or three). Doing measurements with 12 plots atm and gets pretty hard to see them all with them on one line.
If we dont fix it here it would be good to keep in mind for a future update to liveplotting in qcodes.
2018-04-22 18:58:28,331 - qdev_wrappers.sweep_functions - ERROR - Exception in doND
Traceback (most recent call last):
File "C:\Users\t3user\qdev-wrappers\qdev_wrappers\sweep_functions.py", line 167, in _do_measurement
_do_MatPlot(data,meas_params)
File "C:\Users\t3user\qdev-wrappers\qdev_wrappers\sweep_functions.py", line 188, in _do_MatPlot
plot.fig.tight_layout(pad=3)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\figure.py", line 1755, in tight_layout
self.subplots_adjust(**kwargs)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\figure.py", line 1633, in subplots_adjust
ax.update_params()
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\axes\_subplots.py", line 114, in update_params
return_all=True)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\gridspec.py", line 429, in get_position
gridspec.get_grid_positions(fig)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\gridspec.py", line 90, in get_grid_positions
subplot_params = self.get_subplot_params(fig)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\gridspec.py", line 376, in get_subplot_params
hspace=hspace)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\figure.py", line 193, in __init__
self.update(left, bottom, right, top, wspace, hspace)
File "C:\Users\t3user\Anaconda3\envs\qcodes\lib\site-packages\matplotlib\figure.py", line 228, in update
raise ValueError('left cannot be >= right')
ValueError: left cannot be >= right
@Dominik-Vogel Was wondering what your thoughts are about how to handle channels in the station configurator, maybe there could be a nicer way than the current on where you have to dig into the parameters by name?
Liveplotting fails for measurement calls on channellist. Same error on both VNA channels and Alazar channels.
With many instruments the .yaml file can get quite long and the possibility for mistakes fairly high over time. Recently had two instruments in the .yaml file duplicated without any errors.
Currently the code ignores the first one in the .yaml file and initialises with the last entry of a given name.
I propose that a check is added to the station configurator such that an error is raised if not all entries in the .yaml file have unique names.
StationConfigurator doesn't import port settings from the configuration file, required for e.g. the magnets (qcodes.instrument_drivers.american_magnetics.AMI430). Proposed minimal fix: add
if 'port' in instr_cfg:
init_kwargs['port'] = instr_cfg['port']
right after
if 'address' in instr_cfg:
init_kwargs['address'] = instr_cfg['address']
Following the discussion with @Dominik-Vogel and @ThorvaldLarsen I wrote these down so we wouldn't forget them and we can in some cases go ahead an implement and in others maybe discuss a bit.
As seen in the lab:
When creating a new parameter that is a scaled version of an existing parameter, the validation of the new parameter's values does not correctly match the scaling. As an example, we consider the DummyInstrument
. We recall that the "gates" by default have validators <Numbers -800<=v<=400>
.
instruments:
dummy:
driver: qcodes.tests.instrument_mocks
type: DummyInstrument
init:
gates: ['ch1', 'ch2']
enable_forced_reconnect: true
parameters:
ch1:
alias: mygate
scale: 0.001
unit: mV
Now, in python
from qdev_wrappers.station_configurator import StationConfigurator
scfg = StationConfigurator('MFE_conf.yaml')
dummy = scfg.load_instrument('dummy')
if we set dummy.mygate(500)
, we get a ValueError
that the value is out of bounds, although this would correspond to only 0.5 volts on the instrument. Similarly, if we had scaled the value up in the yaml file, we would now be allowed to exceed the safety range defined by the instrument driver.
@jenshnielsen @ThorvaldLarsen @nataliejpg See below a profile of a measurement I am doing with the Alazar card. The bottomline is:
For reference, a naïve implementation of the demodulation routine (a single matrix product) takes a couple hundred ms. Some suggestions for optimization are:
1586515 function calls (1582362 primitive calls) in 138.488 seconds
Ordered by: cumulative time
List reduced from 1184 to 100 due to restriction <100>ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 138.488 138.488 {built-in method builtins.exec}
1 0.003 0.003 138.488 138.488 :1()
1 0.013 0.013 138.486 138.486 scan.py:57(do2d)
42/40 0.000 0.000 126.577 3.164 parameter.py:252(call)
128/9 0.001 0.000 126.499 14.055 parameter.py:330(get_wrapper)
1 0.000 0.000 126.496 126.496 alazar_multidim_parameters.py:99(get_raw)
1 0.005 0.005 126.496 126.496 ATS.py:616(acquire)
211 96.024 0.455 96.024 0.455 ATS.py:915(_call_dll)
1 0.575 0.575 13.981 13.981 ATSChannelController.py:264(post_acquire)
1 1.254 1.254 13.405 13.405 ATSChannelController.py:295(handle_alazar_channel)
1 0.375 0.375 12.384 12.384 ATSChannelController.py:196(pre_start_capture)
1 9.690 9.690 11.986 11.986 demodulator.py:53(init)
138 9.091 0.066 9.091 0.066 {method 'commit' of 'sqlite3.Connection' objects}
112 0.002 0.000 8.151 0.073 sqlite_base.py:237(atomic_transaction)
2 0.004 0.002 7.287 3.644 measurements.py:184(flush_data_to_database)
2 0.000 0.000 7.284 3.642 data_set.py:357(add_results)
2 0.003 0.002 7.278 3.639 sqlite_base.py:397(insert_many_values)
1 0.000 0.000 7.163 7.163 measurements.py:287(exit)
1 0.026 0.026 5.597 5.597 ATSChannelController.py:366(_to_volts)
1 5.570 5.570 5.570 5.570 acq_helpers.py:4(sample_to_volt_u12)
1 4.288 4.288 5.400 5.400 demodulator.py:90(demodulate)
100 4.088 0.041 4.088 0.041 ATSChannelController.py:254(handle_buffer)
1 0.000 0.000 3.530 3.530 measurements.py:241(enter)
4 3.408 0.852 3.408 0.852 numeric.py:1076(outer)
4 0.000 0.000 2.708 0.677 data_set.py:241(add_parameter)
4 0.000 0.000 2.705 0.676 sqlite_base.py:1101(add_parameter)
161 0.001 0.000 1.865 0.012 sqlite_base.py:214(transaction)
161 1.742 0.011 1.864 0.012 {method 'execute' of 'sqlite3.Cursor' objects}
24 0.000 0.000 1.628 0.068 contextlib.py:85(exit)
56 0.000 0.000 1.628 0.029 {built-in method builtins.next}
46 0.000 0.000 1.628 0.035 sqlite_base.py:264(atomic)
2495 1.162 0.000 1.162 0.000 {method 'reduce' of 'numpy.ufunc' objects}
2 0.000 0.000 1.155 0.577 fromnumeric.py:2806(mean)
2 0.000 0.000 1.154 0.577 _methods.py:53(_mean)
4 0.000 0.000 1.081 0.270 sqlite_base.py:1140(_add_parameters_to_layout_and_deps)
Could be in the yaml file, but also make a function monitor.add_all_pars_from_instr(instr_ref)
:)
@Dominik-Vogel
I think we should reformat the custom instruments file into a folder instead i.e. a Custom instruments folder that has files such as Decadac_cQED, ZNB_cQED, qDac_cQED... This way it is easy to get an overview of what instruments have extended and in PR's it is easy to see which instruments are affected.
Several places throughout qdev-wrappers the wrappers logger module is imported.
These should be updated to call the qcodes logger with updated function names (at the moment anytime one imports qdev-wrappers it prints the deprecation warning added in #168).
@Dominik-Vogel tagging you, as I think you have the best overview of the differences between the two logger modules in case one cant just simply replace the import call everywhere.
It would be nice to have the option to do a full station update at the beginning of each do1d/do2d scan. This is especially useful when having virtual instruments that inherits parameters from other instruments.
F.ex. I make a qc.Parameter() that changes two channels on the qdac. When sweeping this parameter the metadata of the qdac is not updated meaning the saved voltages are wrong.
Would be nice to have a few more example scripts and maybe also a readme or similar for the workflow (ie you should install XYZ, make a copy of the templates folder in M location, make L changes and then run N script to get started measuring) with explanation of how it all works etc.
Examples which would be nice:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.