MiniCircuits Drivers

Classes:

MiniCircuitsRCSP4T(name, address[, port])

Driver for MiniCircuits RC-SP4T RF switch connected via ethernet.

MiniCircuitsRCSP4TChannel(parent, name, ...)

param parent:

The instrument the channel is a part of

MiniCircuitsRCSPDT(name, address[, port])

Mini-Circuits RC-SPDT RF switch connected via ethernet.

MiniCircuitsRCSPDTChannel(parent, name, ...)

param parent:

The instrument the channel is a part of

MiniCircuitsRudat13G90Usb(*args, **kwargs)

Driver for the Minicircuits RUDAT-13G-90 90 dB Programmable Attenuator

MiniCircuitsRudat13G90Base(name, **kwargs)

Base class for drivers for MiniCircuits RUDAT-13G-90 Should not be instantiated directly.

MiniCircuitsHIDMixin(*args, **kwargs)

The specific implementation for mini circuit human interface devices.

MiniCircuitsUsbSPDT(name[, driver_path, ...])

Mini-Circuits SPDT RF switch

MiniCircuitsSPDTBase(name, **kwargs)

Base class for MiniCircuits SPDT Switch instruments.

MiniCircuitsUsbSPDTSwitchChannel(parent, ...)

Base class for MiniCircuits SPDT Switch channels.

MiniCircuitsSPDTSwitchChannelBase(parent, ...)

Base class for MiniCircuits SPDT Switch channels.

class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSP4T(name: str, address: str, port: int = 23, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: IPInstrument

Driver for MiniCircuits RC-SP4T RF switch connected via ethernet.

Parameters:
  • name – the name of the instrument

  • address – ip address ie “10.0.0.1”

  • port – port to connect to default Telnet:23

  • **kwargs – Forwarded to the baseclass

Methods:

ask(cmd)

Write a command string to the hardware and return a response.

get_idn()

Parse a standard VISA *IDN? response into an ID dict.

ask(cmd: str) str[source]

Write a command string to the hardware and return a response.

Subclasses that transform cmd should override this method, and in it call super().ask(new_cmd). Subclasses that define a new hardware communication should instead override ask_raw.

Parameters:

cmd – The string to send to the instrument.

Returns:

response

Raises:

Exception – Wraps any underlying exception with extra context, including the command and the instrument.

get_idn() dict[str, str | None][source]

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.

Returns:

A dict containing vendor, model, serial, and firmware.

class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSP4TChannel(parent: IPInstrument, name: str, channel_letter: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Parameters:
  • parent – The instrument the channel is a part of

  • name – the name of the channel

  • channel_letter – channel letter [‘a’, ‘b’])

  • **kwargs – Forwarded to base class.

Attributes:

switch

Parameter switch

switch: Parameter = self.add_parameter( "switch", label="switch", set_cmd=self._set_switch, get_cmd=self._get_switch, vals=vals.Ints(0, 4), )

Parameter switch

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSPDT(name: str, address: str, port: int = 23, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: IPInstrument

Mini-Circuits RC-SPDT RF switch connected via ethernet.

Parameters:
  • name – the name of the instrument

  • address – ip address ie “10.0.0.1”

  • port – port to connect to default Telnet:23

Methods:

ask(cmd)

Write a command string to the hardware and return a response.

get_idn()

Parse a standard VISA *IDN? response into an ID dict.

ask(cmd: str) str[source]

Write a command string to the hardware and return a response.

Subclasses that transform cmd should override this method, and in it call super().ask(new_cmd). Subclasses that define a new hardware communication should instead override ask_raw.

Parameters:

cmd – The string to send to the instrument.

Returns:

response

Raises:

Exception – Wraps any underlying exception with extra context, including the command and the instrument.

get_idn() dict[str, str | None][source]

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.

Returns:

A dict containing vendor, model, serial, and firmware.

class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSPDTChannel(parent: MiniCircuitsRCSPDT, name: str, channel_letter: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Parameters:
  • parent – The instrument the channel is a part of

  • name – the name of the channel

  • channel_letter – channel letter [‘a’, ‘b’, ‘c’ or ‘d’])

  • **kwargs – Forwarded to the baseclass

Attributes:

switch

Parameter switch

switch: Parameter = self.add_parameter( "switch", label="switch", set_cmd=self._set_switch, get_cmd=self._get_switch, vals=vals.Ints(1, 2), )

Parameter switch

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRudat13G90Usb(*args: Any, **kwargs: Any)[source]

Bases: MiniCircuitsHIDMixin, MiniCircuitsRudat13G90Base

Driver for the Minicircuits RUDAT-13G-90 90 dB Programmable Attenuator

The specific implementation for mini circuit human interface devices.

This implementation allows to use write/ask methods of the instrument instance to send SCPI commands to MiniCircuits instruments over USB HID connection.

Parameters:
  • name – instrument name

  • instance_id – The id of the instrument we want to connect. If there is only one instrument then this is an optional argument. If we have more then one instrument, use the class method enumerate_devices to query their IDs

  • timeout – Specify a timeout for this instrument in seconds

  • **kwargs – Forwarded to base class.

Attributes:

vendor_id

product_id

model_name: Parameter = self.add_parameter("model_name", get_cmd=":MN?")

Parameter model_name

serial_number: Parameter = self.add_parameter( "serial_number", get_cmd=":SN?" )

Parameter serial_number

firmware: Parameter = self.add_parameter("firmware", get_cmd=":FIRMWARE?")

Parameter firmware

attenuation: Parameter = self.add_parameter( "attenuation", set_cmd=":SETATT={}", get_cmd=":ATT?", get_parser=float )

Parameter attenuation

startup_attenuation: Parameter = self.add_parameter( "startup_attenuation", set_cmd=":STARTUPATT:VALUE:{}", get_cmd=":STARTUPATT:VALUE?", get_parser=float, )

Parameter startup_attenuation

hop_points: Parameter = self.add_parameter( "hop_points", get_cmd="HOP:POINTS?", get_parser=int )

Parameter hop_points

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
vendor_id = 8398
product_id = 35
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsRudat13G90Base(name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: Instrument

Base class for drivers for MiniCircuits RUDAT-13G-90 Should not be instantiated directly.

Parameters:
  • name – Name of the instrument

  • **kwargs – Forwarded to base class.

Attributes:

model_name

Parameter model_name

serial_number

Parameter serial_number

firmware

Parameter firmware

attenuation

Parameter attenuation

startup_attenuation

Parameter startup_attenuation

hop_points

Parameter hop_points

Methods:

get_idn()

Parse a standard VISA *IDN? response into an ID dict.

model_name: Parameter = self.add_parameter("model_name", get_cmd=":MN?")

Parameter model_name

serial_number: Parameter = self.add_parameter( "serial_number", get_cmd=":SN?" )

Parameter serial_number

firmware: Parameter = self.add_parameter("firmware", get_cmd=":FIRMWARE?")

Parameter firmware

attenuation: Parameter = self.add_parameter( "attenuation", set_cmd=":SETATT={}", get_cmd=":ATT?", get_parser=float )

Parameter attenuation

startup_attenuation: Parameter = self.add_parameter( "startup_attenuation", set_cmd=":STARTUPATT:VALUE:{}", get_cmd=":STARTUPATT:VALUE?", get_parser=float, )

Parameter startup_attenuation

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
hop_points: Parameter = self.add_parameter( "hop_points", get_cmd="HOP:POINTS?", get_parser=int )

Parameter hop_points

get_idn() dict[str, str | None][source]

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.

Returns:

A dict containing vendor, model, serial, and firmware.

class qcodes.instrument_drivers.Minicircuits.MiniCircuitsHIDMixin(*args: Any, **kwargs: Any)[source]

Bases: Instrument

The specific implementation for mini circuit human interface devices.

This implementation allows to use write/ask methods of the instrument instance to send SCPI commands to MiniCircuits instruments over USB HID connection.

Parameters:
  • name – instrument name

  • instance_id – The id of the instrument we want to connect. If there is only one instrument then this is an optional argument. If we have more then one instrument, use the class method enumerate_devices to query their IDs

  • timeout – Specify a timeout for this instrument in seconds

  • **kwargs – Forwarded to base class.

Attributes:

vendor_id

product_id

Methods:

write_raw(cmd)

Send a string command to the human interface device

ask_raw(cmd)

Send a string command to the human interface device and wait for a reply

close()

Irreversibly stop this instrument and free its resources.

enumerate_devices()

This method returns the 'instance_id's of all connected devices for with the given product and vendor IDs.

vendor_id = 0
product_id = 0
write_raw(cmd: str) None[source]

Send a string command to the human interface device

The given command is processed by _pack_string method to return a byte sequence that is going to be actually sent to the device. Subclasses must implement _pack_string method.

Parameters:

cmd – a command to send in a form of a string

ask_raw(cmd: str) str[source]

Send a string command to the human interface device and wait for a reply

The given command is processed by _pack_string method to return a byte sequence that is going to be actually sent to the device. Subclasses must implement _pack_string method.

The byte sequence of the reply is processed by _unpack_string method, and the resulting string is returned. Subclasses must implement _unpack_string method.

Parameters:

cmd – a command to send in a form of a string

close() None[source]

Irreversibly stop this instrument and free its resources.

Subclasses should override this if they have other specific resources to close.

classmethod enumerate_devices() list[str][source]

This method returns the ‘instance_id’s of all connected devices for with the given product and vendor IDs.

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsUsbSPDT(name: str, driver_path: str | None = None, serial_number: str | None = None, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: MiniCircuitsSPDTBase

Mini-Circuits SPDT RF switch

Parameters:
  • name – the name of the instrument

  • driver_path – path to the dll

  • serial_number – the serial number of the device (printed on the sticker on the back side, without s/n)

  • kwargs – kwargs to be passed to Instrument class.

Classes:

CHANNEL_CLASS

alias of MiniCircuitsUsbSPDTSwitchChannel

Attributes:

PATH_TO_DRIVER

PATH_TO_DRIVER_45

Methods:

get_idn()

Parse a standard VISA *IDN? response into an ID dict.

CHANNEL_CLASS

alias of MiniCircuitsUsbSPDTSwitchChannel

PATH_TO_DRIVER = 'mcl_RF_Switch_Controller64'
PATH_TO_DRIVER_45 = 'mcl_RF_Switch_Controller_NET45'
get_idn() dict[str, str | None][source]

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.

Returns:

A dict containing vendor, model, serial, and firmware.

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsSPDTBase(name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: Instrument

Base class for MiniCircuits SPDT Switch instruments. Should not be instantiated directly.

Attributes:

CHANNEL_CLASS

Methods:

add_channels()

all(switch_to)

get_number_of_channels()

CHANNEL_CLASS: type[MiniCircuitsSPDTSwitchChannelBase]
add_channels() None[source]
all(switch_to: int) None[source]
get_number_of_channels() int[source]
parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}
class qcodes.instrument_drivers.Minicircuits.MiniCircuitsUsbSPDTSwitchChannel(parent: Instrument, name: str, channel_letter: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: MiniCircuitsSPDTSwitchChannelBase

Base class for MiniCircuits SPDT Switch channels. Should not be instantiated directly.

Parameters:
  • parent – The instrument the channel is a part of

  • name – the name of the channel

  • channel_letter – channel letter [‘a’, ‘b’, ‘c’ or ‘d’])

  • **kwargs – Forwarded to base class.

class qcodes.instrument_drivers.Minicircuits.MiniCircuitsSPDTSwitchChannelBase(parent: Instrument, name: str, channel_letter: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Base class for MiniCircuits SPDT Switch channels. Should not be instantiated directly.

Parameters:
  • parent – The instrument the channel is a part of

  • name – the name of the channel

  • channel_letter – channel letter [‘a’, ‘b’, ‘c’ or ‘d’])

  • **kwargs – Forwarded to base class.

Attributes:

switch

Parameter switch

switch: Parameter = self.add_parameter( 'switch', label=f'switch {self.channel_letter}', set_cmd=self._set_switch, get_cmd=self._get_switch, vals=Ints(1, 2))

Parameter switch

parameters: dict[str, ParameterBase] = {}

All the parameters supported by this instrument. Usually populated via add_parameter().

functions: dict[str, Function] = {}

All the functions supported by this instrument. Usually populated via add_function().

submodules: dict[str, InstrumentModule | ChannelTuple] = {}

All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via add_submodule().

instrument_modules: dict[str, InstrumentModule] = {}

All the InstrumentModule of this instrument Usually populated via add_submodule().

log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)
metadata: dict[str, Any] = {}