qcodes_contrib_drivers.drivers.ZurichInstruments package

Submodules

qcodes_contrib_drivers.drivers.ZurichInstruments.HF2LI module

class qcodes_contrib_drivers.drivers.ZurichInstruments.HF2LI.HF2LI(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Qcodes driver for Zurich Instruments HF2LI lockin amplifier.

This driver is meant to emulate a single-channel lockin amplifier, so one instance has a single demodulator, a single sigout channel, and multiple auxout channels (for X, Y, R, Theta, or an arbitrary manual value). Multiple instances can be run simultaneously as independent lockin amplifiers.

This instrument has a great deal of additional functionality that is not currently supported by this driver.

Parameters:
  • name – Name of instrument.

  • device – Device name, e.g. “dev204”, used to create zhinst API session.

  • demod – Index of the demodulator to use.

  • sigout – Index of the sigout channel to use as excitation source.

  • auxouts – Dict of the form {output: index}, where output is a key of HF2LI.OUTPUT_MAPPING, for example {“X”: 0, “Y”: 3} to use the instrument as a lockin amplifier in X-Y mode with auxout channels 0 and 3.

  • num_sigout_mixer_channels – Number of mixer channels to enable on the sigouts. Default: 1.

sample() dict[source]
OUTPUT_MAPPING = {-1: 'manual', 0: 'X', 1: 'Y', 2: 'R', 3: 'Theta'}

qcodes_contrib_drivers.drivers.ZurichInstruments.ZIHDAWG8 module

exception qcodes_contrib_drivers.drivers.ZurichInstruments.ZIHDAWG8.CompilerError[source]

Bases: Exception

Errors that occur during compilation of sequence programs.

class qcodes_contrib_drivers.drivers.ZurichInstruments.ZIHDAWG8.ZIHDAWG8(*args: Any, **kwargs: Any)[source]

Bases: Instrument

QCoDeS driver for ZI HDAWG8. Requires ZI LabOne software to be installed on the computer running QCoDeS (tested using LabOne 18.05.54618 and firmware 53866). Furthermore, the Data Server and Web Server must be running and a connection between the two must be made.

Compiler warnings, when uploading and compiling a sequence program, can be treated as errors. This is desirable if the user of the driver does not want clipping or truncating of waveform to happen silently by the compiler. Warnings are constants on the module level and can be added to the drivers attribute warnings_as_errors. If warning are added, they will raise a CompilerError.

__init__(name: str, device_id: str, **kwargs) None[source]

Create an instance of the instrument.

Parameters:
  • name – The internal QCoDeS name of the instrument

  • device_ID – The device name as listed in the web server.

create_parameters_from_node_tree(parameters: dict) None[source]

Create QuCoDeS parameters from the device node tree.

Parameters:

parameters – A device node tree.

disable_channel(channel_number: int) None[source]

Disable a signal output, turns off a blue LED on the device.

Parameters:

channel_number – Output channel that should be disabled.

download_device_node_tree(flags: int = 0) dict[source]
Parameters:

flags

ziPython.ziListEnum.settingsonly (0x08): Returns only nodes which are marked as setting ziPython.ziListEnum.streamingonly (0x10): Returns only streaming nodes ziPython.ziListEnum.subscribedonly (0x20): Returns only subscribed nodes ziPython.ziListEnum.basechannel (0x40): Return only one instance of a node in case of multiple channels

Or any combination of flags can be used.

Returns:

A dictionary of the device node tree.

enable_channel(channel_number: int) None[source]

Enable a signal output, turns on a blue LED on the device.

Parameters:

channel_number – Output channel that should be enabled.

static generate_csv_sequence_program(wave_info: List[Tuple[int, str | None, str | None]]) str[source]

A method that generates a sequence program that plays waveforms from csv files.

Parameters:

wave_info – A list of tuples containing information about the waves that are to be played. Every tuple should have a channel number and wave, marker or both wave and marker.

Returns:

A sequence program that can be compiled and uploaded.

set_channel_grouping(group: int) None[source]

Set the channel grouping mode of the device.

Parameters:

group – 0: groups of 2. 1: groups of 4. 2: groups of 8 i.e., one sequencer program controls 8 outputs.

snapshot(update=True)[source]

Override base method to make update default True.

snapshot_base(update: bool | None = True, params_to_skip_update: Sequence[str] | None = None) Dict[source]

Override the base method to ignore ‘feature_code’ by default.

start_awg(awg_number: int)[source]

Activate an AWG

Parameters:

awg_number – The AWG that should be enabled.

stop_awg(awg_number: int) None[source]

Deactivate an AWG

Parameters:

awg_number – The AWG that should be disabled.

upload_sequence_program(awg_number: int, sequence_program: str) int[source]

Uploads a sequence program to the device equivalent to using the the sequencer tab in the device’s gui.

Parameters:
  • awg_number – The AWG that the sequence program will be uploaded to.

  • sequence_program – A sequence program that should be played on the device.

Returns:

0 is Compilation was successful with no warnings. 2 if Compilation was successful but with warnings.

Raises:

CompilerError – If error occurs during compilation of the sequence program, or if a warning is elevated to an error.

upload_waveform(awg_number: int, waveform: list, index: int) None[source]

Upload a waveform to the device memory at a given index.

Note

There needs to be a place holder on the device as this only replaces a data in the device memory but does not allocate new memory space.

Parameters:
  • awg_number – The AWG where waveform should be uploaded to.

  • waveform – An array of floating point values from -1.0 to 1.0, or integers in the range (-32768…+32768)

  • index – Index of the waveform that will be replaced. If there are more than 1 waveforms used then the index corresponds to the position of the waveform in the Waveforms sub-tab of the AWG tab in the GUI.

waveform_to_csv(wave_name: str, *waveforms: list) None[source]

Write waveforms to a CSV file in the modules data directory so that it can be referenced and used in a sequence program. If more than one waveform is provided they will be played simultaneously but on separate outputs.

Parameters:
  • wave_name – Name of the CSV file, is used by a sequence program.

  • waveforms – One or more waveforms that are to be written to a CSV file. Note if there are more than one waveforms then they have to be of equal length, if not the longer ones will be truncated.

waveform_to_wave(wave_name: str, waveform: ndarray) None[source]

Write waveforms to a .wave file in the modules data directory so that it can be referenced and used in a sequence program.

Parameters:
  • wave_name – Name of the wave file, is used by a sequence program.

  • waveforms – Waveforms that is to be written to a .wave file.

Module contents