qcodes_contrib_drivers.drivers.QuTech package

Submodules

qcodes_contrib_drivers.drivers.QuTech.D4 module

class qcodes_contrib_drivers.drivers.QuTech.D4.D4(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Qcodes driver for the D4 ADC SPI-rack module. Requires installation of the ‘spirack’ package using pip.

Parameters:
  • name (str) – name of the instrument.

  • spi_rack (SPI_rack) – instance of the SPI_rack class as defined in the spirack package. This class manages communication with the individual modules.

  • module (int) – module number as set on the hardware.

get_buffers_enabled()[source]
get_filter_value()[source]
get_mode()[source]

qcodes_contrib_drivers.drivers.QuTech.D5a module

class qcodes_contrib_drivers.drivers.QuTech.D5a.D5a(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Qcodes driver for the D5a DAC SPI-rack module.

functions: - set_dacs_zero set all DACs to zero voltage

parameters: - dacN: get and set DAC voltage - stepsizeN get the minimum step size corresponding to the span - spanN get and set the DAC span: ‘4v uni’, ‘4v bi’, or ‘2.5v bi’

where N is the DAC number from 1 up to 16

__init__(name, spi_rack, module, inter_delay=0.1, dac_step=0.01, reset_voltages=False, mV=False, number_dacs=16, **kwargs)[source]

Create instrument for the D5a module.

The D5a module works with volts as units. For backward compatibility there is the option to allow mV for the dacX parameters.

The output span of the DAC module can be changed with the spanX command. Be carefull when executing this command with a sample connected as voltage jumps can occur.

Parameters:
  • name (str) – name of the instrument.

  • spi_rack (SPI_rack) – instance of the SPI_rack class as defined in the spirack package. This class manages communication with the individual modules.

  • module (int) – module number as set on the hardware.

  • inter_delay (float) – time in seconds, passed to dac parameters of the object

  • dac_step (float) – max step size (V or mV), passed to dac parameters of the object

  • reset_voltages (bool) – passed to D5a_module constructor

  • mV (bool) – if True, then use mV as units in the dac parameters

  • number_dacs (int) – number of DACs available. This is 8 for the D5mux

set_dac_unit(unit: str) None[source]

Set the unit of dac parameters

qcodes_contrib_drivers.drivers.QuTech.F1d module

class qcodes_contrib_drivers.drivers.QuTech.F1d.F1d(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Qcodes driver for the F1d IQ-Mixer SPI-rack module.

Parameters:
  • name (str) – name of the instrument.

  • spi_rack (SPI_rack) – instance of the SPI_rack class as defined in the spirack package. This class manages communication with the individual modules.

  • module (int) – module number as set on the hardware.

The enable_remote parameter sets the F1d module in remote mode. When settings are changed on the hardware front panel, then the remote mode is deactivated

get_remote_settings()[source]

qcodes_contrib_drivers.drivers.QuTech.IVVI module

class qcodes_contrib_drivers.drivers.QuTech.IVVI.IVVI(*args: Any, **kwargs: Any)[source]

Bases: VisaInstrument

Status: Alpha version, tested for basic get-set commands
TODO:
  • Add adjustable range and rate protection per channel

  • Add error handling for the specific error messages in the protocol

  • Remove/fine-tune manual sleep statements

This is the python driver for the D5 module of the IVVI-rack see: http://qtwork.tudelft.nl/~schouten/ivvi/doc-d5/index-d5.htm

A descriptor for the data protocol can be found at http://qtwork.tudelft.nl/~schouten/ivvi/doc-d5/rs232linkformat.txt A copy of this file can be found at the bottom of this file.

__init__(name, address, reset=False, numdacs=16, dac_step=10, dac_delay=0.1, safe_version=True, polarity=['BIP', 'BIP', 'BIP', 'BIP'], use_locks=False, **kwargs)[source]

Initialzes the IVVI, and communicates with the wrapper

Parameters:
  • name (str) – name of the instrument

  • address (str) – ASRL address

  • reset (bool) – resets to default values, default=false

  • numdacs (int) – number of dacs, multiple of 4, default=16

  • polarity (List[str]) – list of polarities of each set of 4 dacs choose from ‘BIP’, ‘POS’, ‘NEG’, default=[‘BIP’, ‘BIP’, ‘BIP’, ‘BIP’]

  • dac_step (float) – max step size for dac parameter

  • dac_delay (float) – delay (in seconds) for dac

  • safe_version (bool) – if True then do not send version commands to the IVVI controller

  • use_locks (bool) – if True then locks are used in the ask function of the driver. The IVVI driver is not thread safe, this locking mechanism makes it thread safe at the cost of making the call to ask blocking.

adjust_parameter_validator(param)[source]

Adjust the parameter validator range based on the dac resolution.

The dac’s of the IVVI have a finite resolution. If the validator range min and max values are not values the dac’s can actually have, then it can occur that a set command results in the dac’s going to a value just outside the validator range. Adjusting the validators with this function prevents that.

Parameters:

param (Parameter) – a dac of the IVVI instrument

ask(message, raw=False)[source]

Send <message> to the device and read answer. Raises an error if one occurred Returns a list of bytes

get_all()[source]
get_idn()[source]

Overwrites the get_idn function using constants as the hardware does not have a proper *IDN function.

get_pol_dac(channel)[source]

Returns the polarity of the dac channel specified

Input:

channel (int) : 1 based index of the dac

Output:

polarity (str) : ‘BIP’, ‘POS’ or ‘NEG’

linspace(start: float, end: float, samples: int, flexible: bool = False, bip: bool = True)[source]

Creates array of voltages, with correct alignment to the DAC quantisation, in a similar manner to numpy.linspace. This guarantees an even spacing and no double sampling inside the requested range.

Parameters:
  • start – the start of the voltage range, in millivolts

  • end – the end of the voltage range, in millivolts

  • samples – number of sample voltages

  • flexible – occasionally get a different number of samples if they can still fit inside the range.

  • bip – if the dac set to bi-polar (-2V to +2V) or not (-4 to -0, or 0 to +4),

Returns:

list of voltages in millivolts suitable for the ivvi DAC. Voltages are inside [start:end] Voltages are evenly spaced Voltages align with the DAC quantisation.

Examples

normal usage:

linspace(-100,100,8) -> [-99.88555733577478, .. 6 more ..
                        , 99.64141298542764]

linspace(-1000, 1000, 2000) ->
    [-976.4858472571908, .. 1998 more .., 975.6923781185626 ]

A flexable number of points:

linspace(-1000, 1000, 2000, True) ->
    [-999.9237048905165, .. 2046 more .., 999.1302357518883]

4 bits is the optimal spacing, so this gives 2048 (= 2^11)
points in a 2 V range

Insufficient resolution:

linspace(500, 502, 100) -> ValueError: Insufficient resolution
    for 100 samples in the range 500 to 502. Maximum :16

This prevents oversampling. Use flexable = True to adapt the number
of points.

Resolution limited sweep using the flexable option:

linspace(500, 502, 100, True) -> [500.0991836423285, .. 14 more ..
                                 , 501.9302662699321]

A too narrow range:

linspace(0, 0.01, 100, True) # -> ValueError: No DAC values exist
                                  in the range 0 : 0.01

Even using the flexable option can not help if there are no
valid values in the requested range.
read(message_len=None)[source]
round_dac(value, dacname=None)[source]

Round a value to the interal precision of the instrument

Parameters:
  • value (float) – value to be rounded

  • dacname (str or int or None) – name or index of dac channel

Returns:

rounded value

Return type:

float

set_dacs_zero()[source]
set_parameter_bounds(name, min_value, max_value)[source]
set_pol_dacrack(flag, channels, get_all=True)[source]

Changes the polarity of the specified set of dacs

Input:

flag (str) : ‘BIP’, ‘POS’ or ‘NEG’ channel (int) : 0 based index of the rack get_all (bool): if True (default) perform a get_all

Output:

None

write(message, raw=False)[source]

Protocol specifies that a write consists of descriptor size, error_code, message

returns message_len

dac_quata = 0.06103515625
full_range = 4000.0
half_range = 2000.0
resolution = 16

qcodes_contrib_drivers.drivers.QuTech.M2j module

class qcodes_contrib_drivers.drivers.QuTech.M2j.M2j(*args: Any, **kwargs: Any)[source]

Bases: Instrument

__init__(name: str, spi_rack: spirack.SPI_rack, module: int, **kwargs)[source]

Qcodes driver for the M2j RF amplifier SPI-rack module.

Parameters:
  • name – name of the instrument.

  • spi_rack – instance of the SPI_rack class as defined in the spirack package. This class manages communication with the individual modules.

  • module – module number as set on the hardware.

The gain can only be set on the device, but not read from the device.

qcodes_contrib_drivers.drivers.QuTech.S5i module

class qcodes_contrib_drivers.drivers.QuTech.S5i.S5i(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Qcodes driver for the S5i RF generator SPI-rack module.

Parameters:
  • name (str) – name of the instrument.

  • spi_rack (SPI_rack) – instance of the SPI_rack class as defined in the spirack package. This class manages communication with the individual modules.

  • module (int) – module number as set on the hardware.

  • frequency (float) – RF frequency at startup, default is 41 MHz.

  • enable_output (bool) – Switch device output on or off, default is True.

  • output_level (int) – RF output level in dBm, default is 0 dBm.

optimize_for_frequency()[source]

This method finds the optimum stepsize for the set frequency.

The stepsize affects the phase noise of the instrument. The smaller the stepsize, the greater is the phase noise. So this method sets the stepsize as large as possible for the current reference frequency.

Module contents