DiCarloLab-Delft / PycQED_py3

Python3 version of PycQED using QCoDeS as backend
MIT License
67 stars 41 forks source link

Added functionality to use asynchronous versions of the setter functions to speed up device configuration #653

Closed nielshaandbaek closed 2 years ago

nielshaandbaek commented 3 years ago

The purpose of this PR is to add support for setting device settings faster by not waiting for a response from the server. The functionality is implemented using asyncBegin and asyncEnd added to the base class of the ZI drivers. Use the functionality like this:

uhf = UHFQC(...)
uhf.asyncBegin()
uhf.sigouts_0_on(1)
uhf.sigouts_1_on(1)
uhf.sigouts_0_imp50(True)
uhf.sigouts_1_imp50(True)
uhf.asyncEnd()

The driver will wait for all the writes to complete after asyncEnd() is called.

Fixes #192.

Changes proposed in this pull request:

@mention the name of someone you want to review this pull request.

In order for the pull request to be merged, the following conditions must be met:

Whenever possible the pull request should

Tests are not mandatory as this is generally hard to make for instruments that interact with hardware.

nielshaandbaek commented 2 years ago

Unfortunately, our API does not currently have asynchronous versions of the functions that setc and setv map to, namely setComplex and setVector. Therefore, I couldn't implement the functionality for those functions.