-
Notifications
You must be signed in to change notification settings - Fork 46
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
Drivers for Zurich Instruments devices #90
base: master
Are you sure you want to change the base?
Conversation
Since Python v3.0 getargspec is deprecated. A 'drop-in' replacement is getfullargspec. It seems to work.
The ZHInst_Waveforms are copied from zurich-instrument and might need to be removed befor a merge is possible. |
qkit/drivers/ZHInst_UHFQA.py
Outdated
return self._uhfqa.channels[channel].readout_frequency() | ||
|
||
def _do_get_readout_amplitude(self, channel): | ||
return self._uhfqa.channels[channel].readout_frequency() |
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.
readout amplitude anstelle von frequency
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.
Und das sind solche Bugs, wegen denen ich v2 geschrieben habe. Kümmere ich mich drum.
def _do_set_readout_frequency(self, frequency, channel): | ||
self._uhfqa.channels[channel].readout_frequency(frequency) | ||
|
||
def _do_set_readout_amplitude(self, amplitude, channel): |
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.
amplitude anstelle von frequency
qkit/drivers/ZHInst_UHFQAv2.py
Outdated
return self._uhfqa.channels[channel].readout_frequency() | ||
|
||
def _do_get_readout_amplitude(self, channel): | ||
return self._uhfqa.channels[channel].readout_frequency() |
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.
amplitude anstelle von frequency
qkit/drivers/ZHInst_UHFQAv2.py
Outdated
def _do_set_readout_frequency(self, frequency, channel): | ||
self._uhfqa.channels[channel].readout_frequency(frequency) | ||
|
||
def _do_set_readout_amplitude(self, amplitude, channel): |
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.
amplitude anstelle von frequency
@@ -733,7 +733,7 @@ def add_function(self, name, **options): | |||
if hasattr(f, '__doc__'): | |||
options['doc'] = getattr(f, '__doc__') | |||
|
|||
options['argspec'] = self.get_argspec_dict(inspect.getargspec(f)) | |||
options['argspec'] = self.get_argspec_dict(inspect.getfullargspec(f)) | |||
|
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.
was passiert hier?
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.
getargspec is deprecated und hat nicht mehr funktioniert. Getfullargspec ist der empfohlene Ersatz und sollte als 1:1-Ersetzung funktionieren.
qkit/drivers/ZHInst_Virtual_VNAv2.py
Outdated
Returns (SHF-Upconversion center frequency, Digital Modulation Frequency) | ||
""" | ||
shfsg_out_freq = self.get_freqpoints()[0] - MINIMUM_UHFQA_FREQUENCY | ||
base_mod = int(shfsg_out_freq / 0.5e9) * 0.5e9 |
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.
Bug: Does not check if base_mod exceeds center frequency range.
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.
Bug: Check if total frequency does exceed SHFSG operational range.
qkit/drivers/ZHInst_Virtual_VNAv2.py
Outdated
out_channel.sine.q.cos.amplitude(0.0) | ||
self.uhfqa.arm(length=self.repetitions, averages=1) | ||
|
||
uhfqa_frequencies = self.get_freqpoints() - (self.get_freqpoints()[0] - MINIMUM_UHFQA_FREQUENCY) |
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.
Bug: If SHFSG frequency is not MINIMUM_UHFQA_FREQUENCY below lowest frequency point this calculation is incorrect.
Use Actual SHFSG frequency as reference instead.
Bonus: Check if UHFQA frequency range is exceeded.
|
||
for i, f in enumerate(uhfqa_frequencies): | ||
self.uhfqa.set_osc_freq(f) # set modulation frequency | ||
self.uhfqa.set_readout_frequency0(f) |
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 call costs time and might be unnecessary. In spectroscopy mode, the signal is (at least according to the documentation) automatically demodulated with the local oscillator.
for i, f in enumerate(uhfqa_frequencies): | ||
self.uhfqa.nodetree.osc.freq(f) # set modulation frequency | ||
for j in (0, 1): | ||
self.uhfqa.set_readout_frequency(f, j) |
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 call costs time and might be unnecessary. In spectroscopy mode, the signal is (at least according to the documentation) automatically demodulated with the local oscillator.
This pull request does multiple things:
These features still need testing.