zhinst / zhinst-qcodes

QCoDeS drivers for Zurich Instruments devices
MIT License
9 stars 10 forks source link

Fix synchronous set command (deep = True) should return the acknowledged value #48

Closed tobiasah closed 2 years ago

tobiasah commented 2 years ago

A synchronous value should return the acknowledged value by the device.

fixes #47

The problem is that QCoDeS itself does not support returning a value for a set command. This fix bypasses this value by buffering the value returned by toolkit for a set command. If it is not None it returns this value. To avoid a weird state in QCoDeS itself the returned value is routed through the get pipeline of QCoDes. This basically mimics the behavior of setting a value and the getting it right after that.

codecov-commenter commented 2 years ago

Codecov Report

Merging #48 (d6b27aa) into main (7a0656e) will increase coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   41.56%   41.59%   +0.02%     
==========================================
  Files          14       14              
  Lines         575      577       +2     
==========================================
+ Hits          239      240       +1     
- Misses        336      337       +1     
Impacted Files Coverage Δ
src/zhinst/qcodes/driver/devices/uhfqa.py 32.81% <0.00%> (-0.53%) :arrow_down:
src/zhinst/qcodes/driver/devices/shfqa.py 67.34% <0.00%> (ø)
src/zhinst/qcodes/driver/modules/__init__.py 100.00% <0.00%> (ø)
src/zhinst/qcodes/driver/modules/sweeper_module.py 55.00% <0.00%> (ø)
src/zhinst/qcodes/driver/modules/base_module.py 38.59% <0.00%> (+1.09%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.