-
Notifications
You must be signed in to change notification settings - Fork 320
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
Driver/ziuhfli #466
Driver/ziuhfli #466
Conversation
First commit providing a driver with a working sweeper. Needs refactorising the sweeper into a MultiParameter
Change the sweep from a normal instrument method into a MultiParameter Breaking Changes: execute_sweep no longer exists. All sweep data goes through the Sweep parameter.
@WilliamHPNielsen . We are testing a new piece of hardware from ZI that is based on the UHF-LI. We are using alpha version firmware so I expect the driver to change a lot. Nonetheless, Niels Bultink has implemented a way to auto generate the qcodes driver based on the ZI API. I think we probably have some useful snippets for you in our repo: https://github.com/DiCarloLab-Delft/PycQED_py3/tree/2Q_gates_branch/pycqed/instrument_drivers/physical_instruments/ZurichInstruments . I'd be curious to know what you think of it. |
Tidy code and remove whitespace
Add an example notebook explaining how to use the sweeper.
Correct the multiply-defined dict keys of the demodulator trigger.
@@ -45,6 +45,8 @@ def __init__(self, name, instrument, **kwargs): | |||
super().__init__(name, names=('',), shapes=((1,),), **kwargs) | |||
self._instrument = instrument | |||
|
|||
print('We rock out at git!') |
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.
lol @WilliamHPNielsen signature ? 🦄
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.
@giulioungaretti Boy better know! But actually, Jana promised to practice her git-fu by removing it before anyone saw it...
Finish Sigout parameters and start adding scope parameters.
To be cleaned later
Add a get function to the scope multiparameter and document this in the notebook.
Update the scope setpoints with reference and delay values.
Adjust the setpoints of the scope to match the expectations of the loop.
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.
the 🥞 arrived more to come later!
Args: | ||
name (str): The internal QCoDeS name of the instrument | ||
device_ID (str): The device name as listed in the web server. | ||
api_level (int): Compatibility mode of the API interface. Must be 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.
mmhm ? if it must be five why it's an argument ?
between the two must be made. | ||
|
||
TODOs: | ||
* Add the scope |
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.
Is it not added now ?
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.
yes
|
||
super().__init__(name, **kwargs) | ||
zisession = zhinst.utils.create_api_session(device_ID, api_level) | ||
(self.daq, self.device, self.props) = zisession |
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.
why a tuple ?
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.
why not?
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.
self.daq, self.device, self.props = zisession
# create (instantiate) an instance of each module we will use | ||
self.sweeper = self.daq.sweep() | ||
self.sweeper.set('sweep/device', self.device) | ||
# |
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.
⚡️ that hash
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.
oups
self.add_parameter('sweeper_units', | ||
label='Units of sweep x-axis', | ||
get_cmd=self.sweeper_param.get, | ||
get_parser=lambda x:sweepunits[x]) |
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.
does this really really work as expected ? @WilliamHPNielsen thinking about late binding of lambdas
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.
It does, we double checked.
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.
lovely
label='Sweep filter settling time', | ||
get_cmd=partial(self._sweep_getter, | ||
'sweep/settling/tc'), | ||
unit='dim. less.', |
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.
this or empty ? I may say that dimensionless has empty unit ? what you think ?
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.
empty
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.
<3
vals=vals.Enum('Time Domain', 'Freq Domain FFT') | ||
) | ||
|
||
# 1: Channel 1 on, Channel 2 off. 2: Channel 1 off, Channel 2 on, |
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.
maybe make it 3 lines i.e
1
2
3
?
'AU Polar 2': 129, | ||
} | ||
|
||
for demod in range(1,9): |
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.
definitely add a comment on the magic numbers ❤️ ! 🦄
Add a scope instance to the __init__ of the instrument.
Add requested docs
Author: William H.P. Nielsen <[email protected]> driver: ziuhfli (#466)
feature: Add a driver for the ZI UHF-LI
Add a driver implementing basic control of demodulator settings and access to the sweeper.
Minor tasks still needing to be completed:
Major tasks:
@giulioungaretti @jenshnielsen