Skip to content
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

Merged
merged 18 commits into from
Mar 21, 2017
Merged

Conversation

WilliamHPNielsen
Copy link
Contributor

@WilliamHPNielsen WilliamHPNielsen commented Jan 26, 2017

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:

  • Coding style, typos, whitespace
  • Add example notebook
  • Add more "front panel" parameters

Major tasks:

  • Add the scope.

@giulioungaretti @jenshnielsen

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.
@AdriaanRol
Copy link
Contributor

@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.

WilliamHPNielsen and others added 7 commits January 26, 2017 17:49
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!')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol @WilliamHPNielsen signature ? 🦄

Copy link
Contributor Author

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...

jana-d and others added 5 commits February 20, 2017 13:31
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.
@giulioungaretti giulioungaretti modified the milestone: v0.1.3 Mar 1, 2017
Break lines and trim whitespace.
Copy link
Contributor

@giulioungaretti giulioungaretti left a 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
Copy link
Contributor

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
Copy link
Contributor

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 ?

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a tuple ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not?

Copy link
Contributor

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)
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚡️ that hash

Copy link
Contributor

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])
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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.',
Copy link
Contributor

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty

Copy link
Contributor

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,
Copy link
Contributor

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):
Copy link
Contributor

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.
@giulioungaretti giulioungaretti merged commit 628fe73 into microsoft:master Mar 21, 2017
giulioungaretti pushed a commit that referenced this pull request Mar 21, 2017
Author: William H.P. Nielsen <whpn@mailbox.org>

    driver: ziuhfli (#466)
@WilliamHPNielsen WilliamHPNielsen deleted the driver/ZIUHFLI branch May 16, 2019 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants