- class zhinst.qcodes.base.ZIBaseInstrument(name: str, device_type: str, serial: str, interface: str = '1gbe', host: str = 'localhost', port: int = 8004, api: int = 6, **kwargs)¶
Base class for all Zurich Instruments QCoDeS drivers.
Implements basic wrapper around
zhinst-toolkitdeice drivers and translates the nodetree to a hirarchy of QCoDeS submodules (
ZINodes) and parameters.
name (str) – The QCoDeS name of the instrument
device_type (str) – The device type, e.g. ‘mfli’.
serial (str) – The device serial number.
- Keyword Arguments
interface (str) – The interface used to connect to the device (default: ‘1GbE’).
host (str) – Address of the data server. (default: ‘localhost’)
port (int) – Port used to connect to the data server. (default: 8004)
api (int) – Api level used. (default: 6)
- get_idn() Dict ¶
Parse a standard VISA
*IDN?response into an ID dict.
Even though this is the VISA standard, it applies to various other types as well, such as IPInstruments, so it is included here in the Instrument base class.
Override this if your instrument does not support
*IDN?or returns a nonstandard IDN string. This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.
A dict containing vendor, model, serial, and firmware.
- class zhinst.qcodes.base.ZINode(parent: qcodes.instrument.base.InstrumentBase, name: str, **kwargs: Any)¶
Implements a node in the instrument nodetree as a
ZINodeclass collects submodules (which may again be ZINodes) and parameters to represent the hirarchy of the Zurich Instruments node tree in QCoDeS. It inherits from
InstrumentChanneland overrides the snapshot method.
- print_readable_snapshot(update: bool = False, max_chars: int = 80) None ¶
Prints a readable version of the snapshot. The readable snapshot includes the name, value and unit of each parameter. A convenience function to quickly get an overview of the status of an instrument.
update – If
True, update the state by querying the instrument. If
False, just use the latest values in memory. This argument gets passed to the snapshot function.
max_chars – the maximum number of characters per line. The readable snapshot will be cropped if this value is exceeded. Defaults to 80 to be consistent with default terminal width.