Keysight Drivers

Classes:

Keysight33210A(name, address[, silent])

QCoDeS driver for the Keysight 33210A waveform generator.

Keysight33250A(name, address[, silent])

QCoDeS driver for the Keysight 33250A waveform generator.

Keysight33511B(name, address[, silent])

QCoDeS driver for the Keysight 33511B waveform generator.

Keysight33512B(name, address[, silent])

QCoDeS driver for the Keysight 33512B waveform generator.

Keysight33522B(name, address[, silent])

QCoDeS driver for the Keysight 33522B waveform generator.

Keysight33622A(name, address[, silent])

QCoDeS driver for the Keysight 33622A waveform generator.

Keysight33xxx(name, address[, silent])

Base class for Keysight/Agilent 33XXX waveform generators.

Keysight33xxxOutputChannel(parent, name, ...)

Class to hold the output channel of a Keysight 33xxxx waveform generator.

Keysight33xxxSyncChannel(parent, name, **kwargs)

Class to hold the sync output of a Keysight 33xxxx waveform generator.

Keysight34410A(name, address[, silent])

This is the qcodes driver for the Keysight 34410A Multimeter

Keysight34411A(name, address[, silent])

This is the qcodes driver for the Keysight 34411A Multimeter

Keysight34460A(name, address[, silent])

This is the qcodes driver for the Keysight 34460A Multimeter

Keysight34461A(name, address[, silent])

This is the qcodes driver for the Keysight 34461A Multimeter

Keysight34465A(name, address[, silent])

This is the qcodes driver for the Keysight 34465A Multimeter

Keysight34470A(name, address[, silent])

This is the qcodes driver for the Keysight 34470A Multimeter

Keysight344xxA(name, address[, silent])

Base class for Keysight 34410A, 34411A, 34460A, 34461A, 34465A and 34470A multimeters.

Keysight344xxADisplay(parent, name, **kwargs)

Implements interaction with the display of Keysight 344xxA.

Keysight344xxASample(parent, name, **kwargs)

Implements sampling parameters of Keysight 344xxA.

Keysight344xxATrigger(parent, name, **kwargs)

Implements triggering parameters and methods of Keysight 344xxA.

Keysight34934A(parent, name, slot, **kwargs)

InstrumentModule that represents the Keysight34934A module

Keysight34980A(name, address, **kwargs)

QCodes driver for 34980A switch/measure unit

Keysight34980ASwitchMatrixSubModule(parent, ...)

A base class for Switch Matrix submodules for the 34980A systems.

KeysightB1500(name, address, **kwargs)

Driver for Keysight B1500 Semiconductor Parameter Analyzer.

KeysightB1500Module(parent, name, slot_nr, ...)

Base class for all modules of B1500 Parameter Analyzer

KeysightB1500CVSweepMeasurement(name, ...)

CV sweep measurement outputs a list of primary (capacitance) and secondary parameter (disipation).

KeysightB1500CVSweeper(parent, name, **kwargs)

KeysightB1500Correction(parent, name, **kwargs)

A Keysight B1520A CMU submodule for performing open/short/load corrections.

KeysightB1500FrequencyList(parent, name, ...)

A frequency list for open/short/load correction for Keysight B1520A CMU.

KeysightB1500IVSweeper(parent, name, **kwargs)

KeysightB1511B(parent, name, slot_nr, **kwargs)

Driver for Keysight B1511B Source/Monitor Unit module for B1500 Semiconductor Parameter Analyzer.

KeysightB1517A(parent, name, slot_nr, **kwargs)

Driver for Keysight B1517A Source/Monitor Unit module for B1500 Semiconductor Parameter Analyzer.

KeysightB1520A(parent, name, slot_nr, **kwargs)

Driver for Keysight B1520A Capacitance Measurement Unit module for B1500 Semiconductor Parameter Analyzer.

KeysightB1530A(parent, name, slot_nr, **kwargs)

Driver for Keysight B1530A Waveform Generator/Fast Measurement Unit module for B1500 Semiconductor Parameter Analyzer.

KeysightB220X(name, address, **kwargs)

QCodes driver for B2200 / B2201 switch matrix

KeysightB2200(name, address, **kwargs)

QCodes driver for B2200

KeysightB2201(name, address, **kwargs)

QCodes driver for B2201

KeysightB2962A(name, address, **kwargs)

This is the qcodes driver for the Keysight B2962A 6.5 Digit Low Noise Power Source

KeysightB2962AChannel(parent, name, chan, ...)

InstrumentChannel that represents a singe channel of a KeysightB2962A.

KeysightE4980A(name, address, **kwargs)

QCodes driver for E4980A Precision LCR Meter

KeysightE4980ACorrection(parent, name, **kwargs)

Module for correction settings.

KeysightE4980AMeasurementPair(name, names, ...)

Data class for E4980A measurement, which will always return two items at once.

KeysightE4980AMeasurements()

All the measurement function for E4980A LCR meter.

KeysightErrorQueueMixin()

Mixin class for visa instruments that happen to implement an error queue.

KeysightInfiniium(name, address[, channels, ...])

This is the QCoDeS driver for the Keysight Infiniium oscilloscopes

KeysightInfiniiumBoundMeasurement(parent, ...)

Initialize measurement subsystem bound to a specific channel

KeysightInfiniiumChannel(parent, name, ...)

Initialize an infiniium channel.

KeysightInfiniiumFunction(parent, name, ...)

Initialize an infiniium channel.

KeysightInfiniiumUnboundMeasurement(parent, ...)

Initialize measurement subsystem where target is set by the parameter source.

KeysightM9336A(name, address[, options, ...])

AWG Driver for the Keysight M9336A PXIe I/Q Arbitrary Waveform Generator.

KeysightM9336AAWGChannel(parent, name, chan, ...)

Represent the three channels of the Keysight KTM Awg driver.

KeysightM960x(name, address[, options, dll_path])

Provide a wrapper for the Keysight KtM960x DAC.

KeysightN5173B(name, address, **kwargs)

KeysightN5183B(name, address, **kwargs)

KeysightN5222B(name, address, **kwargs)

Driver for Keysight PNA N5222B.

KeysightN5230C(name, address, **kwargs)

KeysightN5232B(name, address, **kwargs)

KeysightN5245A(name, address, **kwargs)

KeysightN6705B(name, address, **kwargs)

KeysightN6705BChannel(parent, name, chan, ...)

KeysightN9030B(name, address, **kwargs)

Driver for Keysight N9030B PXA signal analyzer.

KeysightN9030BPhaseNoiseMode(parent, name, ...)

Phase Noise Mode for Keysight N9030B instrument.

KeysightN9030BSpectrumAnalyzerMode(parent, ...)

Spectrum Analyzer Mode for Keysight N9030B instrument.

KeysightP9374A(name, address, **kwargs)

KeysightPNABase(name, address, min_freq, ...)

Base class for qcodes drivers for Agilent/Keysight series PNAs

KeysightPNAxBase(name, address, min_freq, ...)

KeysightPNAPort(parent, name, port, ...)

Allow operations on individual PNA ports.

KeysightPNATrace(parent, name, trace_name, ...)

Allow operations on individual PNA traces.

class qcodes.instrument_drivers.Keysight.Keysight33210A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33210A waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33250A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33250A waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33511B(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33511B waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33512B(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33512B waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33522B(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33522B waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33622A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight33xxx

QCoDeS driver for the Keysight 33622A waveform generator.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight33xxx(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightErrorQueueMixin, VisaInstrument

Base class for Keysight/Agilent 33XXX waveform generators.

Not to be instantiated directly.

Parameters:
  • name – The name of the instrument used internally by QCoDeS. Must be unique.

  • address – The VISA resource name.

  • silent – If True, no connect message is printed.

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

class qcodes.instrument_drivers.Keysight.Keysight33xxxOutputChannel(parent: Instrument, name: str, channum: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Class to hold the output channel of a Keysight 33xxxx waveform generator.

Parameters:
  • parent – The instrument to which the channel is attached.

  • name – The name of the channel

  • channum – The number of the channel in question (1-2)

  • **kwargs – kwargs are forwarded to base class.

Attributes:

function_type

Parameter function_type

frequency_mode

Parameter frequency_mode

frequency

Parameter frequency

phase

Parameter phase

amplitude_unit

Parameter amplitude_unit

amplitude

Parameter amplitude

offset

Parameter offset

output

Parameter output

ramp_symmetry

Parameter ramp_symmetry

pulse_width

Parameter pulse_width

trigger_source

Parameter trigger_source

trigger_slope

Parameter trigger_slope

trigger_count

Parameter trigger_count

trigger_delay

Parameter trigger_delay

trigger_timer

Parameter trigger_timer

output_polarity

Parameter output_polarity

burst_state

Parameter burst_state

burst_mode

Parameter burst_mode

burst_ncycles

Parameter burst_ncycles

burst_phase

Parameter burst_phase

burst_polarity

Parameter burst_polarity

burst_int_period

The burst period is the time between the starts of consecutive bursts when trigger is immediate.

function_type: Parameter = self.add_parameter( "function_type", label=f"Channel {channum} function type", set_cmd=f"SOURce{channum}:FUNCtion {{}}", get_cmd=f"SOURce{channum}:FUNCtion?", get_parser=str.rstrip, vals=vals.Enum( "SIN", "SQU", "TRI", "RAMP", "PULS", "PRBS", "NOIS", "ARB", "DC" ), )

Parameter function_type

frequency_mode: Parameter = self.add_parameter( "frequency_mode", label=f"Channel {channum} frequency mode", set_cmd=f"SOURce{channum}:FREQuency:MODE {{}}", get_cmd=f"SOURce{channum}:FREQuency:MODE?", get_parser=str.rstrip, vals=vals.Enum("CW", "LIST", "SWEEP", "FIXED"), )

Parameter frequency_mode

frequency: Parameter = self.add_parameter( "frequency", label=f"Channel {channum} frequency", set_cmd=f"SOURce{channum}:FREQuency {{}}", get_cmd=f"SOURce{channum}:FREQuency?", get_parser=float, unit="Hz", # TODO: max. freq. actually really tricky vals=vals.Numbers(1e-6, max_freq), )

Parameter frequency

phase: Parameter = self.add_parameter( "phase", label=f"Channel {channum} phase", set_cmd=f"SOURce{channum}:PHASe {{}}", get_cmd=f"SOURce{channum}:PHASe?", get_parser=float, unit="deg", vals=vals.Numbers(0, 360), )

Parameter phase

amplitude_unit: Parameter = self.add_parameter( "amplitude_unit", label=f"Channel {channum} amplitude unit", set_cmd=f"SOURce{channum}:VOLTage:UNIT {{}}", get_cmd=f"SOURce{channum}:VOLTage:UNIT?", vals=vals.Enum("VPP", "VRMS", "DBM"), get_parser=str.rstrip, )

Parameter amplitude_unit

amplitude: Parameter = self.add_parameter( "amplitude", label=f"Channel {channum} amplitude", set_cmd=f"SOURce{channum}:VOLTage {{}}", get_cmd=f"SOURce{channum}:VOLTage?", unit="", # see amplitude_unit get_parser=float, )

Parameter amplitude

offset: Parameter = self.add_parameter( "offset", label=f"Channel {channum} voltage offset", set_cmd=f"SOURce{channum}:VOLTage:OFFSet {{}}", get_cmd=f"SOURce{channum}:VOLTage:OFFSet?", unit="V", get_parser=float, )

Parameter offset

output: Parameter = self.add_parameter( "output", label=f"Channel {channum} output state", set_cmd=f"OUTPut{channum} {{}}", get_cmd=f"OUTPut{channum}?", val_mapping={"ON": 1, "OFF": 0}, )

Parameter output

ramp_symmetry: Parameter = self.add_parameter( "ramp_symmetry", label=f"Channel {channum} ramp symmetry", set_cmd=f"SOURce{channum}:FUNCtion:RAMP:SYMMetry {{}}", get_cmd=f"SOURce{channum}:FUNCtion:RAMP:SYMMetry?", get_parser=float, unit="%", vals=vals.Numbers(0, 100), )

Parameter ramp_symmetry

pulse_width: Parameter = self.add_parameter( "pulse_width", label=f"Channel {channum} pulse width", set_cmd=f"SOURce{channum}:FUNCtion:PULSE:WIDTh {{}}", get_cmd=f"SOURce{channum}:FUNCtion:PULSE:WIDTh?", get_parser=float, unit="S", )

Parameter pulse_width

trigger_source: Parameter = self.add_parameter( "trigger_source", label=f"Channel {channum} trigger source", set_cmd=f"TRIGger{channum}:SOURce {{}}", get_cmd=f"TRIGger{channum}:SOURce?", vals=vals.Enum("IMM", "EXT", "TIM", "BUS"), get_parser=str.rstrip, )

Parameter trigger_source

trigger_slope: Parameter = self.add_parameter( "trigger_slope", label=f"Channel {channum} trigger slope", set_cmd=f"TRIGger{channum}:SLOPe {{}}", get_cmd=f"TRIGger{channum}:SLOPe?", vals=vals.Enum("POS", "NEG"), get_parser=str.rstrip, )

Parameter trigger_slope

trigger_count: Parameter

Parameter trigger_count

trigger_delay: Parameter

Parameter trigger_delay

trigger_timer: Parameter

Parameter trigger_timer

output_polarity: Parameter = self.add_parameter( "output_polarity", label=f"Channel {channum} output polarity", set_cmd=f"OUTPut{channum}:POLarity {{}}", get_cmd=f"OUTPut{channum}:POLarity?", get_parser=str.rstrip, vals=vals.Enum("NORM", "INV"), )

Parameter output_polarity

burst_state: Parameter = self.add_parameter( "burst_state", label=f"Channel {channum} burst state", set_cmd=f"SOURce{channum}:BURSt:STATe {{}}", get_cmd=f"SOURce{channum}:BURSt:STATe?", val_mapping={"ON": 1, "OFF": 0}, vals=vals.Enum("ON", "OFF"), )

Parameter burst_state

burst_mode: Parameter = self.add_parameter( "burst_mode", label=f"Channel {channum} burst mode", set_cmd=f"SOURce{channum}:BURSt:MODE {{}}", get_cmd=f"SOURce{channum}:BURSt:MODE?", get_parser=str.rstrip, val_mapping={"N Cycle": "TRIG", "Gated": "GAT"}, vals=vals.Enum("N Cycle", "Gated"), )

Parameter burst_mode

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] = {}
burst_ncycles: Parameter = self.add_parameter( "burst_ncycles", label=f"Channel {channum} burst no. of cycles", set_cmd=f"SOURce{channum}:BURSt:NCYCles {{}}", get_cmd=f"SOURce{channum}:BURSt:NCYCLes?", get_parser=partial(val_parser, int), vals=vals.MultiType(vals.Ints(1), vals.Enum("MIN", "MAX", "INF")), )

Parameter burst_ncycles

burst_phase: Parameter = self.add_parameter( "burst_phase", label=f"Channel {channum} burst start phase", set_cmd=f"SOURce{channum}:BURSt:PHASe {{}}", get_cmd=f"SOURce{channum}:BURSt:PHASe?", vals=vals.Numbers(-360, 360), unit="degrees", get_parser=float, )

Parameter burst_phase

burst_polarity: Parameter = self.add_parameter( "burst_polarity", label=f"Channel {channum} burst gated polarity", set_cmd=f"SOURce{channum}:BURSt:GATE:POLarity {{}}", get_cmd=f"SOURce{channum}:BURSt:GATE:POLarity?", vals=vals.Enum("NORM", "INV"), )

Parameter burst_polarity

burst_int_period: Parameter = self.add_parameter( "burst_int_period", label=(f"Channel {channum} burst internal period"), set_cmd=f"SOURce{channum}:BURSt:INTernal:PERiod {{}}", get_cmd=f"SOURce{channum}:BURSt:INTernal:PERiod?", unit="s", vals=vals.Numbers(1e-6, 8e3), get_parser=float, docstring=( "The burst period is the time " "between the starts of consecutive " "bursts when trigger is immediate." ), )

The burst period is the time between the starts of consecutive bursts when trigger is immediate.

class qcodes.instrument_drivers.Keysight.Keysight33xxxSyncChannel(parent: Instrument, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Class to hold the sync output of a Keysight 33xxxx waveform generator. Has very few parameters for single channel instruments.

Attributes:

output

Parameter output

source

Parameter 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] = {}
output: Parameter = self.add_parameter( "output", label="Sync output state", set_cmd="OUTPut:SYNC {}", get_cmd="OUTPut:SYNC?", val_mapping={"ON": 1, "OFF": 0}, vals=vals.Enum("ON", "OFF"), )

Parameter output

source: Parameter

Parameter source

class qcodes.instrument_drivers.Keysight.Keysight34410A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34410A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight34411A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34411A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight34460A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34460A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight34461A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34461A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight34465A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34465A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight34470A(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: Keysight344xxA

This is the qcodes driver for the Keysight 34470A Multimeter

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

class qcodes.instrument_drivers.Keysight.Keysight344xxA(name: str, address: str, silent: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightErrorQueueMixin, VisaInstrument

Base class for Keysight 34410A, 34411A, 34460A, 34461A, 34465A and 34470A multimeters.

Not to be instantiated directly.

The driver currently only supports using the instrument as a voltmeter for DC measurements.

This driver makes use of submodules for implementing different subsystems of the instrument.

Create an instance of the instrument.

Parameters:
  • name – Name used by QCoDeS. Appears in the DataSet

  • address – Visa-resolvable instrument address.

  • silent – If True, the connect_message of the instrument is suppressed. Default: False

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

model

The model number of the instrument

ranges

A list of the available voltage ranges

NPLC_list

A list of the available Power Line Cycle settings

sense_function

Parameter sense_function

line_frequency

The frequency of the power line where the instrument is plugged

NPLC

Sets the integration time in number of power line cycles (PLC) for DC voltage and ratio measurements.

range

Parameter range

resolution

Selects the measurement resolution for DC voltage and ratio measurements.

autorange

Parameter autorange

autozero

Disables or enables the autozero mode for DC voltage and ratio measurements.

aperture_mode

Enables the setting of integration time in seconds (called aperture time) for DC voltage measurements.

aperture_time

Specifies the integration time in seconds (called aperture time) with 2 µs resolution for DC voltage measurements.

volt

Parameter volt

curr

Parameter curr

ac_volt

Parameter ac_volt

ac_curr

Parameter ac_curr

res

Parameter res

four_wire_res

Parameter four_wire_res

timetrace_npts

Parameter timetrace_npts

timetrace_dt

Parameter timetrace_dt

time_axis

Parameter time_axis

timetrace

Parameter timetrace

Methods:

init_measurement()

Change the state of the triggering system from "idle" to "wait-for-trigger", and clear the previous set of measurements from reading memory.

reset()

Reset the instrument to factory defaults.

abort_measurement()

Abort a measurement in progress, returning the instrument to the trigger idle state.

fetch()

Waits for measurements to complete and copies all available measurements to the instrument's output buffer.

read()

Starts a new set of measurements, waits for all measurements to complete, and transfers all available measurements.

autorange_once()

Performs immediate autorange and then turns autoranging off.

increase_range([range_value, increase_by])

Increases the voltage range by a certain amount with default of 1.

decrease_range([range_value, decrease_by])

Decrease the voltage range by a certain amount with default of -1.

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

model = idn['model']

The model number of the instrument

ranges = [10**n for n in range(-1, 4)]

A list of the available voltage ranges

NPLC_list = PLCs[self.model]

A list of the available Power Line Cycle settings

sense_function: Parameter = self.add_parameter( "sense_function", label="Instrument sense function", get_cmd="SENSe:FUNCtion?", set_cmd="SENSe:FUNCtion {}", val_mapping={ "DC Voltage": '"VOLT"', "AC Voltage": '"VOLT:AC"', "DC Current": '"CURR"', "AC Current": '"CURR:AC"', "2 Wire Resistance": '"RES"', "4 Wire Resistance": '"FRES"', }, )

Parameter sense_function

line_frequency: Parameter = self.add_parameter( "line_frequency", get_cmd="SYSTem:LFRequency?", get_parser=int, set_cmd=False, label="Line Frequency", unit="Hz", docstring=( "The frequency of the power line where the instrument is plugged" ), )

The frequency of the power line where the instrument is plugged

NPLC: Parameter = self.add_parameter( "NPLC", get_cmd="SENSe:VOLTage:DC:NPLC?", get_parser=float, set_cmd=self._set_NPLC, vals=vals.Enum(*self.NPLC_list), label="Integration time", unit="NPLC", docstring=textwrap.dedent( """\ Sets the integration time in number of power line cycles (PLC) for DC voltage and ratio measurements. Integration time is the period that the instrument's analog-to-digital (A/D) converter samples the input signal for a measurement. A longer integration time gives better measurement resolution but slower measurement speed. Only integration times of 1, 10, or 100 PLC provide normal mode (line frequency noise) rejection. Setting the integration time also sets the measurement resolution.""" ), )

Sets the integration time in number of power line cycles (PLC) for DC voltage and ratio measurements. Integration time is the period that the instrument’s analog-to-digital (A/D) converter samples the input signal for a measurement. A longer integration time gives better measurement resolution but slower measurement speed.

Only integration times of 1, 10, or 100 PLC provide normal mode (line frequency noise) rejection.

Setting the integration time also sets the measurement resolution.

range: Parameter = self.add_parameter( "range", get_cmd="SENSe:VOLTage:DC:RANGe?", get_parser=float, set_cmd="SENSe:VOLTage:DC:RANGe {:f}", vals=vals.Enum(*self.ranges), )

Parameter range

resolution: Parameter = self.add_parameter( "resolution", get_cmd="SENSe:VOLTage:DC:RESolution?", get_parser=float, set_cmd=self._set_resolution, label="Resolution", unit="V", vals=vals.MultiType(vals.Numbers(0), vals.Enum("MIN", "MAX", "DEF")), docstring=textwrap.dedent( """\ Selects the measurement resolution for DC voltage and ratio measurements. The resolution is specified in the same units as the selected measurement function, not in number of digits. You can also specify MIN (best resolution) or MAX (worst resolution). To achieve normal mode (line frequency noise) rejection, use a resolution that corresponds to an integration time that is an integral number of power line cycles. Refer to "Resolution Table" or "Range, Resolution and NPLC" sections of the instrument's manual for the available ranges for the resolution values.""" ), )

Selects the measurement resolution for DC voltage and ratio measurements. The resolution is specified in the same units as the selected measurement function, not in number of digits.

You can also specify MIN (best resolution) or MAX (worst resolution).

To achieve normal mode (line frequency noise) rejection, use a resolution that corresponds to an integration time that is an integral number of power line cycles.

Refer to “Resolution Table” or “Range, Resolution and NPLC” sections of the instrument’s manual for the available ranges for the resolution values.

autorange: Parameter = self.add_parameter( "autorange", label="Autorange", set_cmd="SENSe:VOLTage:DC:RANGe:AUTO {}", get_cmd="SENSe:VOLTage:DC:RANGe:AUTO?", val_mapping={"ON": 1, "OFF": 0}, vals=vals.Enum("ON", "OFF"), )

Parameter autorange

autozero: Parameter = self.add_parameter( "autozero", label="Autozero", set_cmd="SENSe:VOLTage:DC:ZERO:AUTO {}", get_cmd="SENSe:VOLTage:DC:ZERO:AUTO?", val_mapping={"ON": 1, "OFF": 0, "ONCE": "ONCE"}, vals=vals.Enum("ON", "OFF", "ONCE"), docstring=textwrap.dedent( """\ Disables or enables the autozero mode for DC voltage and ratio measurements. ON: the DMM internally measures the offset following each measurement. It then subtracts that measurement from the preceding reading. This prevents offset voltages present on the DMM's input circuitry from affecting measurement accuracy. OFF: the instrument uses the last measured zero measurement and subtracts it from each measurement. It takes a new zero measurement each time you change the function, range or integration time. ONCE: the instrument takes one zero measurement and sets autozero OFF. The zero measurement taken is used for all subsequent measurements until the next change to the function, range or integration time. If the specified integration time is less than 1 PLC, the zero measurement is taken at 1 PLC to optimize noise rejection. Subsequent measurements are taken at the specified fast (< 1 PLC) integration time.""" ), )

Disables or enables the autozero mode for DC voltage and ratio measurements.

ON:

the DMM internally measures the offset following each measurement. It then subtracts that measurement from the preceding reading. This prevents offset voltages present on the DMM’s input circuitry from affecting measurement accuracy.

OFF:

the instrument uses the last measured zero measurement and subtracts it from each measurement. It takes a new zero measurement each time you change the function, range or integration time.

ONCE:

the instrument takes one zero measurement and sets autozero OFF. The zero measurement taken is used for all subsequent measurements until the next change to the function, range or integration time. If the specified integration time is less than 1 PLC, the zero measurement is taken at 1 PLC to optimize noise rejection. Subsequent measurements are taken at the specified fast (< 1 PLC) integration time.

aperture_mode: Parameter

Enables the setting of integration time in seconds (called aperture time) for DC voltage measurements. If aperture time mode is disabled (default), the integration time is set in PLC (power-line cycles).

aperture_time: Parameter

Specifies the integration time in seconds (called aperture time) with 2 µs resolution for DC voltage measurements.

Use this command for precise control of the DMM’s integration time. Use NPLC for better power-line noise rejection characteristics (NPLC > 1).

Setting the aperture time automatically enables the aperture mode.

volt: Parameter = self.add_parameter( "volt", get_cmd=partial(self._get_parameter, "DC Voltage"), label="Voltage", unit="V", snapshot_get=False, )

Parameter volt

curr: Parameter = self.add_parameter( "curr", get_cmd=partial(self._get_parameter, "DC Current"), label="Current", unit="A", snapshot_get=False, )

Parameter curr

ac_volt: Parameter = self.add_parameter( "ac_volt", get_cmd=partial(self._get_parameter, "AC Voltage"), label="AC Voltage", unit="V", snapshot_get=False, )

Parameter ac_volt

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
ac_curr: Parameter = self.add_parameter( "ac_curr", get_cmd=partial(self._get_parameter, "AC Current"), label="AC Current", unit="A", snapshot_get=False, )

Parameter ac_curr

res: Parameter = self.add_parameter( "res", get_cmd=partial(self._get_parameter, "2 Wire Resistance"), label="Resistance", unit="Ohms", snapshot_get=False, )

Parameter res

four_wire_res: Parameter = self.add_parameter( "four_wire_res", get_cmd=partial(self._get_parameter, "4 Wire Resistance"), label="Resistance", unit="Ohms", snapshot_get=False, )

Parameter four_wire_res

timetrace_npts: Parameter = self.add_parameter( "timetrace_npts", label="Time trace number of points", initial_value=500, get_cmd=None, set_cmd=None, vals=vals.Ints(1), )

Parameter timetrace_npts

timetrace_dt: Parameter = self.add_parameter( "timetrace_dt", label="Time trace time interval", unit="s", initial_value=1e-1, get_cmd=None, set_cmd=None, vals=vals.Numbers(0), )

Parameter timetrace_dt

time_axis: TimeAxis = self.add_parameter( "time_axis", label="Time", unit="s", snapshot_value=False, vals=vals.Arrays(shape=(self.timetrace_npts,)), parameter_class=TimeAxis, )

Parameter time_axis

timetrace: TimeTrace = self.add_parameter( "timetrace", vals=vals.Arrays(shape=(self.timetrace_npts,)), setpoints=(self.time_axis,), parameter_class=TimeTrace, )

Parameter timetrace

init_measurement() None[source]

Change the state of the triggering system from “idle” to “wait-for-trigger”, and clear the previous set of measurements from reading memory.

This method is an “overlapped” command. This means that after executing it, you can send other commands that do not affect the measurements.

Storing measurements in reading memory with this method is faster than sending measurements to the instrument’s output buffer using read method (“READ?” command) (provided you do not fetch, “FETCh?” command, until done).

reset() None[source]

Reset the instrument to factory defaults. Also updates the snapshot to reflect the new (default) values of parameters.

abort_measurement() None[source]

Abort a measurement in progress, returning the instrument to the trigger idle state.

fetch() ndarray[source]

Waits for measurements to complete and copies all available measurements to the instrument’s output buffer. The readings remain in reading memory.

This query does not erase measurements from the reading memory. You can call this method multiple times to retrieve the same data.

Returns:

a 1D numpy array of all measured values that are currently in the reading memory

read() ndarray[source]

Starts a new set of measurements, waits for all measurements to complete, and transfers all available measurements.

This method is similar to calling init_measurement() followed immediately by fetch().

Returns:

a 1D numpy array of all measured values

autorange_once() None[source]

Performs immediate autorange and then turns autoranging off.

The value of the range parameter is also updated.

increase_range(range_value: float | None = None, increase_by: int = 1) None[source]

Increases the voltage range by a certain amount with default of 1. If limit is reached, the max range is used.

Parameters:
  • range_value – The desired voltage range needed. Expressed by power of 10^x range from -3 to 10

  • increase_by – How much to increase range by, default behavior is by a step of one.

decrease_range(range_value: float | None = None, decrease_by: int = -1) None[source]

Decrease the voltage range by a certain amount with default of -1. If limit is reached, the min range is used.

Parameters:
  • range_value – The desired voltage range needed. Expressed by power of 10^x range from -3 to 10

  • decrease_by – How much to decrease range by, default behavior is by a step of one.

class qcodes.instrument_drivers.Keysight.Keysight344xxADisplay(parent: Keysight344xxA, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Implements interaction with the display of Keysight 344xxA.

Attributes:

enabled

Disables or enables the front panel display.

text

Displays the given text on the screen.

Methods:

clear()

Clear text from display.

enabled: Parameter = self.add_parameter( "enabled", label="Display enabled", set_cmd="DISPlay:STATe {}", get_cmd="DISPlay:STATe?", val_mapping={True: 1, False: 0}, docstring=textwrap.dedent( """\ Disables or enables the front panel display. When disabled, the display dims, and all annunciators are disabled. However, the screen remains on. Disabling the display improves command execution speed from the remote interface and provides basic security. Displaying text with `display.text` parameter will work even when the display is disabled.""" ), )

Disables or enables the front panel display. When disabled, the display dims, and all annunciators are disabled. However, the screen remains on.

Disabling the display improves command execution speed from the remote interface and provides basic security.

Displaying text with display.text parameter will work even when the display is disabled.

text: Parameter = self.add_parameter( "text", label="Display text", set_cmd='DISPLAY:TEXT "{}"', get_cmd="DISPLAY:TEXT?", initial_value="", get_parser=lambda s: s.strip('"'), vals=vals.Strings(), docstring=textwrap.dedent( """\ Displays the given text on the screen. Specifying empty string moves the display back to its normal state. The same can be achieved by calling `display.clear`.""" ), )

Displays the given text on the screen. Specifying empty string moves the display back to its normal state. The same can be achieved by calling display.clear.

clear() None[source]

Clear text from display. Depending on the display being enabled/disabled, this either returns to display’s normal state or leaves it black, respectively.

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.Keysight.Keysight344xxASample(parent: Keysight344xxA, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Implements sampling parameters of Keysight 344xxA.

Attributes:

count

Specifies the number of measurements (samples) the instrument takes per trigger.

pretrigger_count

Allows collection of the data being digitized the trigger.

source

Determines sampling time, immediate or using sample.timer

timer

The value is rounded by the instrument to the nearest step.

timer_minimum

This value is measurement dependent.

count: Parameter = self.add_parameter( "count", label="Sample Count", set_cmd="SAMPle:COUNt {}", get_cmd="SAMPle:COUNt?", vals=vals.MultiType( vals.Numbers(1, _max_sample_count), vals.Enum("MIN", "MAX", "DEF") ), get_parser=int, docstring=textwrap.dedent( """\ Specifies the number of measurements (samples) the instrument takes per trigger. For the models 34460A and above, MAX selects 1 billion readings. However, when pretrigger is selected, the maximum is 50,000 readings (without the MEM option) or 2,000,000 readings (with the MEM option). For the model 34410A the maximum is 50,000 readings, and for the model 34411A the maximum is 1,000,000 readings. The latter does not depend on the pretrigger count.""" ), )

Specifies the number of measurements (samples) the instrument takes per trigger.

For the models 34460A and above, MAX selects 1 billion readings. However, when pretrigger is selected, the maximum is 50,000 readings (without the MEM option) or 2,000,000 readings (with the MEM option). For the model 34410A the maximum is 50,000 readings, and for the model 34411A the maximum is 1,000,000 readings. The latter does not depend on the pretrigger count.

pretrigger_count: Parameter

Allows collection of the data being digitized the trigger. Reserves memory for pretrigger samples up to the specified num. of pretrigger samples.

Note that the maximum number of pretrigger counts is bounded by the current number of sample counts as specified via the sample.count parameter. Refer to the doc of the sample.count parameter for information on the maximum number of sample counts.

source: Parameter

Determines sampling time, immediate or using sample.timer

timer: Parameter = self.add_parameter( "timer", label="Sample Timer", set_cmd="SAMPle:TIMer {}", get_cmd="SAMPle:TIMer?", unit="s", vals=vals.MultiType(vals.Numbers(0, 3600), vals.Enum("MIN", "MAX", "DEF")), get_parser=float, docstring=textwrap.dedent( """\ The value is rounded by the instrument to the nearest step. For DC measurements, the step size is 1 µs. For AC measurements, it is AC bandwidth dependent. Special values are: MIN - recommended minimum, MAX - maximum, DEF - default. In order to obtain the actual value of the parameter that gets set when setting it to one of these special values, just call the get method of the parameter, or use corresponding parameters in this driver, like `sample.timer_minimum`. Specifying a value that is between the absolute minimum (assumes no range changes) and the recommended minimum value, may generate a timing violation error when making measurements. Applying a value less than the absolute minimum will generate an error.""" ), )

The value is rounded by the instrument to the nearest step. For DC measurements, the step size is 1 µs. For AC measurements, it is AC bandwidth dependent.

Special values are: MIN - recommended minimum, MAX - maximum, DEF - default. In order to obtain the actual value of the parameter that gets set when setting it to one of these special values, just call the get method of the parameter, or use corresponding parameters in this driver, like sample.timer_minimum.

Specifying a value that is between the absolute minimum (assumes no range changes) and the recommended minimum value, may generate a timing violation error when making measurements.

Applying a value less than the absolute minimum will generate an error.

timer_minimum: Parameter = self.add_parameter( "timer_minimum", label="Minimal recommended sample time", get_cmd="SAMPle:TIMer? MIN", get_parser=float, unit="s", docstring=textwrap.dedent( """\ This value is measurement dependent. It depends on such things as the integration time, autozero on or off, autorange on or off, and the measurement range. Basically, the minimum is automatically determined by the instrument so that the sample interval is always greater than the sampling time. Since the minimum value changes depending on configuration, a command order dependency exists. You must completely configure the measurement before setting the sample timer to minimum, or you may generate an error. A complete configuration includes such things as math statistics or scaling. When using autorange, the minimum value is the recommended value, not the absolute minimum value. With autorange enabled, minimum value is calculated assuming a single range change will occur for every measurement (not multiple ranges, just one range up or down per measurement).""" ), )

This value is measurement dependent. It depends on such things as the integration time, autozero on or off, autorange on or off, and the measurement range. Basically, the minimum is automatically determined by the instrument so that the sample interval is always greater than the sampling time.

Since the minimum value changes depending on configuration, a command order dependency exists. You must completely configure the measurement before setting the sample timer to minimum, or you may generate an error. A complete configuration includes such things as math statistics or scaling.

When using autorange, the minimum value is the recommended value, not the absolute minimum value. With autorange enabled, minimum value is calculated assuming a single range change will occur for every measurement (not multiple ranges, just one range up or down per measurement).

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.Keysight.Keysight344xxATrigger(parent: Keysight344xxA, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Implements triggering parameters and methods of Keysight 344xxA.

Attributes:

count

Selects the number of triggers that are accepted by the instrument before returning to the "idle" trigger state.

delay

Sets the delay between the trigger signal and the first measurement.

auto_delay_enabled

Disables or enables automatic trigger delay.

slope

Parameter slope

level

Sets the level on which a trigger occurs when level triggering is enabled (trigger.source set to "INT").

source

Parameter source

Methods:

force()

Triggers the instrument if trigger.source is "BUS".

count: Parameter = self.add_parameter( "count", label="Trigger Count", set_cmd="TRIGger:COUNt {}", get_cmd="TRIGger:COUNt?", get_parser=float, vals=vals.MultiType( vals.Numbers(1, _max_trigger_count), vals.Enum("MIN", "MAX", "DEF", "INF"), ), docstring=textwrap.dedent( """\ Selects the number of triggers that are accepted by the instrument before returning to the "idle" trigger state. You can use the specified trigger count in conjunction with `sample_count`. In this case, the number of measurements returned is the sample count multiplied by the trigger count. A variable trigger count is not available from the front panel. However, when you return to remote control of the instrument, the trigger count returns to the previous value you selected.""" ), )

Selects the number of triggers that are accepted by the instrument before returning to the “idle” trigger state.

You can use the specified trigger count in conjunction with sample_count. In this case, the number of measurements returned is the sample count multiplied by the trigger count.

A variable trigger count is not available from the front panel. However, when you return to remote control of the instrument, the trigger count returns to the previous value you selected.

delay: Parameter = self.add_parameter( "delay", label="Trigger Delay", unit="s", set_cmd="TRIGger:DELay {}", get_cmd="TRIGger:DELay?", vals=vals.MultiType(vals.Numbers(0, 3600), vals.Enum("MIN", "MAX", "DEF")), get_parser=float, docstring=textwrap.dedent( """\ Sets the delay between the trigger signal and the first measurement. This may be useful in applications where you want to allow the input to settle before taking a measurement or for pacing a burst of measurements. Step size for DC measurements is approximately 1 µs. For AC measurements, step size depends on AC bandwidth. Selecting a specific trigger delay disables the automatic trigger delay.""" ), )

Sets the delay between the trigger signal and the first measurement. This may be useful in applications where you want to allow the input to settle before taking a measurement or for pacing a burst of measurements.

Step size for DC measurements is approximately 1 µs. For AC measurements, step size depends on AC bandwidth.

Selecting a specific trigger delay disables the automatic trigger delay.

auto_delay_enabled: Parameter = self.add_parameter( "auto_delay_enabled", label="Auto Trigger Delay Enabled", set_cmd="TRIGger:DELay:AUTO {}", get_cmd="TRIGger:DELay:AUTO?", get_parser=int, val_mapping={True: 1, False: 0}, docstring=textwrap.dedent( """\ Disables or enables automatic trigger delay. If enabled, the instrument determines the delay based on function, range, and integration time or bandwidth. Selecting a specific trigger delay using `trigger.delay` disables the automatic trigger delay.""" ), )

Disables or enables automatic trigger delay. If enabled, the instrument determines the delay based on function, range, and integration time or bandwidth.

Selecting a specific trigger delay using trigger.delay disables the automatic trigger delay.

slope: Parameter = self.add_parameter( "slope", label="Trigger Slope", set_cmd="TRIGger:SLOPe {}", get_cmd="TRIGger:SLOPe?", vals=vals.Enum("POS", "NEG"), )

Parameter slope

level: Parameter

Sets the level on which a trigger occurs when level triggering is enabled (trigger.source set to “INT”).

Note that for 100 mV to 100 V ranges and autorange is off, the trigger level can only be set within ±120% of the range.

source: Parameter = self.add_parameter( "source", label="Trigger Source", set_cmd="TRIGger:SOURce {}", get_cmd="TRIGger:SOURce?", vals=_trigger_source_vals, docstring=_trigger_source_docstring, )

Parameter source

force() None[source]

Triggers the instrument if trigger.source is “BUS”.

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.Keysight.Keysight34934A(parent: VisaInstrument | InstrumentChannel, name: str, slot: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: Keysight34980ASwitchMatrixSubModule

InstrumentModule that represents the Keysight34934A module

Parameters:
  • parent – the system which the module is installed on

  • name – user defined name for the module

  • slot – the slot the module is installed

A base class for Switch Matrix submodules for the 34980A systems.

Parameters:
  • parent – the system which the module is installed on

  • name – user defined name for the module

  • slot – the slot the module is installed

  • **kwargs – Forwarded to base class.

Attributes:

protection_mode

get and set the relay protection mode.

Methods:

write(cmd)

When the module is safety interlocked, users can not make any connections.

validate_value(row, column)

to check if the row and column number is within the range of the module layout.

to_channel_list(paths[, wiring_config])

convert the (row, column) pair to a 4-digit channel number 'sxxx', where s is the slot number, xxx is generated from the numbering function.

get_numbering_function(rows, columns[, ...])

to select the correct numbering function based on the matrix layout.

protection_mode: Parameter = self.add_parameter( name="protection_mode", get_cmd=self._get_relay_protection_mode, set_cmd=self._set_relay_protection_mode, vals=validators.Enum("AUTO100", "AUTO0", "FIX", "ISO"), docstring="get and set the relay protection mode. " "The fastest switching speeds for relays " "in a given signal path are achieved using " "the FIXed or ISOlated modes, followed " "by the AUTO100 and AUTO0 modes. " "There may be a maximum of 200 Ohm of " "resistance, which can only be bypassed " "by 'AUTO0' mode. See manual and " "programmer's reference for detail.", )

get and set the relay protection mode. The fastest switching speeds for relays in a given signal path are achieved using the FIXed or ISOlated modes, followed by the AUTO100 and AUTO0 modes. There may be a maximum of 200 Ohm of resistance, which can only be bypassed by “AUTO0” mode. See manual and programmer’s reference for detail.

write(cmd: str) None[source]

When the module is safety interlocked, users can not make any connections. There will be no effect when try to connect any channels.

validate_value(row: int, column: int) None[source]

to check if the row and column number is within the range of the module layout.

Parameters:
  • row – row value

  • column – column value

to_channel_list(paths: list[tuple[int, int]], wiring_config: str | None = '') str[source]

convert the (row, column) pair to a 4-digit channel number ‘sxxx’, where s is the slot number, xxx is generated from the numbering function.

Parameters:
  • paths – list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]

  • wiring_config – for 1-wire matrices, values are ‘MH’, ‘ML’; for 2-wire matrices, values are ‘M1H’, ‘M2H’, ‘M1L’, ‘M2L’

Returns:

in the format of ‘(@sxxx, sxxx, sxxx, sxxx)’, where sxxx is a 4-digit channel number

static get_numbering_function(rows: int, columns: int, wiring_config: str | None = '') Callable[[int, int], str][source]

to select the correct numbering function based on the matrix layout. On P168 of the user’s guide for Agilent 34934A High Density Matrix Module: http://literature.cdn.keysight.com/litweb/pdf/34980-90034.pdf there are eleven equations. This function here simplifies them to one.

Parameters:
  • rows – the total row number of the matrix module

  • columns – the total column number of the matrix module

  • wiring_config – wiring configuration for 1 or 2 wired matrices

Returns:

The numbering function to convert row and column in to a 3-digit number

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.Keysight.Keysight34980A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

QCodes driver for 34980A switch/measure unit

Create an instance of the instrument.

Parameters:
  • name – Name of the instrument instance

  • address – Visa-resolvable instrument address.

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

system_slots_info

Methods:

get_status()

Queries status register

get_error()

Queries error queue

clear_status()

Clears status register and error queue of the instrument.

reset()

Performs an instrument reset.

ask(cmd)

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

write(cmd)

Write a command string with NO response to the hardware.

scan_slots()

Scan the occupied slots and make an object for each switch matrix module installed

disconnect_all([slot])

to open/disconnect all connections on select module

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

get_status() int[source]

Queries status register

Returns:

0 if there is no error

get_error() str[source]

Queries error queue

Returns:

error message, or ‘+0,”No error”’ if there is no error

clear_status() None[source]

Clears status register and error queue of the instrument.

reset() None[source]

Performs an instrument reset. Does not reset error queue!

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.

write(cmd: str) None[source]

Write a command string with NO response to the hardware.

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

Parameters:

cmd – The string to send to the instrument.

Raises:

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

scan_slots() None[source]

Scan the occupied slots and make an object for each switch matrix module installed

property system_slots_info: dict[int, dict[str, str]]
disconnect_all(slot: int | None = None) None[source]

to open/disconnect all connections on select module

Parameters:

slot – slot number, between 1 and 8 (self._total_slot), default value is None, which means all slots

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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.Keysight.Keysight34980ASwitchMatrixSubModule(parent: VisaInstrument | InstrumentChannel, name: str, slot: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

A base class for Switch Matrix submodules for the 34980A systems.

Parameters:
  • parent – the system which the module is installed on

  • name – user defined name for the module

  • slot – the slot the module is installed

  • **kwargs – Forwarded to base class.

Methods:

validate_value(row, column)

to check if the row and column number is within the range of the module layout.

to_channel_list(paths[, wiring_config])

convert the (row, column) pair to a 4-digit channel number 'sxxx', where s is the slot number, xxx is generated from the numbering function.

is_open(row, column)

to check if a channel is open/disconnected

is_closed(row, column)

to check if a channel is closed/connected

connect(row, column)

to connect/close the specified channels

disconnect(row, column)

to disconnect/open the specified channels

connect_paths(paths)

to connect/close the specified channels.

disconnect_paths(paths)

to disconnect/open the specified channels.

are_closed(paths)

to check if a list of channels is closed/connected

are_open(paths)

to check if a list of channels is open/disconnected

validate_value(row: int, column: int) None[source]

to check if the row and column number is within the range of the module layout.

Parameters:
  • row – row value

  • column – column value

to_channel_list(paths: list[tuple[int, int]], wiring_config: str | None = None) str[source]

convert the (row, column) pair to a 4-digit channel number ‘sxxx’, where s is the slot number, xxx is generated from the numbering function. This may be different for different modules.

Parameters:
  • paths – list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]

  • wiring_config – for 1-wire matrices, values are ‘MH’, ‘ML’; for 2-wire matrices, values are ‘M1H’, ‘M2H’, ‘M1L’, ‘M2L’

Returns:

in the format of ‘(@sxxx, sxxx, sxxx, sxxx)’, where sxxx is a 4-digit channel number

is_open(row: int, column: int) bool[source]

to check if a channel is open/disconnected

Parameters:
  • row – row number

  • column – column number

Returns:

True if the channel is open/disconnected False if it’s closed/connected.

is_closed(row: int, column: int) bool[source]

to check if a channel is closed/connected

Parameters:
  • row – row number

  • column – column number

Returns:

True if the channel is closed/connected False if it’s open/disconnected.

connect(row: int, column: int) None[source]

to connect/close the specified channels

Parameters:
  • row – row number

  • column – column number

disconnect(row: int, column: int) None[source]

to disconnect/open the specified channels

Parameters:
  • row – row number

  • column – column number

connect_paths(paths: list[tuple[int, int]]) None[source]

to connect/close the specified channels.

Parameters:

paths – list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]

disconnect_paths(paths: list[tuple[int, int]]) None[source]

to disconnect/open the specified channels.

Parameters:

paths – list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]

are_closed(paths: list[tuple[int, int]]) list[bool][source]

to check if a list of channels is closed/connected

Parameters:

paths – list of channels [(r1, c1), (r2, c2), (r3, c3)]

Returns:

a list of True and/or False True if the channel is closed/connected False if it’s open/disconnected.

are_open(paths: list[tuple[int, int]]) list[bool][source]

to check if a list of channels is open/disconnected

Parameters:

paths – list of channels [(r1, c1), (r2, c2), (r3, c3)]

Returns:

a list of True and/or False True if the channel is closed/connected False if it’s open/disconnected.

class qcodes.instrument_drivers.Keysight.KeysightB1500(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Driver for Keysight B1500 Semiconductor Parameter Analyzer.

For the list of supported modules, refer to from_model_name().

Attributes:

calibration_time_out

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

autozero_enabled

Enable or disable cancelling of the offset of the high-resolution A/D converter (ADC).

run_iv_staircase_sweep

This is MultiParameter.

Methods:

write(cmd)

Extend write method from the super to ask for error message each time a write command is called.

add_module(name, module)

reset()

Performs an instrument reset.

get_status()

from_model_name(model, slot_nr, parent[, name])

Creates the correct instance of instrument module by model name.

enable_channels([channels])

Enable specified channels.

disable_channels([channels])

Disable specified channels.

parse_spot_measurement_response()

Extract measured value and accompanying metadata from the string and return them as a dictionary.

parse_module_query_response()

Extract installed module information from the given string and return the information as a dictionary.

use_nplc_for_high_speed_adc([n])

Set the high-speed ADC to NPLC mode, with optionally defining number of averaging samples via argument n.

use_nplc_for_high_resolution_adc([n])

Set the high-resolution ADC to NPLC mode, with optionally defining the number of PLCs per sample via argument n.

use_manual_mode_for_high_speed_adc([n])

Set the high-speed ADC to manual mode, with optionally defining number of averaging samples via argument n.

self_calibration([slot])

Performs the self calibration of the specified module (SMU) and returns the result.

error_message([mode])

This method reads one error code from the head of the error queue and removes that code from the queue.

clear_buffer_of_error_message()

This method clears the error message stored in buffer when the error_message command is executed.

clear_timer_count([chnum])

This command clears the timer count.

set_measurement_mode(mode[, channels])

This method specifies the measurement mode and the channels used for measurements.

get_measurement_mode()

This method gets the measurement mode(MM) and the channels used for measurements.

get_response_format_and_mode()

This method queries the the data output format and mode.

enable_smu_filters(enable_filter[, channels])

This methods sets the connection mode of a SMU filter for each channel.

calibration_time_out = 60
default_terminator: str | None = '\r\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

by_slot: dict[constants.SlotNr, KeysightB1500Module] = {}
by_channel: dict[constants.ChNr, KeysightB1500Module] = {}
by_kind: dict[constants.ModuleKind, list[KeysightB1500Module]] = ( defaultdict(list) )
autozero_enabled: Parameter = self.add_parameter( "autozero_enabled", unit="", label="Autozero enabled of the high-resolution ADC", set_cmd=self._set_autozero, get_cmd=None, val_mapping=create_on_off_val_mapping(on_val=True, off_val=False), initial_cache_value=False, docstring=textwrap.dedent( """ Enable or disable cancelling of the offset of the high-resolution A/D converter (ADC). Set the function to OFF in cases that the measurement speed is more important than the measurement accuracy. This roughly halves the integration time.""" ), )

Enable or disable cancelling of the offset of the high-resolution A/D converter (ADC).

Set the function to OFF in cases that the measurement speed is more important than the measurement accuracy. This roughly halves the integration time.

run_iv_staircase_sweep: IVSweepMeasurement = self.add_parameter( name="run_iv_staircase_sweep", parameter_class=IVSweepMeasurement, docstring=textwrap.dedent( """ This is MultiParameter. Running the sweep runs the measurement on the list of source values defined using `setup_staircase_sweep` method. The output is a primary parameter (e.g. Gate current) and a secondary parameter (e.g. Source/Drain current) both of which use the same setpoints. Note you must `set_measurement_mode` and specify 2 channels as the argument before running the sweep. First channel (SMU) must be the channel on which you set the sweep ( WV) and second channel(SMU) must be the one which remains at constants voltage. """ ), )

This is MultiParameter. Running the sweep runs the measurement on the list of source values defined using setup_staircase_sweep method. The output is a primary parameter (e.g. Gate current) and a secondary parameter (e.g. Source/Drain current) both of which use the same setpoints. Note you must set_measurement_mode and specify 2 channels as the argument before running the sweep. First channel (SMU) must be the channel on which you set the sweep ( WV) and second channel(SMU) must be the one which remains at constants voltage.

write(cmd: str) None[source]

Extend write method from the super to ask for error message each time a write command is called.

add_module(name: str, module: KeysightB1500Module) None[source]
reset() None[source]

Performs an instrument reset.

This does not reset error queue!

get_status() int[source]
static from_model_name(model: str, slot_nr: int, parent: KeysightB1500, name: str | None = None) KeysightB1500Module[source]

Creates the correct instance of instrument module by model name.

Parameters:
  • model – Model name such as ‘B1517A’

  • slot_nr – Slot number of this module (not channel number)

  • parent – Reference to B1500 mainframe instance

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

Returns:

A specific instance of B1500Module

enable_channels(channels: Sequence[ChNr | int] | None = None) None[source]

Enable specified channels.

If channels is omitted or None, then all channels are enabled.

disable_channels(channels: Sequence[ChNr | int] | None = None) None[source]

Disable specified channels.

If channels is omitted or None, then all channels are disabled.

parse_spot_measurement_response() SpotResponse

Extract measured value and accompanying metadata from the string and return them as a dictionary.

Parameters:

response – Response str to spot measurement query.

Returns:

Dictionary with measured value and associated metadata (e.g. timestamp, channel number, etc.)

parse_module_query_response() dict[SlotNr, str]

Extract installed module information from the given string and return the information as a dictionary.

Parameters:

response – Response str to UNT? 0 query.

Returns:

Dictionary from slot numbers to model name strings.

use_nplc_for_high_speed_adc(n: int | None = None) None[source]

Set the high-speed ADC to NPLC mode, with optionally defining number of averaging samples via argument n.

Parameters:

n

Value that defines the number of averaging samples given by the following formula:

Number of averaging samples = n / 128.

n=1 to 100. Default setting is 1 (if None is passed).

The Keysight B1500 gets 128 samples in a power line cycle, repeats this for the times you specify, and performs averaging to get the measurement data. (For more info see Table 4-21.). Note that the integration time will not be updated if a non-integer value is written to the B1500.

use_nplc_for_high_resolution_adc(n: int | None = None) None[source]

Set the high-resolution ADC to NPLC mode, with optionally defining the number of PLCs per sample via argument n.

Parameters:

n

Value that defines the integration time given by the following formula:

Integration time = n / power line frequency.

n=1 to 100. Default setting is 1 (if None is passed). (For more info see Table 4-21.). Note that the integration time will not be updated if a non-integer value is written to the B1500.

use_manual_mode_for_high_speed_adc(n: int | None = None) None[source]

Set the high-speed ADC to manual mode, with optionally defining number of averaging samples via argument n.

Use n=1 to disable averaging (n=None uses the default setting from the instrument which is also n=1).

Parameters:

n – Number of averaging samples, between 1 and 1023. Default setting is 1. (For more info see Table 4-21.) Note that the integration time will not be updated if a non-integer value is written to the B1500.

self_calibration(slot: SlotNr | int | None = None) CALResponse[source]

Performs the self calibration of the specified module (SMU) and returns the result. Failed modules are disabled, and can only be enabled by the RCV command.

Calibration takes about 30 seconds (the visa timeout for it is controlled by calibration_time_out attribute).

Execution Conditions: No SMU may be in the high voltage state (forcing more than ±42 V, or voltage compliance set to more than ±42 V). Before starting the calibration, open the measurement terminals.

Parameters:

slot – Slot number of the slot that installs the module to perform the self-calibration. For Ex: constants.SlotNr.ALL, MAINFRAME, SLOT01, SLOT02 …SLOT10 If not specified, the calibration is performed for all the modules and the mainframe.

error_message(mode: Mode | int | None = None) str[source]

This method reads one error code from the head of the error queue and removes that code from the queue. The read error is returned as the response of this method.

Parameters:

mode – If no valued passed returns both the error value and the error message. See constants.ERRX.Mode for possible arguments.

Returns:

In the default case response message contains an error message and a custom message containing additional information such as the slot number. They are separated by a semicolon (;). For example, if the error 305 occurs on the slot 1, this method returns the following response. 305,”Excess current in HPSMU.; SLOT1” If no error occurred, this command returns 0,”No Error.”

clear_buffer_of_error_message() None[source]

This method clears the error message stored in buffer when the error_message command is executed.

clear_timer_count(chnum: int | None = None) None[source]

This command clears the timer count. This command is effective for all measurement modes, regardless of the TSC setting. This command is not effective for the 4 byte binary data output format (FMT3 and FMT4).

Parameters:

chnum – SMU or MFCMU channel number. Integer expression. 1 to 10. See Table 4-1 on page 16 of 2016 manual. If chnum is specified, this command clears the timer count once at the source output start by the DV, DI, or DCV command for the specified channel. The channel output switch of the specified channel must be ON when the timer count is cleared.

If chnum is not specified, this command clears the timer count immediately,

set_measurement_mode(mode: Mode | int, channels: Sequence[ChNr | int] | None = None) None[source]

This method specifies the measurement mode and the channels used for measurements. This method must be entered to specify the measurement mode. For the high speed spot measurements, do not use this method. NOTE Order of the channels are important. The SMU which is setup to run the sweep goes first.

Parameters:
  • mode – Measurement mode. See constants.MM.Mode for all possible modes

  • channels – Measurement channel number. See constants.ChannelList for all possible channels.

get_measurement_mode() dict[str, Mode | list[int]][source]

This method gets the measurement mode(MM) and the channels used for measurements. It outputs a dictionary with ‘mode’ and ‘channels’ as keys.

get_response_format_and_mode() dict[str, Format | Mode][source]

This method queries the the data output format and mode.

enable_smu_filters(enable_filter: bool, channels: Sequence[ChNr | int] | None = None) None[source]

This methods sets the connection mode of a SMU filter for each channel. A filter is mounted on the SMU. It assures clean source output with no spikes or overshooting. A maximum of ten channels can be set.

Parameters:
  • enable_filter – Status of the filter. False: Disconnect (initial setting). True: Connect.

  • channels – SMU channel number. Specify channel from constants.ChNr If you do not specify chnum, the FL command sets the same mode for all channels.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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.Keysight.KeysightB1500Module(parent: qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500, name: str | None, slot_nr: int, **kwargs: Unpack)[source]

Bases: InstrumentChannel

Base class for all modules of B1500 Parameter Analyzer

When subclassing,

  • set MODULE_KIND attribute to the correct module kind ModuleKind that the module is.

  • populate channels attribute according to the number of channels that the module has.

Parameters:
  • parent – Mainframe B1500 instance that this module belongs to

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

  • slot_nr – Slot number of this module (not channel number)

Attributes:

MODULE_KIND

Methods:

parse_spot_measurement_response()

Extract measured value and accompanying metadata from the string and return them as a dictionary.

parse_module_query_response()

Extract installed module information from the given string and return the information as a dictionary.

enable_outputs()

Enables all outputs of this module by closing the output relays of its channels.

disable_outputs()

Disables all outputs of this module by opening the output relays of its channels.

is_enabled()

Check if channels of this module are enabled.

clear_timer_count()

This command clears the timer count.

MODULE_KIND: ModuleKind
channels: tuple[ChNr, ...] = tuple[ChNr, ...]
parse_spot_measurement_response() SpotResponse

Extract measured value and accompanying metadata from the string and return them as a dictionary.

Parameters:

response – Response str to spot measurement query.

Returns:

Dictionary with measured value and associated metadata (e.g. timestamp, channel number, etc.)

parse_module_query_response() dict[SlotNr, str]

Extract installed module information from the given string and return the information as a dictionary.

Parameters:

response – Response str to UNT? 0 query.

Returns:

Dictionary from slot numbers to model name strings.

enable_outputs() None[source]

Enables all outputs of this module by closing the output relays of its channels.

disable_outputs() None[source]

Disables all outputs of this module by opening the output relays of its channels.

is_enabled() bool[source]

Check if channels of this module are enabled.

Returns:

True if all channels of this module are enabled. False, otherwise.

clear_timer_count() None[source]

This command clears the timer count. This command is effective for all measurement modes, regardless of the TSC setting. This command is not effective for the 4 byte binary data output format (FMT3 and FMT4).

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.Keysight.KeysightB1500CVSweepMeasurement(name: str, instrument: KeysightB1520A, **kwargs: Any)[source]

Bases: MultiParameter, StatusMixin

CV sweep measurement outputs a list of primary (capacitance) and secondary parameter (disipation).

Parameters:
  • name – Name of the Parameter.

  • instrument – Instrument to which this parameter communicates to.

Attributes:

param1

Data, statuses, etc.

param2

Data, statuses, etc.

ac_voltage

Data, statuses, etc.

dc_voltage

Data, statuses, etc.

Methods:

get_raw()

get_raw is called to perform the actual data acquisition from the instrument.

update_name_label_unit_from_impedance_model([model])

param1

Data, statuses, etc. of the first measured parameter

param2

Data, statuses, etc. of the second measured parameter

get_parser: Callable[..., Any] | None
set_parser: Callable[..., Any] | None
cache: _CacheProtocol
get_latest: GetLatest
get: Callable[..., ParamDataType]
set: Callable[..., None]
metadata: dict[str, Any]
ac_voltage

Data, statuses, etc. of the AC voltage that the measured parameters were measured for

dc_voltage

Data, statuses, etc. of the AC voltage that the measured parameters were measured for

power_line_frequency: int
get_raw() tuple[tuple[float, ...], tuple[float, ...]][source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

update_name_label_unit_from_impedance_model(model: MeasurementMode | None = None) None[source]
class qcodes.instrument_drivers.Keysight.KeysightB1500CVSweeper(parent: KeysightB1520A, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Attributes:

sweep_auto_abort

enables or disables the automatic abort function for the CV (DC bias) sweep measurement (MM18) and the pulsed bias sweep measurement (MM20).

post_sweep_voltage_condition

This command also sets the post measurement condition of the MFCMU.

hold_time

Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35, with 10 ms resolution.

delay

Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement.

step_delay

Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output.

trigger_delay

Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger.

measure_delay

Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement.

sweep_mode

Sweep mode.

sweep_start

Start value of the DC bias sweep (in V).

sweep_end

Stop value of the DC bias sweep (in V).

sweep_steps

Number of steps for staircase sweep.

sweep_auto_abort: Parameter = self.add_parameter( name="sweep_auto_abort", set_cmd=self._set_sweep_auto_abort, get_cmd=self._get_sweep_auto_abort, set_parser=constants.Abort, get_parser=constants.Abort, vals=vals.Enum(*list(constants.Abort)), initial_cache_value=constants.Abort.ENABLED, docstring=textwrap.dedent( """ enables or disables the automatic abort function for the CV (DC bias) sweep measurement (MM18) and the pulsed bias sweep measurement (MM20). The automatic abort function stops the measurement when one of the following conditions occurs: - NULL loop unbalance condition - IV amplifier saturation condition - Overflow on the AD converter """ ), )

enables or disables the automatic abort function for the CV (DC bias) sweep measurement (MM18) and the pulsed bias sweep measurement (MM20). The automatic abort function stops the measurement when one of the following conditions occurs:

  • NULL loop unbalance condition

  • IV amplifier saturation condition

  • Overflow on the AD converter

post_sweep_voltage_condition: Parameter = self.add_parameter( name="post_sweep_voltage_condition", set_cmd=self._set_post_sweep_voltage_condition, get_cmd=self._get_post_sweep_voltage_condition, set_parser=constants.WMDCV.Post, get_parser=constants.WMDCV.Post, vals=vals.Enum(*list(constants.WMDCV.Post)), initial_cache_value=constants.WMDCV.Post.START, docstring=textwrap.dedent( """ This command also sets the post measurement condition of the MFCMU. After the measurement is normally completed, the DC bias sweep source forces the value specified by the post parameter, and the pulsed bias sweep source forces the pulse base value. If the measurement is stopped by the automatic abort function, the DC bias sweep source forces the start value, and the pulsed bias sweep source forces the pulse base value after sweep. """ ), )

This command also sets the post measurement condition of the MFCMU. After the measurement is normally completed, the DC bias sweep source forces the value specified by the post parameter, and the pulsed bias sweep source forces the pulse base value. If the measurement is stopped by the automatic abort function, the DC bias sweep source forces the start value, and the pulsed bias sweep source forces the pulse base value after sweep.

hold_time: GroupParameter = self.add_parameter( name="hold_time", initial_value=0.0, vals=vals.Numbers(0, 655.35), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35, with 10 ms resolution. Numeric expression. """ ), )

Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35, with 10 ms resolution. Numeric expression.

delay: GroupParameter = self.add_parameter( name="delay", initial_value=0.0, vals=vals.Numbers(0, 65.535), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement. 0 to 65.535, with 0.1 ms resolution. Numeric expression. """ ), )

Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement. 0 to 65.535, with 0.1 ms resolution. Numeric expression.

step_delay: GroupParameter = self.add_parameter( name="step_delay", initial_value=0.0, vals=vals.Numbers(0, 1), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output. 0 to 1, with 0.1 ms resolution. Numeric expression. If this parameter is not set, step delay will be 0. If step delay is shorter than the measurement time, the B1500 waits until the measurement completes, then forces the next step output. """ ), )

Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output. 0 to 1, with 0.1 ms resolution. Numeric expression. If this parameter is not set, step delay will be 0. If step delay is shorter than the measurement time, the B1500 waits until the measurement completes, then forces the next step output.

trigger_delay: GroupParameter = self.add_parameter( name="trigger_delay", initial_value=0.0, unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger. 0 to the value of ``delay``, with 0.1 ms resolution. Numeric expression. If this parameter is not set, trigger delay will be 0. """ ), )

Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger. 0 to the value of delay, with 0.1 ms resolution. Numeric expression. If this parameter is not set, trigger delay will be 0.

measure_delay: GroupParameter = self.add_parameter( name="measure_delay", initial_value=0.0, unit="s", vals=vals.Numbers(0, 65.535), parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement. 0 to 65.535, with 0.1 ms resolution. Numeric expression. If this parameter is not set, measure delay will be 0. """ ), )

Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement. 0 to 65.535, with 0.1 ms resolution. Numeric expression. If this parameter is not set, measure delay will be 0.

sweep_mode: GroupParameter = self.add_parameter( name="sweep_mode", initial_value=constants.SweepMode.LINEAR, vals=vals.Enum(*list(constants.SweepMode)), set_parser=constants.SweepMode, parameter_class=GroupParameter, docstring=textwrap.dedent( """ Sweep mode. 1: Linear sweep (single stair, start to stop.) 2: Log sweep (single stair, start to stop.) 3: Linear sweep (double stair, start to stop to start.) 4: Log sweep (double stair, start to stop to start.) """ ), )

Sweep mode. 1: Linear sweep (single stair, start to stop.) 2: Log sweep (single stair, start to stop.) 3: Linear sweep (double stair, start to stop to start.) 4: Log sweep (double stair, start to stop to start.)

sweep_start: GroupParameter = self.add_parameter( name="sweep_start", initial_value=0.0, unit="V", vals=vals.Numbers(-25, 25), parameter_class=GroupParameter, docstring=textwrap.dedent( """ Start value of the DC bias sweep (in V). For the log sweep, start and stop must have the same polarity. """ ), )

Start value of the DC bias sweep (in V). For the log sweep, start and stop must have the same polarity.

sweep_end: GroupParameter = self.add_parameter( name="sweep_end", initial_value=0.0, unit="V", vals=vals.Numbers(-25, 25), parameter_class=GroupParameter, docstring=textwrap.dedent( """ Stop value of the DC bias sweep (in V). For the log sweep, start and stop must have the same polarity. """ ), )

Stop value of the DC bias sweep (in V). For the log sweep, start and stop must have the same polarity.

sweep_steps: GroupParameter = self.add_parameter( name="sweep_steps", initial_value=1, vals=vals.Ints(1, 1001), parameter_class=GroupParameter, docstring=textwrap.dedent( """ Number of steps for staircase sweep. Possible values from 1 to 1001""" ), )

Number of steps for staircase sweep. Possible values from 1 to 1001

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.Keysight.KeysightB1500Correction(parent: KeysightB1520A, name: str, **kwargs: Any)[source]

Bases: InstrumentChannel

A Keysight B1520A CMU submodule for performing open/short/load corrections.

Methods:

enable(corr)

This command enables the open/short/load correction.

disable(corr)

This command disables an open/short/load correction.

is_enabled(corr)

Query instrument to see if a correction of the given type is enabled.

set_reference_values(corr, mode, primary, ...)

This command disables the open/short/load correction function and defines the calibration value or the reference value of the open/short/load standard.

get_reference_values(corr)

This command returns the calibration values or the reference values of the open/short/load standard.

perform(corr)

Perform Open/Short/Load corrections using this method.

perform_and_enable(corr)

Perform the correction AND enable it.

enable(corr: CalibrationType) None[source]

This command enables the open/short/load correction. Before enabling a correction, perform the corresponding correction data measurement by using the perform().

Parameters:

corr – Depending on the the correction you want to perform, set this to OPEN, SHORT or LOAD. For ex: In case of open correction corr = constants.CalibrationType.OPEN.

disable(corr: CalibrationType) None[source]

This command disables an open/short/load correction.

Parameters:

corr – Correction type as in constants.CalibrationType

is_enabled(corr: CalibrationType) Response[source]

Query instrument to see if a correction of the given type is enabled.

Parameters:

corr – Correction type as in constants.CalibrationType

set_reference_values(corr: CalibrationType, mode: Mode, primary: float, secondary: float) None[source]

This command disables the open/short/load correction function and defines the calibration value or the reference value of the open/short/load standard. Any previously measured correction data will be invalid after calling this method.

Parameters:
  • corr – Correction mode from constants.CalibrationType. OPEN for Open correction SHORT for Short correction LOAD for Load correction.

  • mode – Measurement mode from constants.DCORR.Mode Cp-G (for open correction) Ls-Rs (for short or load correction).

  • primary – Primary reference value of the standard. Cp value for the open standard. in F. Ls value for the short or load standard. in H.

  • secondary – Secondary reference value of the standard. G value for the open standard. in S. Rs value for the short or load standard. in Ω.

get_reference_values(corr: CalibrationType) str[source]

This command returns the calibration values or the reference values of the open/short/load standard.

Parameters:

corr – Correction mode from constants.CalibrationType. OPEN for Open correction SHORT for Short correction LOAD for Load correction.

Returns:

A human-readable string with the correction mode constants.DCORR.Mode and its reference values

perform(corr: CalibrationType) Response[source]

Perform Open/Short/Load corrections using this method. Refer to the example notebook to understand how each of the corrections are performed.

Before executing this method, set the oscillator level of the MFCMU.

If you use the correction standard, execute the set_reference_values() method (corresponds to the DCORR command) before this method because the calibration value or the reference value of the standard must be defined before performing the correction.

Parameters:

corr – Depending on the the correction you want to perform, set this to OPEN, SHORT or LOAD. For ex: In case of open correction corr = constants.CalibrationType.OPEN.

Returns:

Status of correction data measurement in the form of constants.CORR.Response

perform_and_enable(corr: CalibrationType) str[source]

Perform the correction AND enable it. It is equivalent to calling perform() and enable() methods sequentially.

Returns:

A human readable string with status of the operation.

class qcodes.instrument_drivers.Keysight.KeysightB1500FrequencyList(parent: KeysightB1500Correction, name: str, chnum: int, **kwargs: Any)[source]

Bases: InstrumentChannel

A frequency list for open/short/load correction for Keysight B1520A CMU.

Methods:

clear()

Remove all frequencies in the list for data correction.

clear_and_set_default()

Remove all frequencies in the list for data correction AND set the default frequency list.

add(freq)

Append MFCMU output frequency for data correction in the list.

query([index])

Query the frequency list for CMU data correction.

clear() None[source]

Remove all frequencies in the list for data correction.

clear_and_set_default() None[source]

Remove all frequencies in the list for data correction AND set the default frequency list.

For the list of default frequencies, refer to the documentation of the CLCORR command in the programming manual.

add(freq: float) None[source]

Append MFCMU output frequency for data correction in the list.

The frequency value can be given with a certain resolution as per Table 4-18 in the programming manual (year 2016).

query(index: int | None = None) float[source]

Query the frequency list for CMU data correction.

If index is None, the query returns a total number of frequencies in the list. If index is given, then the query returns the frequency value from the list at that index.

class qcodes.instrument_drivers.Keysight.KeysightB1500IVSweeper(parent: KeysightB1517A, name: str, **kwargs: Unpack)[source]

Bases: InstrumentChannel

Attributes:

sweep_auto_abort

The WM command enables or disables the automatic abort function for the staircase sweep sources and the pulsed sweep source.

post_sweep_voltage_condition

Source output value after the measurement is normally completed.

hold_time

Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35 s, with 10 ms resolution.

delay

Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement.

step_delay

Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output.

trigger_delay

Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger.

measure_delay

Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement.

sweep_mode

Sweep mode.

sweep_range

Ranging type for staircase sweep voltage output.

sweep_start

Start value of the stair case sweep (in V).

sweep_end

Stop value of the DC bias sweep (in V).

sweep_steps

Number of steps for staircase sweep.

current_compliance

Current compliance (in A).

power_compliance

0.001 W.

sweep_auto_abort: Parameter = self.add_parameter( name="sweep_auto_abort", set_cmd=self._set_sweep_auto_abort, get_cmd=self._get_sweep_auto_abort, set_parser=constants.Abort, get_parser=constants.Abort, vals=vals.Enum(*list(constants.Abort)), initial_cache_value=constants.Abort.ENABLED, docstring=textwrap.dedent( """ The WM command enables or disables the automatic abort function for the staircase sweep sources and the pulsed sweep source. The automatic abort function stops the measurement when one of the following conditions occurs: - Compliance on the measurement channel - Compliance on the non-measurement channel - Overflow on the AD converter - Oscillation on any channel This command also sets the post measurement condition for the sweep sources. After the measurement is normally completed, the staircase sweep sources force the value specified by the post parameter, and the pulsed sweep source forces the pulse base value. If the measurement is stopped by the automatic abort function, the staircase sweep sources force the start value, and the pulsed sweep source forces the pulse base value after sweep. """ ), )

The WM command enables or disables the automatic abort function for the staircase sweep sources and the pulsed sweep source. The automatic abort function stops the measurement when one of the following conditions occurs: - Compliance on the measurement channel - Compliance on the non-measurement channel - Overflow on the AD converter - Oscillation on any channel This command also sets the post measurement condition for the sweep sources. After the measurement is normally completed, the staircase sweep sources force the value specified by the post parameter, and the pulsed sweep source forces the pulse base value.

If the measurement is stopped by the automatic abort function, the staircase sweep sources force the start value, and the pulsed sweep source forces the pulse base value after sweep.

post_sweep_voltage_condition: Parameter = self.add_parameter( name="post_sweep_voltage_condition", set_cmd=self._set_post_sweep_voltage_condition, get_cmd=self._get_post_sweep_voltage_condition, set_parser=constants.WM.Post, get_parser=constants.WM.Post, vals=vals.Enum(*list(constants.WM.Post)), initial_cache_value=constants.WM.Post.START, docstring=textwrap.dedent( """ Source output value after the measurement is normally completed. If this parameter is not set, the sweep sources force the start value. """ ), )

Source output value after the measurement is normally completed. If this parameter is not set, the sweep sources force the start value.

hold_time: GroupParameter = self.add_parameter( name="hold_time", initial_value=0.0, vals=vals.Numbers(0, 655.35), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35 s, with 10 ms resolution. Numeric expression. """ ), )

Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35 s, with 10 ms resolution. Numeric expression.

delay: GroupParameter = self.add_parameter( name="delay", initial_value=0.0, vals=vals.Numbers(0, 65.535), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement. 0 to 65.535 s, with 0.1 ms resolution. Numeric expression. """ ), )

Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement. 0 to 65.535 s, with 0.1 ms resolution. Numeric expression.

step_delay: GroupParameter = self.add_parameter( name="step_delay", initial_value=0.0, vals=vals.Numbers(0, 1), unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output. 0 to 1 s, with 0.1 ms resolution. Numeric expression. If this parameter is not set, step delay will be 0. If step delay is shorter than the measurement time, the B1500 waits until the measurement completes, then forces the next step output. """ ), )

Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output. 0 to 1 s, with 0.1 ms resolution. Numeric expression. If this parameter is not set, step delay will be 0. If step delay is shorter than the measurement time, the B1500 waits until the measurement completes, then forces the next step output.

trigger_delay: GroupParameter = self.add_parameter( name="trigger_delay", initial_value=0.0, unit="s", parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger. 0 to the value of ``delay`` s, with 0.1 ms resolution. If this parameter is not set, trigger delay will be 0. """ ), )

Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger. 0 to the value of delay s, with 0.1 ms resolution. If this parameter is not set, trigger delay will be 0.

measure_delay: GroupParameter = self.add_parameter( name="measure_delay", initial_value=0.0, unit="s", vals=vals.Numbers(0, 65.535), parameter_class=GroupParameter, docstring=textwrap.dedent( """ Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement. 0 to 65.535 s, with 0.1 ms resolution. Numeric expression. If this parameter is not set, measure delay will be 0. """ ), )

Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement. 0 to 65.535 s, with 0.1 ms resolution. Numeric expression. If this parameter is not set, measure delay will be 0.

sweep_mode: Parameter = self.add_parameter( name="sweep_mode", set_cmd=self._set_sweep_mode, get_cmd=self._get_sweep_mode, vals=vals.Enum(*list(constants.SweepMode)), set_parser=constants.SweepMode, snapshot_get=False, docstring=textwrap.dedent( """ Sweep mode. Note that Only linear sweep (mode=1 or 3) is available for the staircase sweep with pulsed bias. 1: Linear sweep (single stair, start to stop.) 2: Log sweep (single stair, start to stop.) 3: Linear sweep (double stair, start to stop to start.) 4: Log sweep (double stair, start to stop to start.) """ ), )

Sweep mode. Note that Only linear sweep (mode=1 or 3) is available for the staircase sweep with pulsed bias.

1: Linear sweep (single stair, start to stop.) 2: Log sweep (single stair, start to stop.) 3: Linear sweep (double stair, start to stop to start.) 4: Log sweep (double stair, start to stop to start.)

sweep_range: Parameter = self.add_parameter( name="sweep_range", set_cmd=self._set_sweep_range, get_cmd=self._get_sweep_range, vals=vals.Enum(*list(constants.VOutputRange)), set_parser=constants.VOutputRange, snapshot_get=False, docstring=textwrap.dedent( """ Ranging type for staircase sweep voltage output. Integer expression. See Table 4-4 on page 20. The B1500 usually uses the minimum range that covers both start and stop values to force the staircase sweep voltage. However, if you set `power_compliance` and if the following formulas are true, the B1500 uses the minimum range that covers the output value, and changes the output range dynamically (20 V range or above). Range changing may cause 0 V output in a moment. For the limited auto ranging, the instrument never uses the range less than the specified range. - Icomp > maximum current for the output range - Pcomp/output voltage > maximum current for the output range """ ), )

Ranging type for staircase sweep voltage output. Integer expression. See Table 4-4 on page 20. The B1500 usually uses the minimum range that covers both start and stop values to force the staircase sweep voltage. However, if you set power_compliance and if the following formulas are true, the B1500 uses the minimum range that covers the output value, and changes the output range dynamically (20 V range or above). Range changing may cause 0 V output in a moment. For the limited auto ranging, the instrument never uses the range less than the specified range. - Icomp > maximum current for the output range - Pcomp/output voltage > maximum current for the output range

sweep_start: Parameter = self.add_parameter( name="sweep_start", set_cmd=self._set_sweep_start, get_cmd=self._get_sweep_start, unit="V", vals=vals.Numbers(-25, 25), snapshot_get=False, docstring=textwrap.dedent( """ Start value of the stair case sweep (in V). For the log sweep, start and stop must have the same polarity. """ ), )

Start value of the stair case sweep (in V). For the log sweep, start and stop must have the same polarity.

sweep_end: Parameter = self.add_parameter( name="sweep_end", set_cmd=self._set_sweep_end, get_cmd=self._get_sweep_end, unit="V", vals=vals.Numbers(-25, 25), snapshot_get=False, docstring=textwrap.dedent( """ Stop value of the DC bias sweep (in V). For the log sweep,start and stop must have the same polarity. """ ), )

Stop value of the DC bias sweep (in V). For the log sweep,start and stop must have the same polarity.

sweep_steps: Parameter = self.add_parameter( name="sweep_steps", set_cmd=self._set_sweep_steps, get_cmd=self._get_sweep_steps, vals=vals.Ints(1, 1001), snapshot_get=False, docstring=textwrap.dedent( """ Number of steps for staircase sweep. Possible values from 1 to 1001""" ), )

Number of steps for staircase sweep. Possible values from 1 to 1001

current_compliance: Parameter = self.add_parameter( name="current_compliance", set_cmd=self._set_current_compliance, get_cmd=self._get_current_compliance, unit="A", vals=vals.Numbers(-40, 40), snapshot_get=False, docstring=textwrap.dedent( """ Current compliance (in A). Refer to Manual 2016. See Table 4-7 on page 24, Table 4-9 on page 26, Table 4-12 on page 27, or Table 4-15 on page 28 for each measurement resource type. If you do not set current_compliance, the previous value is used. Compliance polarity is automatically set to the same polarity as the output value, regardless of the specified Icomp. If the output value is 0, the compliance polarity is positive. If you set Pcomp, the maximum Icomp value for the measurement resource is allowed, regardless of the output range setting. """ ), )

Current compliance (in A). Refer to Manual 2016. See Table 4-7 on page 24, Table 4-9 on page 26, Table 4-12 on page 27, or Table 4-15 on page 28 for each measurement resource type. If you do not set current_compliance, the previous value is used. Compliance polarity is automatically set to the same polarity as the output value, regardless of the specified Icomp. If the output value is 0, the compliance polarity is positive. If you set Pcomp, the maximum Icomp value for the measurement resource is allowed, regardless of the output range setting.

power_compliance: Parameter = self.add_parameter( name="power_compliance", set_cmd=self._set_power_compliance, get_cmd=self._get_power_compliance, unit="W", vals=vals.Numbers(0.001, 80), snapshot_get=False, docstring=textwrap.dedent( """ Power compliance (in W). Resolution: 0.001 W. If it is not entered, the power compliance is not set. This parameter is not available for HVSMU. 0.001 to 2 for MPSMU/HRSMU, 0.001 to 20 for HPSMU, 0.001 to 40 for HCSMU, 0.001 to 80 for dual HCSMU, 0.001 to 3 for MCSMU, 0.001 to 100 for UHVU """ ), )

0.001 W. If it is not entered, the power compliance is not set. This parameter is not available for HVSMU. 0.001 to 2 for MPSMU/HRSMU, 0.001 to 20 for HPSMU, 0.001 to 40 for HCSMU, 0.001 to 80 for dual HCSMU, 0.001 to 3 for MCSMU, 0.001 to 100 for UHVU

Type:

Power compliance (in W). Resolution

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.Keysight.KeysightB1511B(parent: qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500, name: str | None, slot_nr: int, **kwargs: Any)[source]

Bases: KeysightB1517A

Driver for Keysight B1511B Source/Monitor Unit module for B1500 Semiconductor Parameter Analyzer.

Parameters:
  • parent – mainframe B1500 instance that this module belongs to

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

  • slot_nr – Slot number of this module (not channel number)

  • asu_present – Flag to acknowledge ASU presence

Attributes:

asu_present

property asu_present: bool
class qcodes.instrument_drivers.Keysight.KeysightB1517A(parent: KeysightB1500, name: str | None, slot_nr: int, **kwargs: Unpack)[source]

Bases: KeysightB1500Module

Driver for Keysight B1517A Source/Monitor Unit module for B1500 Semiconductor Parameter Analyzer.

Parameters:
  • parent – mainframe B1500 instance that this module belongs to

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

  • slot_nr – Slot number of this module (not channel number)

Attributes:

MODULE_KIND

measurement_mode

Set measurement mode for this module.

measurement_operation_mode

The methods sets the SMU measurement operation mode.

voltage

Parameter voltage

current

Parameter current

time_axis

Parameter time_axis

sampling_measurement_trace

Parameter sampling_measurement_trace

current_measurement_range

This method specifies the current measurement range or ranging type.In the initial setting, the auto ranging is set.

enable_filter

This methods sets the connection mode of a SMU filter for each channel.

Methods:

source_config(output_range[, compliance, ...])

Configure sourcing voltage/current

v_measure_range_config(v_measure_range)

Configure measuring voltage

i_measure_range_config(i_measure_range)

Configure measuring current

timing_parameters(h_bias, interval, number)

This command sets the timing parameters of the sampling measurement mode (MM.Mode.SAMPLING, 10).

use_high_speed_adc()

Use high-speed ADC type for this module/channel

use_high_resolution_adc()

Use high-resolution ADC type for this module/channel

set_average_samples_for_high_speed_adc([...])

This command sets the number of averaging samples of the high-speed ADC (A/D converter).

setup_staircase_sweep(v_start, v_end, n_steps)

Setup the staircase sweep measurement using the same set of commands (in the same order) as given in the programming manual - see pages 3-19 and 3-20.

MODULE_KIND: ModuleKind = 'SMU'
channels: tuple[ChNr, ...] = (ChNr(slot_nr),)
setup_fnc_already_run: bool = False
power_line_frequency: int = 50
measurement_mode: Parameter = self.add_parameter( name="measurement_mode", get_cmd=None, set_cmd=self._set_measurement_mode, set_parser=MM.Mode, vals=vals.Enum(*list(MM.Mode)), initial_cache_value=MM.Mode.SPOT, docstring=textwrap.dedent( """ Set measurement mode for this module. It is recommended for this parameter to use values from :class:`.constants.MM.Mode` enumeration. Refer to the documentation of ``MM`` command in the programming guide for more information.""" ), )

Set measurement mode for this module.

It is recommended for this parameter to use values from constants.MM.Mode enumeration.

Refer to the documentation of MM command in the programming guide for more information.

measurement_operation_mode: Parameter = self.add_parameter( name="measurement_operation_mode", set_cmd=self._set_measurement_operation_mode, get_cmd=self._get_measurement_operation_mode, set_parser=constants.CMM.Mode, vals=vals.Enum(*list(constants.CMM.Mode)), docstring=textwrap.dedent( """ The methods sets the SMU measurement operation mode. This is not available for the high speed spot measurement. mode : SMU measurement operation mode. `constants.CMM.Mode` """ ), )

The methods sets the SMU measurement operation mode. This is not available for the high speed spot measurement. mode : SMU measurement operation mode. constants.CMM.Mode

voltage: _SpotMeasurementVoltageParameter = self.add_parameter( name="voltage", parameter_class=_SpotMeasurementVoltageParameter, unit="V", snapshot_get=False, )

Parameter voltage

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] = {}
current: _SpotMeasurementCurrentParameter = self.add_parameter( name="current", parameter_class=_SpotMeasurementCurrentParameter, unit="A", snapshot_get=False, )

Parameter current

time_axis: Parameter = self.add_parameter( name="time_axis", get_cmd=self._get_time_axis, vals=vals.Arrays(shape=(self._get_number_of_samples,)), snapshot_value=False, label="Time", unit="s", )

Parameter time_axis

sampling_measurement_trace: SamplingMeasurement = self.add_parameter( name="sampling_measurement_trace", parameter_class=SamplingMeasurement, vals=vals.Arrays(shape=(self._get_number_of_samples,)), setpoints=(self.time_axis,), )

Parameter sampling_measurement_trace

current_measurement_range: Parameter = self.add_parameter( name="current_measurement_range", set_cmd=self._set_current_measurement_range, get_cmd=self._get_current_measurement_range, vals=vals.Enum(*list(constants.IMeasRange)), set_parser=constants.IMeasRange, docstring=textwrap.dedent( """ This method specifies the current measurement range or ranging type.In the initial setting, the auto ranging is set. The range changing occurs immediately after the trigger (that is, during the measurements). Current measurement channel can be decided by the `measurement_operation_mode` method setting and the channel output mode (voltage or current). """ ), )

This method specifies the current measurement range or ranging type.In the initial setting, the auto ranging is set. The range changing occurs immediately after the trigger (that is, during the measurements). Current measurement channel can be decided by the measurement_operation_mode method setting and the channel output mode (voltage or current).

enable_filter: Parameter = self.add_parameter( name="enable_filter", set_cmd=self._set_enable_filter, get_cmd=None, snapshot_get=False, vals=vals.Bool(), initial_cache_value=False, docstring=textwrap.dedent( """ This methods sets the connection mode of a SMU filter for each channel. A filter is mounted on the SMU. It assures clean source output with no spikes or overshooting. ``False``, meaning "disconnect" is the initial setting. Set to ``True`` to connect. """ ), )

This methods sets the connection mode of a SMU filter for each channel. A filter is mounted on the SMU. It assures clean source output with no spikes or overshooting. False, meaning “disconnect” is the initial setting. Set to True to connect.

source_config(output_range: VOutputRange | IOutputRange, compliance: float | int | None = None, compl_polarity: CompliancePolarityMode | None = None, min_compliance_range: VMeasRange | IMeasRange | None = None) None[source]

Configure sourcing voltage/current

Parameters:
  • output_range – voltage/current output range

  • compliance – voltage/current compliance value

  • compl_polarity – compliance polarity mode

  • min_compliance_range – minimum voltage/current compliance output range

v_measure_range_config(v_measure_range: VMeasRange) None[source]

Configure measuring voltage

Parameters:

v_measure_range – voltage measurement range

i_measure_range_config(i_measure_range: IMeasRange) None[source]

Configure measuring current

Parameters:

i_measure_range – current measurement range

timing_parameters(h_bias: float, interval: float, number: int, h_base: float | None = None) None[source]

This command sets the timing parameters of the sampling measurement mode (MM.Mode.SAMPLING, 10).

Refer to the programming guide for more information about the MT command, especially for notes on sampling operation and about setting interval < 0.002 s.

Parameters:
  • h_bias – Time since the bias value output until the first sampling point. Numeric expression. in seconds. 0 (initial setting) to 655.35 s, resolution 0.01 s. The following values are also available for interval < 0.002 s. |h_bias| will be the time since the sampling start until the bias value output. -0.09 to -0.0001 s, resolution 0.0001 s.

  • interval – Interval of the sampling. Numeric expression, 0.0001 to 65.535, in seconds. Initial value is 0.002. Resolution is 0.001 at interval < 0.002. Linear sampling of interval < 0.002 in 0.00001 resolution is available only when the following formula is satisfied. interval >= 0.0001 + 0.00002 * (number of measurement channels-1)

  • number – Number of samples. Integer expression. 1 to the following value. Initial value is 1000. For the linear sampling: 100001 / (number of measurement channels). For the log sampling: 1 + (number of data for 11 decades)

  • h_base – Hold time of the base value output until the bias value output. Numeric expression. in seconds. 0 (initial setting) to 655.35 s, resolution 0.01 s.

use_high_speed_adc() None[source]

Use high-speed ADC type for this module/channel

use_high_resolution_adc() None[source]

Use high-resolution ADC type for this module/channel

set_average_samples_for_high_speed_adc(number: int = 1, mode: Mode = Mode.AUTO) None[source]

This command sets the number of averaging samples of the high-speed ADC (A/D converter). This command is not effective for the high-resolution ADC. Also, this command is not effective for the measurements using pulse.

Parameters:
  • number – 1 to 1023, or -1 to -100. Initial setting is 1. For positive number input, this value specifies the number of samples depended on the mode value. For negative number input, this parameter specifies the number of power line cycles (PLC) for one point measurement. The Keysight B1500 gets 128 samples in 1 PLC. If number is negative it ignores the mode argument.

  • mode – Averaging mode. Integer expression. This parameter is meaningless for negative number. constants.AV.Mode.AUTO: Auto mode (default setting). Number of samples = number x initial number. constants.AV.Mode.MANUAL: Manual mode. Number of samples = number

setup_staircase_sweep(v_start: float, v_end: float, n_steps: int, post_sweep_voltage_val: Post | int = Post.STOP, av_coef: int = -1, enable_filter: bool = True, v_src_range: VOutputRange | IOutputRange = VOutputRange.AUTO, i_comp: float = 1e-05, i_meas_range: VMeasRange | IMeasRange | None = IMeasRange.FIX_10uA, hold_time: float = 0, delay: float = 0, step_delay: float = 0, measure_delay: float = 0, abort_enabled: Abort | int = Abort.ENABLED, sweep_mode: SweepMode | int = SweepMode.LINEAR) None[source]

Setup the staircase sweep measurement using the same set of commands (in the same order) as given in the programming manual - see pages 3-19 and 3-20.

Parameters:
  • v_start – starting voltage of staircase sweep

  • v_end – ending voltage of staircase sweep

  • n_steps – number of measurement points (uniformly distributed between v_start and v_end)

  • post_sweep_voltage_val – voltage to hold at end of sweep (i.e. start or end val). Sweep chan will also output this voltage if an abort condition is encountered during the sweep

  • av_coef – coefficient to use for av command to set ADC averaging. Negative value implies NPLC mode with absolute value of av_coeff the NPLC setting to use. Positive value implies auto mode and must be set to >= 4

  • enable_filter – turn SMU filter on or off

  • v_src_range – range setting to use for voltage source

  • i_comp – current compliance level

  • i_meas_range – current measurement range

  • hold_time – time (in s) to wait before starting very first measurement in sweep

  • delay – time (in s) after starting to force a step output and before starting a step measurement

  • step_delay – time (in s) after starting a step measurement before next step in staircase. If step_delay is < measurement time, B1500 waits until measurement complete and then forces the next step value.

  • measure_delay – time (in s) after receiving a start step measurement trigger and before starting a step measurement

  • abort_enabled – Enbale abort

  • sweep_mode – Linear, log, linear-2-way or log-2-way

class qcodes.instrument_drivers.Keysight.KeysightB1520A(parent: KeysightB1500, name: str | None, slot_nr: int, **kwargs: Any)[source]

Bases: KeysightB1500Module

Driver for Keysight B1520A Capacitance Measurement Unit module for B1500 Semiconductor Parameter Analyzer.

Parameters:
  • parent – mainframe B1500 instance that this module belongs to

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

  • slot_nr – Slot number of this module (not channel number)

Attributes:

phase_compensation_timeout

MODULE_KIND

voltage_dc

Parameter voltage_dc

voltage_ac

Parameter voltage_ac

frequency

Parameter frequency

capacitance

Parameter capacitance

phase_compensation_mode

This parameter selects the MFCMU phase compensation mode.

adc_coef

Coefficient used to define the number of averaging samples or the averaging time.

adc_mode

Sets the number of averaging samples or the averaging time set to the A/D converter of the MFCMU

ranging_mode

Specifies the measurement range or the measurement ranging type of the MFCMU.

measurement_range_for_non_auto

Measurement range.

measurement_mode

Set measurement mode for this module.

impedance_model

The IMP command specifies the parameter measured by the MFCMU.

ac_dc_volt_monitor

This command enables or disables the data monitor and data output of the MFCMU AC voltage and DC voltage.

cv_sweep_voltages

Outputs the tuple of voltages to sweep.

run_sweep

This is MultiParameter.

Methods:

phase_compensation([mode])

Performs the MFCMU phase compensation, sets the compensation data to the KeysightB1500, and returns the execution results.

abort()

Aborts currently running operation and the subsequent execution.

setup_staircase_cv(v_start, v_end, n_steps, ...)

Convenience function which requires all inputs to properly setup a CV sweep measurement.

phase_compensation_timeout = 60
MODULE_KIND: ModuleKind = 'CMU'
channels: tuple[ChNr, ...] = (ChNr(slot_nr),)
voltage_dc: Parameter = self.add_parameter( name="voltage_dc", unit="V", set_cmd=self._set_voltage_dc, get_cmd=self._get_voltage_dc, snapshot_get=False, )

Parameter voltage_dc

voltage_ac: Parameter = self.add_parameter( name="voltage_ac", unit="V", set_cmd=self._set_voltage_ac, get_cmd=self._get_voltage_ac, snapshot_get=False, )

Parameter voltage_ac

frequency: Parameter = self.add_parameter( name="frequency", unit="Hz", set_cmd=self._set_frequency, get_cmd=self._get_frequency, snapshot_get=False, )

Parameter frequency

capacitance: Parameter = self.add_parameter( name="capacitance", get_cmd=self._get_capacitance, snapshot_value=False )

Parameter capacitance

phase_compensation_mode: Parameter = self.add_parameter( name="phase_compensation_mode", set_cmd=self._set_phase_compensation_mode, get_cmd=None, set_parser=constants.ADJ.Mode, docstring=textwrap.dedent( """ This parameter selects the MFCMU phase compensation mode. This command initializes the MFCMU. The available modes are captured in :class:`constants.ADJ.Mode`: - 0: Auto mode. Initial setting. - 1: Manual mode. - 2: Load adaptive mode. For mode=0, the KeysightB1500 sets the compensation data automatically. For mode=1, execute the :meth:`phase_compensation` method ( the ``ADJ?`` command) to perform the phase compensation and set the compensation data. For mode=2, the KeysightB1500 performs the phase compensation before every measurement. It is useful when there are wide load fluctuations by changing the bias and so on.""" ), )

This parameter selects the MFCMU phase compensation mode. This command initializes the MFCMU. The available modes are captured in constants.ADJ.Mode:

  • 0: Auto mode. Initial setting.

  • 1: Manual mode.

  • 2: Load adaptive mode.

For mode=0, the KeysightB1500 sets the compensation data automatically. For mode=1, execute the phase_compensation() method ( the ADJ? command) to perform the phase compensation and set the compensation data. For mode=2, the KeysightB1500 performs the phase compensation before every measurement. It is useful when there are wide load fluctuations by changing the bias and so on.

adc_coef: GroupParameter = self.add_parameter( name="adc_coef", initial_value=1, parameter_class=GroupParameter, vals=vals.Ints(1, 1023), docstring=textwrap.dedent( """ Coefficient used to define the number of averaging samples or the averaging time. Integer expression. - For mode=0: 1 to 1023. Initial setting/default setting is 2. - For mode=2: 1 to 100. Initial setting/default setting is 1. """ ), )

Coefficient used to define the number of averaging samples or the averaging time. Integer expression.

  • For mode=0: 1 to 1023. Initial setting/default setting is 2.

  • For mode=2: 1 to 100. Initial setting/default setting is 1.

adc_mode: GroupParameter = self.add_parameter( name="adc_mode", initial_value=constants.ACT.Mode.PLC, parameter_class=GroupParameter, vals=vals.Enum(*list(constants.ACT.Mode)), set_parser=constants.ACT.Mode, docstring=textwrap.dedent( """ Sets the number of averaging samples or the averaging time set to the A/D converter of the MFCMU ``constants.ACT.Mode.AUTO``: Auto mode. Defines the number of averaging samples given by the following formula. Then initial averaging is the number of averaging samples automatically set by the B1500 and you cannot change. Number of averaging samples = N x initial averaging ``constants.ACT.Mode.PLC``: Power line cycle (PLC) mode. Defines the averaging time given by the following formula. Averaging time = N / power line frequency """ ), )

Sets the number of averaging samples or the averaging time set to the A/D converter of the MFCMU

constants.ACT.Mode.AUTO: Auto mode. Defines the number of averaging samples given by the following formula. Then initial averaging is the number of averaging samples automatically set by the B1500 and you cannot change.

Number of averaging samples = N x initial averaging

constants.ACT.Mode.PLC: Power line cycle (PLC) mode. Defines the averaging time given by the following formula.

Averaging time = N / power line frequency

ranging_mode: Parameter = self.add_parameter( name="ranging_mode", set_cmd=self._set_ranging_mode, vals=vals.Enum(*list(constants.RangingMode)), set_parser=constants.RangingMode, get_cmd=None, docstring=textwrap.dedent( """ Specifies the measurement range or the measurement ranging type of the MFCMU. In the initial setting, the auto ranging is set. The range changing occurs immediately after the trigger (that is, during the measurements). Possible ranging modes are autorange and fixed range. """ ), )

Specifies the measurement range or the measurement ranging type of the MFCMU. In the initial setting, the auto ranging is set. The range changing occurs immediately after the trigger (that is, during the measurements). Possible ranging modes are autorange and fixed range.

measurement_range_for_non_auto: Parameter = self.add_parameter( name="measurement_range_for_non_auto", set_cmd=self._set_measurement_range_for_non_auto, get_cmd=None, docstring=textwrap.dedent( """ Measurement range. Needs to set when ``ranging_mode`` is set to PLC. The value should be integer 0 or more. 50 ohm, 100 ohm, 300 ohm, 1 kilo ohm, 3 kilo ohm, 10 kilo ohm, 30 kilo ohm, 100 kilo ohm, and 300 kilo ohm are selectable. Available measurement ranges depend on the output signal frequency set by the FC command.""" ), )

Measurement range. Needs to set when ranging_mode is set to PLC. The value should be integer 0 or more. 50 ohm, 100 ohm, 300 ohm, 1 kilo ohm, 3 kilo ohm, 10 kilo ohm, 30 kilo ohm, 100 kilo ohm, and 300 kilo ohm are selectable. Available measurement ranges depend on the output signal frequency set by the FC command.

measurement_mode: Parameter = self.add_parameter( name="measurement_mode", get_cmd=None, set_cmd=self._set_measurement_mode, set_parser=MM.Mode, vals=vals.Enum(*list(MM.Mode)), docstring=textwrap.dedent( """ Set measurement mode for this module. It is recommended for this parameter to use values from :class:`.constants.MM.Mode` enumeration. Refer to the documentation of ``MM`` command in the programming guide for more information. """ ), )

Set measurement mode for this module.

It is recommended for this parameter to use values from constants.MM.Mode enumeration.

Refer to the documentation of MM command in the programming guide for more information.

impedance_model: Parameter = self.add_parameter( name="impedance_model", set_cmd=self._set_impedance_model, get_cmd=None, vals=vals.Enum(*list(constants.IMP.MeasurementMode)), set_parser=constants.IMP.MeasurementMode, initial_value=constants.IMP.MeasurementMode.Cp_D, docstring=textwrap.dedent( """ The IMP command specifies the parameter measured by the MFCMU. Look at the ``constants.IMP.MeasurementMode`` for all the modes. """ ), )

The IMP command specifies the parameter measured by the MFCMU. Look at the constants.IMP.MeasurementMode for all the modes.

ac_dc_volt_monitor: Parameter = self.add_parameter( name="ac_dc_volt_monitor", set_cmd=self._set_ac_dc_volt_monitor, get_cmd=None, vals=vals.Ints(0, 1), initial_value=False, docstring=textwrap.dedent( """ This command enables or disables the data monitor and data output of the MFCMU AC voltage and DC voltage. 0: Disables the data monitor and output. Initial setting. 1: Enables the data monitor and output. """ ), )

This command enables or disables the data monitor and data output of the MFCMU AC voltage and DC voltage. 0: Disables the data monitor and output. Initial setting. 1: Enables the data monitor and output.

cv_sweep_voltages: Parameter = self.add_parameter( name="cv_sweep_voltages", get_cmd=self._cv_sweep_voltages, unit="V", label="Voltage", docstring=textwrap.dedent( """ Outputs the tuple of voltages to sweep. sweep_start, sweep_end and sweep_step functions are used to define the values of voltages. There are possible modes; linear sweep, log sweep, linear 2 way sweep and log 2 way sweep. The output of sweep_mode method is used to decide which mode to use. """ ), )

Outputs the tuple of voltages to sweep. sweep_start, sweep_end and sweep_step functions are used to define the values of voltages. There are possible modes; linear sweep, log sweep, linear 2 way sweep and log 2 way sweep. The output of sweep_mode method is used to decide which mode to use.

run_sweep: KeysightB1500CVSweepMeasurement = self.add_parameter( name="run_sweep", parameter_class=KeysightB1500CVSweepMeasurement, docstring=textwrap.dedent( """ This is MultiParameter. Running the sweep runs the measurement on the list of values of cv_sweep_voltages. The output is a primary parameter (for ex Capacitance) and a secondary parameter (for ex Dissipation) both of whom use the same setpoint cv_sweep_voltages. The impedance_model defines exactly what will be the primary and secondary parameter. The default case is Capacitance and Dissipation. """ ), )

This is MultiParameter. Running the sweep runs the measurement on the list of values of cv_sweep_voltages. The output is a primary parameter (for ex Capacitance) and a secondary parameter (for ex Dissipation) both of whom use the same setpoint cv_sweep_voltages. The impedance_model defines exactly what will be the primary and secondary parameter. The default case is Capacitance and Dissipation.

phase_compensation(mode: Mode | int | None = None) Response[source]

Performs the MFCMU phase compensation, sets the compensation data to the KeysightB1500, and returns the execution results.

This method resets the MFCMU. Before executing this method, set the phase compensation mode to manual by using phase_compensation_mode parameter, and open the measurement terminals at the end of the device side. The execution of this method will take about 30 seconds (the visa timeout for it is controlled by phase_compensation_timeout attribute). The compensation data is cleared by turning the KeysightB1500 off.

Parameters:

mode

Command operation mode constants.ADJQuery.Mode.

  • 0: Use the last phase compensation data without measurement.

  • 1: Perform the phase compensation data measurement.

If the mode parameter is not set, mode=1 is assumed by the instrument.

Returns:

Status result of performing the phase compensation as constants.ADJQuery.Response

abort() None[source]

Aborts currently running operation and the subsequent execution. This does not abort the timeout process. Only when the kernel is free this command is executed and the further commands are aborted.

setup_staircase_cv(v_start: float, v_end: float, n_steps: int, freq: float, ac_rms: float, post_sweep_voltage_condition: Post | int = Post.STOP, adc_mode: Mode | int = Mode.PLC, adc_coef: int = 5, imp_model: MeasurementMode | int = MeasurementMode.Cp_D, ranging_mode: RangingMode | int = RangingMode.AUTO, fixed_range_val: int | None = None, hold_delay: float = 0, delay: float = 0, step_delay: float = 0, trigger_delay: float = 0, measure_delay: float = 0, abort_enabled: Abort | int = Abort.ENABLED, sweep_mode: SweepMode | int = SweepMode.LINEAR, volt_monitor: bool = True) None[source]

Convenience function which requires all inputs to properly setup a CV sweep measurement. Function sets parameters in the order given in the programming example in the manual. Returns error status after setting all params.

Parameters:
  • v_start – Starting voltage for sweep

  • v_end – End voltage for sweep

  • n_steps – Number of steps in the sweep

  • freq – frequency

  • ac_rms – AC voltage

  • post_sweep_voltage_condition – Source output value after the measurement is normally completed.

  • adc_mode – Sets the number of averaging samples or the averaging time set to the A/D converter of the MFCMU.

  • adc_coef – the number of averaging samples or the averaging time.

  • imp_model – specifies the units of the parameter measured by the MFCMU.

  • ranging_mode – Auto range or Fixed range

  • fixed_range_val – Integer 0 or more. Available measurement ranges depend on the output signal frequency. See measurement_range_for_non_auto parameter for more info.

  • hold_delay – Hold time (in seconds) that is the wait time after starting measurement and before starting delay time for the first step 0 to 655.35, with 10 ms resolution.

  • delay – Delay time (in seconds) that is the wait time after starting to force a step output and before starting a step measurement.

  • step_delay – Step delay time (in seconds) that is the wait time after starting a step measurement and before starting to force the next step output. 0 to 1, with 0.1 ms resolution. If step_delay is shorter than the measurement time, the B1500 waits until the measurement completes, then forces the next step output.

  • trigger_delay – Step source trigger delay time (in seconds) that is the wait time after completing a step output setup and before sending a step output setup completion trigger. 0 to delay, with 0.1 ms resolution.

  • measure_delay – Step measurement trigger delay time (in seconds) that is the wait time after receiving a start step measurement trigger and before starting a step measurement. 0 to 65.535, with 0.1 ms resolution.

  • abort_enabled – Boolean, enables or disables the automatic abort function for the CV sweep measurement.

  • sweep_mode – Linear sweep, log sweep, linear 2 way sweep or log 2 way sweep

  • volt_monitor – Accepts Boolean. If True, CV sweep measurement outputs 4 parameter; primary parameter(for ex Capacitance), secondary parameter(for ex Dissipation), ac source voltage and dc source voltage. If False, the measurement only outputs primary and secondary parameter.

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.Keysight.KeysightB1530A(parent: KeysightB1500, name: str | None, slot_nr: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: KeysightB1500Module

Driver for Keysight B1530A Waveform Generator/Fast Measurement Unit module for B1500 Semiconductor Parameter Analyzer.

Warning

At the moment this driver implements no functionality of the module.

Parameters:
  • parent – mainframe B1500 instance that this module belongs to

  • name – Name of the instrument instance to create. If None (Default), then the name is autogenerated from the instrument class.

  • slot_nr – Slot number of this module (not channel number)

Attributes:

MODULE_KIND

MODULE_KIND: ModuleKind = 'WGFMU'
channels: tuple[ChNr, ...] = (ChNr(slot_nr), ChNr(int(f"{slot_nr:d}02")))
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.Keysight.KeysightB220X(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

QCodes driver for B2200 / B2201 switch matrix

Note: The B2200 consists of up to 4 modules and provides two channel configuration modes, Normal and Auto. The configuration mode defines whether multiple switch modules are treated as one (Auto mode), or separately (Normal mode). This driver only implements the Auto mode. Please read the manual section on Channel Configuration Mode for more info.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

get_status

Queries status register.

get_error

Queries error queue

connections

queries currently active connections and returns a set of tuples {(input, output), ...}

connection_rule

specifies connection rule.

connection_sequence

One of 'none', 'bbm' (Break before make) or 'mbb' (make before break)

bias_input_port

Selects the input that will be used as bias input port (default 10).

bias_mode

True for ON, False for OFF

gnd_input_port

Selects the input that will be used as GND input port (default 12).

gnd_mode

Parameter gnd_mode

unused_inputs

Parameter unused_inputs

couple_ports

Parameter couple_ports

couple_mode

True for ON, False for OFF

Methods:

connect(input_ch, output_ch)

Connect given input/output pair.

connect_paths(paths)

disconnect_paths(paths)

disconnect(input_ch, output_ch)

Disconnect given Input/Output pair.

disconnect_all()

opens all connections.

bias_disable_all_outputs()

Removes all outputs from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

bias_enable_all_outputs()

Adds all outputs to list of ports that will be connected to bias input if port is unused and bias mode is enabled.

bias_enable_output(output)

Adds output to list of ports that will be connected to bias input if port is unused and bias mode is enabled.

bias_disable_output(output)

Removes output from list of ports that will be connected to bias input if port is unused and bias mode is enabled.

gnd_enable_output(output)

Adds output to list of ports that will be connected to GND input if port is unused and bias mode is enabled.

gnd_disable_output(output)

Removes output from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

gnd_enable_all_outputs()

Adds all outputs to list of ports that will be connected to GND input if port is unused and bias mode is enabled.

gnd_disable_all_outputs()

Removes all outputs from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

couple_port_autodetect()

Autodetect Kelvin connections on Input ports

clear_status()

Clears status register and error queue of the instrument.

reset()

Performs an instrument reset.

parse_channel_list(channel_list)

Generate a set of (input, output) tuples from a SCPI channel list string.

to_channel_list(paths)

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

get_status: Parameter = self.add_parameter( name="get_status", get_cmd="*ESR?", get_parser=int, docstring="Queries status register.", )

Queries status register.

get_error: Parameter = self.add_parameter( name="get_error", get_cmd=":SYST:ERR?", docstring="Queries error queue" )

Queries error queue

connections: Parameter = self.add_parameter( name="connections", get_cmd=f":CLOS:CARD? {self._card}", get_parser=KeysightB220X.parse_channel_list, docstring="queries currently active connections " "and returns a set of tuples {(input, " "output), ...}", )

queries currently active connections and returns a set of tuples {(input, output), …}

connection_rule: Parameter = self.add_parameter( name="connection_rule", get_cmd=self._get_connection_rule, set_cmd=self._set_connection_rule, val_mapping={"free": "FREE", "single": "SROU"}, docstring=( "specifies connection rule. Parameter " "one of 'free' (default) or 'single'.\n\n" "In 'free' mode\n" " - each input port can be connected to " "multiple output ports\n" " - and each output port can be " "connected to multiple input ports.\n" " - Caution: If the Free connection rule " "has been specified, ensure multiple " "input ports are not connected to the " "same output port. Such configurations " "can cause damage\n\n" "In single route mode:\n" " - each input port can be connected to " "only one output port\n" " - and each output port can be " "connected to only one input port.\n" " - existing connection to a port will " "be disconnected when a new connection " "is made.\n" ), )

specifies connection rule. Parameter one of ‘free’ (default) or ‘single’.

In ‘free’ mode - each input port can be connected to multiple output ports - and each output port can be connected to multiple input ports. - Caution: If the Free connection rule has been specified, ensure multiple input ports are not connected to the same output port. Such configurations can cause damage

In single route mode: - each input port can be connected to only one output port - and each output port can be connected to only one input port. - existing connection to a port will be disconnected when a new connection is made.

connection_sequence: Parameter = self.add_parameter( name="connection_sequence", get_cmd=f":CONN:SEQ? {self._card}", set_cmd=f":CONN:SEQ {self._card},{{}}", val_mapping={"none": "NSEQ", "bbm": "BBM", "mbb": "MBBR"}, docstring="One of 'none', 'bbm' (Break before " "make) or 'mbb' (make before break)", )

One of ‘none’, ‘bbm’ (Break before make) or ‘mbb’ (make before break)

bias_input_port: Parameter = self.add_parameter( name="bias_input_port", get_cmd=f":BIAS:PORT? {self._card}", set_cmd=f":BIAS:PORT {self._card},{{}}", vals=MultiType(KeysightB220X._available_input_ports, Enum(-1)), get_parser=int, docstring="Selects the input that will be used as " "bias input port (default 10). The Bias " "input port cannot be used on subsequent " "`connect` or `disconnect` commands if " "Bias mode is ON", )

Selects the input that will be used as bias input port (default 10). The Bias input port cannot be used on subsequent connect or disconnect commands if Bias mode is ON

bias_mode: Parameter = self.add_parameter( name="bias_mode", get_cmd=f":BIAS? {self._card}", set_cmd=f":BIAS {self._card},{{}}", val_mapping={True: 1, False: 0}, docstring="Param: True for ON, False for OFF", )

True for ON, False for OFF

Type:

Param

gnd_input_port: Parameter = self.add_parameter( name="gnd_input_port", get_cmd=f":AGND:PORT? {self._card}", set_cmd=f":AGND:PORT {self._card},{{}}", vals=MultiType(KeysightB220X._available_input_ports, Enum(-1)), get_parser=int, docstring="Selects the input that will be used as " "GND input port (default 12). The GND " "input port cannot be used on subsequent " "`connect` or `disconnect` commands if " "GND mode is ON", )

Selects the input that will be used as GND input port (default 12). The GND input port cannot be used on subsequent connect or disconnect commands if GND mode is ON

gnd_mode: Parameter = self.add_parameter( name="gnd_mode", get_cmd=f":AGND? {self._card}", set_cmd=f":AGND {self._card},{{}}", val_mapping={True: 1, False: 0}, )

Parameter gnd_mode

unused_inputs: Parameter = self.add_parameter( name="unused_inputs", get_cmd=f":AGND:UNUSED? {self._card}", set_cmd=f":AGND:UNUSED {self._card},'{{}}'", get_parser=lambda response: [ int(x) for x in response.strip("'").split(",") if x.strip().isdigit() ], set_parser=lambda value: str(value).strip("[]"), vals=Lists(KeysightB220X._available_input_ports), )

Parameter unused_inputs

couple_ports: Parameter = self.add_parameter( name="couple_ports", get_cmd=f":COUP:PORT? {self._card}", set_cmd=f":COUP:PORT {self._card},'{{}}'", set_parser=lambda value: str(value).strip("[]()"), get_parser=lambda response: [ int(x) for x in response.strip("'").split(",") if x.strip().isdigit() ], vals=Lists(Enum(1, 3, 5, 7, 9, 11, 13)), )

Parameter couple_ports

couple_mode: Parameter = self.add_parameter( name="couple_mode", get_cmd=f":COUP? {self._card}", set_cmd=f":COUP {self._card},{{}}", val_mapping={True: 1, False: 0}, docstring="Param: True for ON, False for OFF", )

True for ON, False for OFF

Type:

Param

connect(input_ch: int, output_ch: int) None[source]

Connect given input/output pair.

Parameters:
  • input_ch – Input channel number 1-14

  • output_ch – Output channel number 1-48

connect_paths(paths: Sequence[tuple[int, int]]) None[source]
disconnect_paths(paths: Sequence[tuple[int, int]]) None[source]
disconnect(input_ch: int, output_ch: int) None[source]

Disconnect given Input/Output pair.

Parameters:
  • input_ch – Input channel number 1-14

  • output_ch – Output channel number 1-48

disconnect_all() None[source]

opens all connections.

If ground or bias mode is enabled it will connect all outputs to the GND or Bias Port

bias_disable_all_outputs() None[source]

Removes all outputs from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

bias_enable_all_outputs() None[source]

Adds all outputs to list of ports that will be connected to bias input if port is unused and bias mode is enabled.

bias_enable_output(output: int) None[source]

Adds output to list of ports that will be connected to bias input if port is unused and bias mode is enabled.

Parameters:

output – int 1-48

bias_disable_output(output: int) None[source]

Removes output from list of ports that will be connected to bias input if port is unused and bias mode is enabled.

Parameters:

output – int 1-48

gnd_enable_output(output: int) None[source]

Adds output to list of ports that will be connected to GND input if port is unused and bias mode is enabled.

Parameters:

output – int 1-48

gnd_disable_output(output: int) None[source]

Removes output from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

Parameters:

output – int 1-48

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
gnd_enable_all_outputs() None[source]

Adds all outputs to list of ports that will be connected to GND input if port is unused and bias mode is enabled.

gnd_disable_all_outputs() None[source]

Removes all outputs from list of ports that will be connected to GND input if port is unused and bias mode is enabled.

couple_port_autodetect() None[source]

Autodetect Kelvin connections on Input ports

This will detect Kelvin connections on the input ports and enable couple mode for found kelvin connections. Kelvin connections must use input pairs that can be couple-enabled in order to be autodetected.

{(1, 2), (3, 4), (5, 6), (7, 8), (9, 10), (11, 12), (13, 14)}

Also refer to the manual for more information.

clear_status() None[source]

Clears status register and error queue of the instrument.

reset() None[source]

Performs an instrument reset.

Does not reset error queue!

static parse_channel_list(channel_list: str) set[tuple[int, int]][source]

Generate a set of (input, output) tuples from a SCPI channel list string.

to_channel_list(paths: Sequence[tuple[int, int]]) str[source]
class qcodes.instrument_drivers.Keysight.KeysightB2200(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightB220X

QCodes driver for B2200

class qcodes.instrument_drivers.Keysight.KeysightB2201(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightB220X

QCodes driver for B2201

class qcodes.instrument_drivers.Keysight.KeysightB2962A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the qcodes driver for the Keysight B2962A 6.5 Digit Low Noise Power Source

Status: alpha-version.

Todo

  • Implement any remaining parameters supported by the device

  • Similar drivers have special handlers to map return values of 9.9e+37 to inf, is this needed?

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

Methods:

get_idn()

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

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

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.Keysight.KeysightB2962AChannel(parent: Instrument, name: str, chan: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

InstrumentChannel that represents a singe channel of a KeysightB2962A.

Parameters:
  • parent – The instrument to which the channel is attached.

  • name – The name of the channel

  • chan – The number of the channel in question (1-2)

  • **kwargs – Forwarded to base class.

Attributes:

source_voltage

Parameter source_voltage

source_current

Parameter source_current

voltage

Parameter voltage

current

Parameter current

resistance

Parameter resistance

voltage_limit

Parameter voltage_limit

current_limit

Parameter current_limit

enable

Parameter enable

source_mode

Parameter source_mode

source_voltage: Parameter = self.add_parameter( "source_voltage", label=f"Channel {chan} Voltage", get_cmd=f"SOURCE{chan:d}:VOLT?", get_parser=float, set_cmd=f"SOURCE{chan:d}:VOLT {{:.8G}}", unit="V", )

Parameter source_voltage

source_current: Parameter = self.add_parameter( "source_current", label=f"Channel {chan} Current", get_cmd=f"SOURCE{chan:d}:CURR?", get_parser=float, set_cmd=f"SOURCE{chan:d}:CURR {{:.8G}}", unit="A", )

Parameter source_current

voltage: Parameter = self.add_parameter( "voltage", get_cmd=f"MEAS:VOLT? (@{chan:d})", get_parser=float, label=f"Channel {chan} Voltage", unit="V", )

Parameter voltage

current: Parameter = self.add_parameter( "current", get_cmd=f"MEAS:CURR? (@{chan:d})", get_parser=float, label=f"Channel {chan} Current", unit="A", )

Parameter current

resistance: Parameter = self.add_parameter( "resistance", get_cmd=f"MEAS:RES? (@{chan:d})", get_parser=float, label=f"Channel {chan} Resistance", unit="ohm", )

Parameter resistance

voltage_limit: Parameter = self.add_parameter( "voltage_limit", get_cmd=f"SENS{chan:d}:VOLT:PROT?", get_parser=float, set_cmd=f"SENS{chan:d}:VOLT:PROT {{:.8G}}", label=f"Channel {chan} Voltage Limit", unit="V", )

Parameter voltage_limit

current_limit: Parameter = self.add_parameter( "current_limit", get_cmd=f"SENS{chan:d}:CURR:PROT?", get_parser=float, set_cmd=f"SENS{chan:d}:CURR:PROT {{:.8G}}", label="Channel {} Current Limit", unit="A", )

Parameter current_limit

enable: Parameter = self.add_parameter( "enable", get_cmd=f"OUTP{chan:d}?", set_cmd=f"OUTP{chan:d} {{:d}}", val_mapping={"on": 1, "off": 0}, )

Parameter enable

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] = {}
source_mode: Parameter = self.add_parameter( "source_mode", get_cmd=f":SOUR{chan:d}:FUNC:MODE?", set_cmd=f":SOUR{chan:d}:FUNC:MODE {{:s}}", val_mapping={"current": "CURR", "voltage": "VOLT"}, )

Parameter source_mode

class qcodes.instrument_drivers.Keysight.KeysightE4980A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

QCodes driver for E4980A Precision LCR Meter

Create an instance of the instrument.

Parameters:
  • name – Name of the instrument instance

  • address – Visa-resolvable instrument address.

  • terminator – Character to terminate messages with.

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

frequency

Gets and sets the frequency for normal measurement.

current_level

Gets and sets the current level for measurement signal.

voltage_level

Gets and sets the AC bias voltage level for measurement signal.

measurement_function

Parameter measurement_function

range

Selects the impedance measurement range, also turns the auto range function OFF.

imp_autorange_enabled

Enables the auto-range for impedance measurement.

dc_bias_enabled

Enables DC bias.

dc_bias_voltage_level

Sets the DC bias voltage.

meas_time_mode

Parameter meas_time_mode

averaging_rate

Averaging rate for the measurement.

dc_bias_autorange_enabled

Enables DC Bias range AUTO setting.

signal_mode

This parameter tracks the signal mode which is being set.

correction

measure_impedance

measurement

Methods:

system_errors()

Returns the oldest unread error message from the event log and removes it from the log.

clear_status()

Clears the following:

reset()

Resets the instrument settings.

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

frequency: Parameter = self.add_parameter( "frequency", get_cmd=":FREQuency?", set_cmd=":FREQuency {}", get_parser=float, unit="Hz", vals=Numbers(20, 2e6), docstring="Gets and sets the frequency for normal measurement.", )

Gets and sets the frequency for normal measurement.

current_level: Parameter = self.add_parameter( "current_level", get_cmd=self._get_current_level, set_cmd=self._set_current_level, unit="A", vals=self._i_level_range, docstring="Gets and sets the current level for measurement signal.", )

Gets and sets the current level for measurement signal.

voltage_level: Parameter = self.add_parameter( "voltage_level", get_cmd=self._get_voltage_level, set_cmd=self._set_voltage_level, unit="V", vals=self._v_level_range, docstring="Gets and sets the AC bias voltage level for measurement " "signal.", )

Gets and sets the AC bias voltage level for measurement signal.

measurement_function: Parameter = self.add_parameter( "measurement_function", get_cmd=":FUNCtion:IMPedance?", set_cmd=self._set_measurement, )

Parameter measurement_function

range: Parameter = self.add_parameter( "range", get_cmd=":FUNCtion:IMPedance:RANGe?", set_cmd=self._set_range, unit="Ohm", vals=self._imp_range, docstring="Selects the impedance measurement range, also turns " "the auto range function OFF.", )

Selects the impedance measurement range, also turns the auto range function OFF.

imp_autorange_enabled: Parameter = self.add_parameter( "imp_autorange_enabled", get_cmd=":FUNCtion:IMPedance:RANGe:AUTO?", set_cmd=":FUNCtion:IMPedance:RANGe:AUTO {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enables the auto-range for impedance measurement.", )

Enables the auto-range for impedance measurement.

dc_bias_enabled: Parameter = self.add_parameter( "dc_bias_enabled", get_cmd=":BIAS:STATe?", set_cmd=":BIAS:STATe {}", vals=Bool(), val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enables DC bias. DC bias is automatically turned " "off after recalling the state from memory.", )

Enables DC bias. DC bias is automatically turned off after recalling the state from memory.

dc_bias_voltage_level: Parameter = self.add_parameter( "dc_bias_voltage_level", get_cmd=":BIAS:VOLTage:LEVel?", set_cmd=":BIAS:VOLTage:LEVel {}", get_parser=float, unit="V", vals=self._dc_bias_v_level_range, docstring="Sets the DC bias voltage. Setting does not " "implicitly turn the DC bias ON.", )

Sets the DC bias voltage. Setting does not implicitly turn the DC bias ON.

meas_time_mode: GroupParameter = self.add_parameter( "meas_time_mode", val_mapping={"short": "SHOR", "medium": "MED", "long": "LONG"}, parameter_class=GroupParameter, )

Parameter meas_time_mode

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
averaging_rate: GroupParameter = self.add_parameter( "averaging_rate", vals=Ints(1, 256), parameter_class=GroupParameter, get_parser=int, docstring="Averaging rate for the measurement.", )

Averaging rate for the measurement.

dc_bias_autorange_enabled: Parameter

Enables DC Bias range AUTO setting. When DC bias range is fixed (not AUTO), ‘#’ is displayed in the BIAS field of the display.

signal_mode: ManualParameter = self.add_parameter( "signal_mode", initial_value=None, vals=Enum("Voltage", "Current", None), parameter_class=ManualParameter, docstring="This parameter tracks the signal mode which is being set.", )

This parameter tracks the signal mode which is being set.

property correction: KeysightE4980ACorrection
property measure_impedance: KeysightE4980AMeasurementPair
property measurement: KeysightE4980AMeasurementPair
system_errors() str[source]

Returns the oldest unread error message from the event log and removes it from the log.

clear_status() None[source]
Clears the following:

Error Queue Status Byte Register Standard Event Status Register Operation Status Event Register Questionable Status Event Register (No Query)

reset() None[source]

Resets the instrument settings.

class qcodes.instrument_drivers.Keysight.KeysightE4980ACorrection(parent: VisaInstrument, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Module for correction settings.

Attributes:

open

Executes OPEN correction based on all frequency points.

open_state

Enables or disable OPEN correction

short

Executes SHORT correction based on all frequency points.

short_state

Enables or disable SHORT correction.

open: Parameter = self.add_parameter( "open", set_cmd=":CORRection:OPEN", docstring="Executes OPEN correction based on all frequency points.", )

Executes OPEN correction based on all frequency points.

open_state: Parameter = self.add_parameter( "open_state", get_cmd=":CORRection:OPEN:STATe?", set_cmd=":CORRection:OPEN:STATe {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enables or disable OPEN correction", )

Enables or disable OPEN correction

short: Parameter = self.add_parameter( "short", set_cmd=":CORRection:SHORt", docstring="Executes SHORT correction based on all frequency points.", )

Executes SHORT correction based on all frequency points.

short_state: Parameter = self.add_parameter( "short_state", get_cmd=":CORRection:SHORt:STATe?", set_cmd=":CORRection:SHORt:STATe {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), docstring="Enables or disable SHORT correction.", )

Enables or disable SHORT correction.

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.Keysight.KeysightE4980AMeasurementPair(name: str, names: Sequence[str], units: Sequence[str], **kwargs: Any)[source]

Bases: MultiParameter

Data class for E4980A measurement, which will always return two items at once.

The two items are for two different parameters, depending on the measurement function. Hence, the names of the two attributes are created from the “names” tuple of the measurement functions.

Examples

To create a measurement data with capacitance=1.2, and dissipation_factor=3.4.

>>> data = KeysightE4980AMeasurementPair(name="CPD",
                            names=("capacitance", "dissipation_factor"),
                            units=("F", ""))
>>> data.set((1.2, 3.4))
>>> data.get()
(1.2, 3.4)

Attributes:

value

Methods:

set_raw(value)

set_raw is called to perform the actual setting of a parameter on the instrument.

get_raw()

get_raw is called to perform the actual data acquisition from the instrument.

value: tuple[float, float] = (0.0, 0.0)
set_raw(value: tuple[float, float]) None[source]

set_raw is called to perform the actual setting of a parameter on the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if set_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a set method on the parameter instance.

get_raw() tuple[Any, ...][source]

get_raw is called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively for Parameter a suitable method is automatically generated if get_cmd is supplied to the parameter constructor. The method is automatically wrapped to provide a get method on the parameter instance.

get_parser: Callable[..., Any] | None
set_parser: Callable[..., Any] | None
cache: _CacheProtocol
get_latest: GetLatest
get: Callable[..., ParamDataType]
set: Callable[..., None]
metadata: dict[str, Any]
class qcodes.instrument_drivers.Keysight.KeysightE4980AMeasurements[source]

Bases: object

All the measurement function for E4980A LCR meter. See user’s guide P353 https://literature.cdn.keysight.com/litweb/pdf/E4980-90230.pdf?id=789356

Attributes:

CPD(*args, **kwargs)

CPQ(*args, **kwargs)

CPG(*args, **kwargs)

CPRP(*args, **kwargs)

CSD(*args, **kwargs)

CSQ(*args, **kwargs)

CSRS(*args, **kwargs)

LPD(*args, **kwargs)

LPQ(*args, **kwargs)

LPG(*args, **kwargs)

LPRP(*args, **kwargs)

LSD(*args, **kwargs)

LSQ(*args, **kwargs)

LSRS(*args, **kwargs)

LSRD(*args, **kwargs)

RX(*args, **kwargs)

ZTD(*args, **kwargs)

ZTR(*args, **kwargs)

GB(*args, **kwargs)

YTD(*args, **kwargs)

YTR(*args, **kwargs)

VDID(*args, **kwargs)

CPD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CPD at 140416799845264>
CPQ(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CPQ at 140416799845392>
CPG(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CPG at 140416799847248>
CPRP(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CPRP at 140416799848976>
CSD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CSD at 140416799849680>
CSQ(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CSQ at 140416799850320>
CSRS(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: CSRS at 140416799900304>
LPD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LPD at 140416799901008>
LPQ(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LPQ at 140416799901648>
LPG(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LPG at 140416799902416>
LPRP(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LPRP at 140416799903120>
LSD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LSD at 140416799903824>
LSQ(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LSQ at 140416799904464>
LSRS(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LSRS at 140416799905232>
LSRD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: LSRD at 140416799905936>
RX(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: RX at 140416799906576>
ZTD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: ZTD at 140416799907280>
ZTR(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: ZTR at 140416799907984>
GB(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: GB at 140416799908688>
YTD(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: YTD at 140416799909392>
YTR(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: YTR at 140416799910160>
VDID(*args: Any, **kwargs: Any) Any | None = <qcodes.instrument_drivers.Keysight.keysight_e4980a.KeysightE4980AMeasurementPair: VDID at 140416799910800>
class qcodes.instrument_drivers.Keysight.KeysightErrorQueueMixin[source]

Bases: object

Mixin class for visa instruments that happen to implement an error queue.

It is meant to work ONLY with drivers for Keysight instruments (which inherit from VisaInstrument class).

Methods:

error()

Return the first error message in the queue.

flush_error_queue([verbose])

Clear the instrument error queue, and prints it.

error() tuple[int, str][source]

Return the first error message in the queue. It also clears it from the error queue.

Up to 20 errors can be stored in the instrument’s error queue. Error retrieval is first-in-first-out (FIFO).

If more than 20 errors have occurred, the most recent error stored in the queue is replaced with -350,”Queue overflow”. No additional errors are stored until you remove errors from the queue. If no errors have occurred when you read the error queue, the instrument responds with +0,”No error”.

Returns:

The error code and the error message.

flush_error_queue(verbose: bool = True) None[source]

Clear the instrument error queue, and prints it.

Parameters:

verbose – If true, the error messages are printed. Default: True.

class qcodes.instrument_drivers.Keysight.KeysightInfiniium(name: str, address: str, channels: int = 4, silence_pyvisapy_warning: bool = False, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

This is the QCoDeS driver for the Keysight Infiniium oscilloscopes

Initialises the oscilloscope.

Parameters:
  • name – Name of the instrument used by QCoDeS

  • address – Instrument address as used by VISA

  • timeout – Visa timeout, in secs.

  • channels – The number of channels on the scope.

  • silence_pyvisapy_warning – Don’t warn about pyvisa-py at startup

  • **kwargs – kwargs are forwarded to base class.

Attributes:

default_timeout

The default timeout in seconds if the timeout is not specified when creating the instrument.

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

Methods:

run()

Set the scope in run mode.

stop()

Set the scope in stop mode.

single()

Take a single acquisition

update_all_setpoints()

Update the setpoints for all enabled channels.

digitize([timeout])

Digitize a full waveform and block until the acquisition is complete.

default_timeout: float | None = 20

The default timeout in seconds if the timeout is not specified when creating the instrument. None means no timeout e.g. wait forever.

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

run_mode: Parameter = Parameter( name="run_mode", instrument=self, label="run mode", get_cmd=":RST?", vals=vals.Enum("RUN", "STOP", "SING"), )
timebase_range: Parameter = Parameter( name="timebase_range", instrument=self, label="Range of the time axis", unit="s", get_cmd=":TIM:RANG?", set_cmd=":TIM:RANG {}", vals=vals.Numbers(5e-12, 20), get_parser=float, )
timebase_position: Parameter = Parameter( name="timebase_position", instrument=self, label="Offset of the time axis", unit="s", get_cmd=":TIM:POS?", set_cmd=":TIM:POS {}", vals=vals.Numbers(), get_parser=float, )
timebase_roll_enabled: Parameter = Parameter( name="timebase_roll_enabled", instrument=self, label="Is rolling mode enabled", get_cmd=":TIM:ROLL:ENABLE?", set_cmd=":TIM:ROLL:ENABLE {}", val_mapping={True: 1, False: 0}, )
trigger_mode: Parameter = Parameter( name="trigger_mode", instrument=self, label="Trigger mode", get_cmd=":TRIG:MODE?", )
trigger_sweep: Parameter = Parameter( name="trigger_sweep", instrument=self, label="Trigger sweep mode", get_cmd=":TRIG:SWE?", set_cmd=":TRIG:SWE {}", vals=vals.Enum("AUTO", "TRIG"), )
trigger_state: Parameter = Parameter( name="trigger_state", instrument=self, label="Trigger state", get_cmd=":AST?", vals=vals.Enum("ARM", "TRIG", "ATRIG", "ADONE"), snapshot_value=False, )
trigger_edge_source: Parameter = Parameter( name="trigger_edge_source", instrument=self, label="Source channel for the edge trigger", get_cmd=":TRIGger:EDGE:SOURce?", set_cmd=":TRIGger:EDGE:SOURce {}", vals=vals.Enum( *( [f"CHAN{i}" for i in range(1, 4 + 1)] + [f"DIG{i}" for i in range(16 + 1)] + ["AUX", "LINE"] ) ), )
trigger_edge_slope: Parameter = Parameter( name="trigger_edge_slope", instrument=self, label="slope of the edge trigger", get_cmd=":TRIGger:EDGE:SLOPe?", set_cmd=":TRIGger:EDGE:SLOPe {}", vals=vals.Enum("POS", "POSITIVE", "NEG", "NEGATIVE", "EITH"), )
trigger_level_aux: Parameter = Parameter( name="trigger_level_aux", instrument=self, label="Trigger level AUX", unit="V", get_cmd=":TRIGger:LEVel? AUX", set_cmd=":TRIGger:LEVel AUX,{}", get_parser=float, vals=vals.Numbers(), )
acquire_points: Parameter = Parameter( name="acquire_points", instrument=self, label="sample points", get_cmd=":ACQ:POIN?", set_cmd=":ACQ:POIN {}", get_parser=int, vals=vals.Numbers(min_value=self.min_pts, max_value=self.max_pts), )
sample_rate: Parameter = Parameter( name="sample_rate", instrument=self, label="sample rate", get_cmd=":ACQ:SRAT?", set_cmd=":ACQ:SRAT {}", unit="Hz", get_parser=float, vals=vals.Numbers(min_value=self.min_srat, max_value=self.max_srat), )
bandwidth: Parameter = Parameter( name="bandwidth", instrument=self, label="bandwidth", get_cmd=":ACQ:BAND?", set_cmd=":ACQ:BAND {}", unit="Hz", get_parser=float, vals=vals.Numbers(min_value=self.min_bw, max_value=self.max_bw), )
acquire_interpolate: Parameter = Parameter( name="acquire_interpolate", instrument=self, get_cmd=":ACQ:INTerpolate?", set_cmd=":ACQuire:INTerpolate {}", vals=vals.Enum(0, 1, "INT1", "INT2", "INT4", "INT8", "INT16", "INT32"), )
acquire_mode: Parameter = Parameter( name="acquire_mode", instrument=self, label="Acquisition mode", get_cmd="ACQuire:MODE?", set_cmd="ACQuire:MODE {}", vals=vals.Enum( "ETIMe", "RTIMe", "PDETect", "HRESolution", "SEGMented", "SEGPdetect", "SEGHres", ), )
average: Parameter = Parameter( name="average", instrument=self, label="Averages", get_cmd=self._get_avg, set_cmd=self._set_avg, vals=vals.Ints(min_value=1, max_value=10486575), )
auto_digitize: Parameter = Parameter( name="auto_digitize", instrument=self, label="Auto digitize", set_cmd=None, get_cmd=None, val_mapping=create_on_off_val_mapping(), docstring=( "Digitize before each waveform download. " "If you need to acquire from multiple channels simultaneously " "or you wish to acquire with the scope running freely, " "set this value to False." ), initial_value=True, )
cache_setpoints: Parameter = Parameter( name="cache_setpoints", instrument=self, label="Cache setpoints", set_cmd=None, get_cmd=None, val_mapping=create_on_off_val_mapping(), docstring=( "Cache setpoints. If false, the preamble is queried before each" " acquisition, which may add latency to measurements. If you" " are taking repeated measurements, set this to True and update" " setpoints manually by calling `instr.chX.update_setpoints()`." ), initial_value=False, )
run() None[source]

Set the scope in run mode.

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
stop() None[source]

Set the scope in stop mode.

single() None[source]

Take a single acquisition

update_all_setpoints() None[source]

Update the setpoints for all enabled channels. This method may be run at the beginning of a measurement rather than looping through each channel manually.

digitize(timeout: int | None = None) None[source]

Digitize a full waveform and block until the acquisition is complete.

Warning: If using pyvisa_py as your visa library, this will not work with acquisitions longer than a single timeout period. If you require long acquisitions either use Keysight/NI Visa or set timeout to be longer than the expected acquisition time.

class qcodes.instrument_drivers.Keysight.KeysightInfiniiumBoundMeasurement(parent: KeysightInfiniiumChannel | KeysightInfiniiumFunction, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: AbstractMeasurementSubsystem

Initialize measurement subsystem bound to a specific channel

class qcodes.instrument_drivers.Keysight.KeysightInfiniiumChannel(parent: KeysightInfiniium, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Initialize an infiniium channel.

Attributes:

channel

channel_name

Methods:

update_setpoints()

Update time axis and offsets for this channel.

property channel: int
property channel_name: str
update_setpoints() None[source]

Update time axis and offsets for this channel. Calling this function is required when instr.cache_setpoints is True whenever the scope parameters are changed.

class qcodes.instrument_drivers.Keysight.KeysightInfiniiumFunction(parent: KeysightInfiniium, name: str, channel: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Initialize an infiniium channel.

Attributes:

channel

channel_name

property channel: int
property channel_name: str
class qcodes.instrument_drivers.Keysight.KeysightInfiniiumUnboundMeasurement(parent: KeysightInfiniium, name: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: AbstractMeasurementSubsystem

Initialize measurement subsystem where target is set by the parameter source.

class qcodes.instrument_drivers.Keysight.KeysightM9336A(name: str, address: str, options: str = '', dll_path: str = 'C:\\Program Files\\IVI Foundation\\IVI\\Bin\\KtMAwg_64.dll', **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: Instrument

AWG Driver for the Keysight M9336A PXIe I/Q Arbitrary Waveform Generator. This driver provides a simple wrapper around the IVI-C drivers from Keysight. The output configuration, gain can be controlled and a waveform can be loaded from a file.

Methods:

get_idn()

generates the *IDN dictionary for qcodes

get_errors()

close()

Irreversibly stop this instrument and free its resources.

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

generates the *IDN dictionary for qcodes

get_errors() dict[int, str][source]
close() None[source]

Irreversibly stop this instrument and free its resources.

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

class qcodes.instrument_drivers.Keysight.KeysightM9336AAWGChannel(parent: KeysightM9336A, name: str, chan: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Represent the three channels of the Keysight KTM Awg driver. The channels can be independently controlled and programmed with seperate waveforms.

Attributes:

output_term_config

Parameter output_term_config

operation

Parameter operation

output

Parameter output

gain_config

Parameter gain_config

gain

Parameter gain

analog_gain

Parameter analog_gain

digital_gain

Parameter digital_gain

Methods:

load_waveform(filename)

clear_waveform()

play_waveform()

stop_waveform()

output_term_config: Parameter = self.add_parameter( "output_term_config", label="Output Terminal Configuration", get_cmd=partial( self.root_instrument._get_vi_int, KTMAWG_ATTR_TERMINAL_CONFIGURATION, ch=self._channel ), set_cmd=partial( self.root_instrument._set_vi_int, KTMAWG_ATTR_TERMINAL_CONFIGURATION, ch=self._channel ), val_mapping={ "differential": KTMAWG_VAL_TERMINAL_CONFIGURATION_DIFFERENTIAL, "single": KTMAWG_VAL_TERMINAL_CONFIGURATION_SINGLE_ENDED, }, )

Parameter output_term_config

operation: Parameter = self.add_parameter( "operation", label="Operating Mode", get_cmd=partial( self.root_instrument._get_vi_int, KTMAWG_ATTR_OPERATION_MODE, ch=self._channel ), set_cmd=partial( self.root_instrument._set_vi_int, KTMAWG_ATTR_OPERATION_MODE, ch=self._channel ), val_mapping={ "continuous": KTMAWG_VAL_OPERATE_CONTINUOUS, "burst": KTMAWG_VAL_OPERATE_BURST, }, )

Parameter operation

output: Parameter = self.add_parameter( "output", label="Output Enable", get_cmd=partial( self.root_instrument._get_vi_bool, KTMAWG_ATTR_OUTPUT_ENABLED, ch=self._channel ), set_cmd=partial( self.root_instrument._set_vi_bool, KTMAWG_ATTR_OUTPUT_ENABLED, ch=self._channel ), val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), )

Parameter output

gain_config: Parameter = self.add_parameter( "gain_config", label="AWG Gain Control Mode", set_cmd=self._set_gain_control, get_cmd=self._get_gain_control, val_mapping={ "composite": KTMAWG_VAL_GAIN_CONTROL_COMPOSITE, "component": KTMAWG_VAL_GAIN_CONTROL_COMPONENT, }, )

Parameter gain_config

gain: Parameter = self.add_parameter( "gain", label="Composite Output Gain", set_cmd=self._set_gain, vals=Numbers(0, 0.7999), get_cmd=None, )

Parameter gain

analog_gain: Parameter = self.add_parameter( "analog_gain", label="Analog Output Gain", vals=Numbers(0, 1.32), set_cmd=self._set_analog_gain, get_cmd=self._get_analog_gain, )

Parameter analog_gain

digital_gain: Parameter = self.add_parameter( "digital_gain", label="Digital Output Gain", vals=Numbers(0, 1.0), set_cmd=self._set_digital_gain, get_cmd=self._get_digital_gain, )

Parameter digital_gain

load_waveform(filename: str) None[source]
clear_waveform() None[source]
play_waveform() None[source]
stop_waveform() None[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.Keysight.KeysightM960x(name: str, address: str, options: str = '', dll_path: str = 'C:\\Program Files\\IVI Foundation\\IVI\\Bin\\KtM960x_64.dll', **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: Instrument

Provide a wrapper for the Keysight KtM960x DAC. This driver provides an interface into the IVI-C driver provided by Keysight. The .dll is installed by default into C:Program FilesIVI FoundationIVIBinKtM960x_64.dll but a different path can be supplied to the constructor

Attributes:

output

Parameter output

voltage_level

Parameter voltage_level

current_range

Parameter current_range

measure_current_range

Parameter measure_current_range

measure_current_time

Parameter measure_current_time

measure_data

Parameter measure_data

Methods:

get_idn()

generates the *IDN dictionary for qcodes

get_errors()

close()

Irreversibly stop this instrument and free its resources.

output: Parameter = self.add_parameter( "output", label="Source Output Enable", get_cmd=partial(self._get_vi_bool, KTM960X_ATTR_OUTPUT_ENABLED), set_cmd=partial(self._set_vi_bool, KTM960X_ATTR_OUTPUT_ENABLED), val_mapping=create_on_off_val_mapping(on_val=True, off_val=False), )

Parameter output

voltage_level: Parameter = self.add_parameter( "voltage_level", label="Source Voltage Level", unit="Volt", get_cmd=partial(self._get_vi_real64, KTM960X_ATTR_OUTPUT_VOLTAGE_LEVEL), set_cmd=partial(self._set_vi_real64, KTM960X_ATTR_OUTPUT_VOLTAGE_LEVEL), vals=vals.Numbers(-210, 210), )

Parameter voltage_level

current_range: Parameter = self.add_parameter( "current_range", label="Output Current Range", unit="Amp", vals=vals.Numbers(1e-9, 300e-3), get_cmd=partial(self._get_vi_real64, KTM960X_ATTR_OUTPUT_CURRENT_RANGE), set_cmd=partial(self._set_vi_real64, KTM960X_ATTR_OUTPUT_CURRENT_RANGE), )

Parameter current_range

measure_current_range: Parameter = self.add_parameter( "measure_current_range", label="Current Measurement Range", unit="Amp", get_cmd=partial( self._get_vi_real64, KTM960X_ATTR_MEASUREMENT_CURRENT_RANGE ), set_cmd=partial( self._set_vi_real64, KTM960X_ATTR_MEASUREMENT_CURRENT_RANGE ), vals=vals.Numbers(1e-9, 300e-3), )

Parameter measure_current_range

measure_current_time: Parameter = self.add_parameter( "measure_current_time", label="Current Measurement Integration Time", unit="Seconds", get_cmd=partial( self._get_vi_real64, KTM960X_ATTR_MEASUREMENT_CURRENT_APERTURE ), set_cmd=partial( self._set_vi_real64, KTM960X_ATTR_MEASUREMENT_CURRENT_APERTURE ), vals=vals.Numbers(800e-9, 2), )

Parameter measure_current_time

measure_data: Measure = self.add_parameter( "measure_data", parameter_class=Measure )

Parameter measure_data

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

generates the *IDN dictionary for qcodes

get_errors() dict[int, str][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] = {}
close() None[source]

Irreversibly stop this instrument and free its resources.

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

class qcodes.instrument_drivers.Keysight.KeysightN5173B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightN5183B

class qcodes.instrument_drivers.Keysight.KeysightN5183B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightN51x1

class qcodes.instrument_drivers.Keysight.KeysightN5222B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNABase

Driver for Keysight PNA N5222B.

class qcodes.instrument_drivers.Keysight.KeysightN5230C(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNABase

class qcodes.instrument_drivers.Keysight.KeysightN5232B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNABase

class qcodes.instrument_drivers.Keysight.KeysightN5245A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNAxBase

class qcodes.instrument_drivers.Keysight.KeysightN6705B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

Methods:

get_idn()

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

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

channels: list[KeysightN6705BChannel] = []
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.Keysight.KeysightN6705BChannel(parent: Instrument, name: str, chan: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Attributes:

source_voltage

Parameter source_voltage

source_current

Parameter source_current

voltage_limit

Parameter voltage_limit

voltage

Parameter voltage

current

Parameter current

enable

Parameter enable

source_mode

Parameter source_mode

source_voltage: Parameter = self.add_parameter( "source_voltage", label=f"Channel {chan} Voltage", get_cmd=f"SOURCE:VOLT? (@{chan})", get_parser=float, set_cmd=f"SOURCE:VOLT {{:.8G}}, (@{chan})", unit="V", )

Parameter source_voltage

source_current: Parameter = self.add_parameter( "source_current", label=f"Channel {chan} Current", get_cmd=f"SOURCE:CURR? (@{chan})", get_parser=float, set_cmd=f"SOURCE:CURR {{:.8G}}, (@{chan})", unit="A", )

Parameter source_current

voltage_limit: Parameter = self.add_parameter( "voltage_limit", get_cmd=f"SOUR:VOLT:PROT? (@{chan})", get_parser=float, set_cmd=f"SOUR:VOLT:PROT {{:.8G}}, @({chan})", label=f"Channel {chan} Voltage Limit", unit="V", )

Parameter voltage_limit

voltage: Parameter = self.add_parameter( "voltage", get_cmd=f"MEAS:VOLT? (@{chan})", get_parser=float, label=f"Channel {chan} Voltage", unit="V", )

Parameter voltage

current: Parameter = self.add_parameter( "current", get_cmd=f"MEAS:CURR? (@{chan})", get_parser=float, label=f"Channel {chan} Current", unit="A", )

Parameter current

enable: Parameter = self.add_parameter( "enable", get_cmd=f"OUTP:STAT? (@{chan})", set_cmd=f"OUTP:STAT {{:d}}, (@{chan})", val_mapping={"on": 1, "off": 0}, )

Parameter enable

source_mode: Parameter = self.add_parameter( "source_mode", get_cmd=f":OUTP:PMOD? (@{chan})", set_cmd=f":OUTP:PMOD {{:s}}, (@{chan})", val_mapping={"current": "CURR", "voltage": "VOLT"}, )

Parameter source_mode

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.Keysight.KeysightN9030B(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Driver for Keysight N9030B PXA signal analyzer. Keysight N9030B PXA signal analyzer is part of Keysight X-Series Multi-touch Signal Analyzers. This driver allows Swept SA measurements in Spectrum Analyzer mode and Log Plot measurements in Phase Noise mode of the instrument.

Parameters:
  • name

  • address

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

mode

Allows setting of different modes present and licensed for the instrument.

measurement

Sets measurement type from among the available measurement types.

cont_meas

Enables or disables continuous measurement.

auto_sweep

Parameter auto_sweep

format

Sets up format of data received

Methods:

available_modes()

Returns present and licensed modes for the instrument.

available_meas()

Gives available measurement with a given mode for the instrument

options()

Returns installed options numbers.

reset()

Reset the instrument by sending the RST command

abort()

Aborts the measurement

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

mode: Parameter = self.add_parameter( name="mode", get_cmd=":INSTrument:SELect?", set_cmd=":INSTrument:SELect {}", vals=Enum(*self.available_modes()), docstring="Allows setting of different modes present and licensed " "for the instrument.", )

Allows setting of different modes present and licensed for the instrument.

measurement: Parameter = self.add_parameter( name="measurement", get_cmd=":CONFigure?", set_cmd=":CONFigure:{}", vals=Enum("SAN", "LPL"), docstring="Sets measurement type from among the available " "measurement types.", )

Sets measurement type from among the available measurement types.

cont_meas: Parameter = self.add_parameter( name="cont_meas", initial_value=False, get_cmd=":INITiate:CONTinuous?", set_cmd=":INITiate:CONTinuous {}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), docstring="Enables or disables continuous measurement.", )

Enables or disables continuous measurement.

auto_sweep: Parameter = self.add_parameter( "auto_sweep", label="Auto Sweep", set_cmd=None, get_cmd=None, vals=Bool(), initial_value=True, )

Parameter auto_sweep

format: Parameter = self.add_parameter( name="format", get_cmd=lambda: "real64", set_cmd=False, docstring="Sets up format of data received", )

Sets up format of data received

available_modes() tuple[str, ...][source]

Returns present and licensed modes for the instrument.

available_meas() tuple[str, ...][source]

Gives available measurement with a given mode for the instrument

options() tuple[str, ...][source]

Returns installed options numbers.

reset() None[source]

Reset the instrument by sending the RST command

abort() None[source]

Aborts the measurement

class qcodes.instrument_drivers.Keysight.KeysightN9030BPhaseNoiseMode(parent: KeysightN9030B, name: str, *arg: Any, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Phase Noise Mode for Keysight N9030B instrument.

Attributes:

npts

Number of points for the sweep

start_offset

start frequency offset for the plot

stop_offset

stop frequency offset for the plot

signal_tracking_enabled

Gets/Sets signal tracking.

freq_axis

Creates frequency axis for the sweep from start_offset, stop_offset and npts values.

trace

Gets trace data

Methods:

setup_log_plot_sweep(start_offset, ...)

Sets up the Log Plot measurement sweep for Phase Noise Mode.

autotune()

On autotune, the measurement automatically searches for and tunes to the strongest signal in the full span of the analyzer.

npts: Parameter = self.add_parameter( name="npts", get_cmd=":SENSe:LPLot:SWEep:POINts?", set_cmd=":SENSe:LPLot:SWEep:POINts {}", get_parser=int, vals=Ints(601, 20001), docstring="Number of points for the sweep", )

Number of points for the sweep

start_offset: Parameter = self.add_parameter( name="start_offset", unit="Hz", get_cmd=":SENSe:LPLot:FREQuency:OFFSet:STARt?", set_cmd=self._set_start_offset, get_parser=float, vals=Numbers(self._min_freq, self._max_freq - 10), docstring="start frequency offset for the plot", )

start frequency offset for the plot

stop_offset: Parameter = self.add_parameter( name="stop_offset", unit="Hz", get_cmd=":SENSe:LPLot:FREQuency:OFFSet:STOP?", set_cmd=self._set_stop_offset, get_parser=float, vals=Numbers(self._min_freq + 99, self._max_freq), docstring="stop frequency offset for the plot", )

stop frequency offset for the plot

signal_tracking_enabled: Parameter = self.add_parameter( name="signal_tracking_enabled", get_cmd=":SENSe:FREQuency:CARRier:TRACk?", set_cmd=":SENSe:FREQuency:CARRier:TRACk {}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), docstring="Gets/Sets signal tracking. When signal tracking is " "enabled carrier signal is repeatedly realigned. Signal " "Tracking assumes the new acquisition occurs repeatedly " "without pause.", )

Gets/Sets signal tracking. When signal tracking is enabled carrier signal is repeatedly realigned. Signal Tracking assumes the new acquisition occurs repeatedly without pause.

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] = {}
freq_axis: FrequencyAxis = self.add_parameter( name="freq_axis", label="Frequency", unit="Hz", start=self.start_offset, stop=self.stop_offset, npts=self.npts, vals=Arrays(shape=(self.npts.get_latest,)), parameter_class=FrequencyAxis, docstring="Creates frequency axis for the sweep from " "start_offset, stop_offset and npts values.", )

Creates frequency axis for the sweep from start_offset, stop_offset and npts values.

trace: Trace = self.add_parameter( name="trace", label="Trace", unit="dB", number=3, vals=Arrays(shape=(self.npts.get_latest,)), setpoints=(self.freq_axis,), get_data=self._get_data, parameter_class=Trace, docstring="Gets trace data", )

Gets trace data

setup_log_plot_sweep(start_offset: float, stop_offset: float, npts: int) None[source]

Sets up the Log Plot measurement sweep for Phase Noise Mode.

autotune() None[source]

On autotune, the measurement automatically searches for and tunes to the strongest signal in the full span of the analyzer.

class qcodes.instrument_drivers.Keysight.KeysightN9030BSpectrumAnalyzerMode(parent: KeysightN9030B, name: str, *arg: Any, additional_wait: int = 1, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Spectrum Analyzer Mode for Keysight N9030B instrument.

Attributes:

start

Start Frequency

stop

Stop Frequency

center

Sets and gets center frequency

span

Changes span of frequency

npts

Number of points for the sweep

mech_attenuation

Internal mechanical attenuation

preamp

Preamplifier selection

preamp_enabled

Preamplifier state

res_bw

Resolution Bandwidth

video_bw

Video Filter Bandwidth

res_bw_type

The instrument provides four ways of specifying the bandwidth of a Gaussian filter:

detector

Detector type

average_type

Lets you control the way averaging is done.

sweep_time

gets sweep time

auto_sweep_time_enabled

enables auto sweep time

auto_sweep_type_enabled

enables auto sweep type

sweep_type

Sets up sweep type.

freq_axis

Creates frequency axis for the sweep from start, stop and npts values.

trace

Gets trace data.

Methods:

update_trace()

Updates all frequency parameters together when one is changed

setup_swept_sa_sweep(start, stop, npts)

Sets up the Swept SA measurement sweep for Spectrum Analyzer Mode.

autotune()

Autotune quickly get to the most likely signal of interest, and position it optimally on the display.

start: Parameter = self.add_parameter( name="start", unit="Hz", get_cmd=":SENSe:FREQuency:STARt?", set_cmd=self._set_start, get_parser=float, vals=Numbers(self._min_freq, self._max_freq - 10), docstring="Start Frequency", )

Start Frequency

stop: Parameter = self.add_parameter( name="stop", unit="Hz", get_cmd=":SENSe:FREQuency:STOP?", set_cmd=self._set_stop, get_parser=float, vals=Numbers(self._min_freq + 10, self._max_freq), docstring="Stop Frequency", )

Stop Frequency

center: Parameter = self.add_parameter( name="center", unit="Hz", get_cmd=":SENSe:FREQuency:CENTer?", set_cmd=self._set_center, get_parser=float, vals=Numbers(self._min_freq + 5, self._max_freq - 5), docstring="Sets and gets center frequency", )

Sets and gets center frequency

span: Parameter = self.add_parameter( name="span", unit="Hz", get_cmd=":SENSe:FREQuency:SPAN?", set_cmd=self._set_span, get_parser=float, vals=Numbers(10, self._max_freq - self._min_freq), docstring="Changes span of frequency", )

Changes span of frequency

npts: Parameter = self.add_parameter( name="npts", get_cmd=":SENSe:SWEep:POINts?", set_cmd=":SENSe:SWEep:POINts {}", get_parser=int, vals=Ints(1, 20001), docstring="Number of points for the sweep", )

Number of points for the sweep

mech_attenuation: Parameter = self.add_parameter( name="mech_attenuation", unit="dB", get_cmd=":SENS:POW:ATT?", set_cmd=":SENS:POW:ATT {}", get_parser=int, vals=Ints(0, 70), docstring="Internal mechanical attenuation", )

Internal mechanical attenuation

preamp: Parameter = self.add_parameter( name="preamp", get_cmd=":SENS:POW:GAIN:BAND?", set_cmd=":SENS:POW:GAIN:BAND {}", vals=Enum("LOW", "FULL"), docstring="Preamplifier selection", )

Preamplifier selection

preamp_enabled: Parameter = self.add_parameter( name="preamp_enabled", get_cmd=":SENS:POW:GAIN:STAT?", set_cmd=":SENS:POW:GAIN:STAT {}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), docstring="Preamplifier state", )

Preamplifier state

res_bw: Parameter = self.add_parameter( name="res_bw", unit="Hz", get_cmd=":SENS:BAND:RES?", set_cmd=":SENS:BAND:RES {}", get_parser=float, vals=Numbers(1, 8e6), docstring="Resolution Bandwidth", )

Resolution Bandwidth

video_bw: Parameter = self.add_parameter( name="video_bw", unit="Hz", get_cmd=":SENS:BAND:VID?", set_cmd=":SENS:BAND:VID {}", get_parser=float, vals=Numbers(1, 50e6), docstring="Video Filter Bandwidth", )

Video Filter Bandwidth

res_bw_type: Parameter = self.add_parameter( name="res_bw_type", get_cmd=":SENS:BAND:TYPE?", set_cmd=":SENS:BAND:TYPE {}", vals=Enum("DB3", "DB6", "IMP", "NOISE"), docstring=( "The instrument provides four ways of specifying the " "bandwidth of a Gaussian filter:\n" " 1. The -3 dB bandwidth of the filter (DB3)\n" " 2. The -6 dB bandwidth of the filter (DB6)\n" " 3. The equivalent Noise bandwidth of the filter, " "which is defined as the bandwidth of a rectangular " "filter with the same peak gain which would pass the " "same power for noise signals\n" " 4. The equivalent Impulse bandwidth of the filter, " "which is defined as the bandwidth of a rectangular " "filter with the same peak gain which would pass the " "same power for impulsive (narrow pulsed) signals." ), )

The instrument provides four ways of specifying the bandwidth of a Gaussian filter:

  1. The -3 dB bandwidth of the filter (DB3)

  2. The -6 dB bandwidth of the filter (DB6)

  3. The equivalent Noise bandwidth of the filter, which is defined as the bandwidth of a rectangular filter with the same peak gain which would pass the same power for noise signals

  4. The equivalent Impulse bandwidth of the filter, which is defined as the bandwidth of a rectangular filter with the same peak gain which would pass the same power for impulsive (narrow pulsed) signals.

detector: Parameter = self.add_parameter( name="detector", get_cmd=":SENS:DET:TRAC?", set_cmd=":SENS:DET:TRAC {}", vals=Enum("NORM", "AVER", "POS", "SAMP", "NEG"), docstring="Detector type", )

Detector type

average_type: Parameter = self.add_parameter( name="average_type", get_cmd=":SENS:AVER:TYPE?", set_cmd=":SENS:AVER:TYPE {}", vals=Enum("LOG", "RMS", "SCAL"), docstring=( "Lets you control the way averaging is done. The averaging processes " "affected are:\n" " 1. Trace averaging\n" " 2. Average detector averages signals within the resolution BW\n" " 3. Noise marker is corrected for average type\n" " 4. VBW filtering (not affected if Average detector is used).\n" "The averaging types are:" " 1. LOG: Selects the logarithmic (decibel) scale for all filtering and " "averaging processes. This scale is sometimes called 'Video' because it " "is the most common display and analysis scale for the video signal " "within a spectrum instrument. This scale is excellent for finding CW " "signals near noise, but its response to noise-like signals is 2.506 dB " "lower than the average power of those noise signals. This is compensated " "for in the Marker Noise function.\n" " 2. RMS: All filtering and averaging processes work on the power (the square " "of the magnitude) of the signal, instead of its log or envelope voltage. This " "scale is best for measuring the true time average power of complex signals. " "This scale is sometimes called RMS because the resulting voltage is proportional " "to the square root of the mean of the square of the voltage.\n" " 3. SCAL: (Voltage) All filtering and averaging processes work on the voltage " "of the envelope of the signal. This scale is good for observing rise and fall " "behavior of AM or pulse-modulated signals such as radar and TDMA transmitters, " "but its response to noise-like signals is 1.049 dB lower than the average power " "of those noise signals. This is compensated for in the Marker Noise function." ), )

Lets you control the way averaging is done. The averaging processes affected are:

  1. Trace averaging

  2. Average detector averages signals within the resolution BW

  3. Noise marker is corrected for average type

  4. VBW filtering (not affected if Average detector is used).

The averaging types are:

  1. LOG: Selects the logarithmic (decibel) scale for all filtering and averaging processes. This scale is sometimes called ‘Video’ because it is the most common display and analysis scale for the video signal within a spectrum instrument. This scale is excellent for finding CW signals near noise, but its response to noise-like signals is 2.506 dB lower than the average power of those noise signals. This is compensated for in the Marker Noise function.

  2. RMS: All filtering and averaging processes work on the power (the square of the magnitude) of the signal, instead of its log or envelope voltage. This scale is best for measuring the true time average power of complex signals. This scale is sometimes called RMS because the resulting voltage is proportional to the square root of the mean of the square of the voltage.

  3. SCAL: (Voltage) All filtering and averaging processes work on the voltage of the envelope of the signal. This scale is good for observing rise and fall behavior of AM or pulse-modulated signals such as radar and TDMA transmitters, but its response to noise-like signals is 1.049 dB lower than the average power of those noise signals. This is compensated for in the Marker Noise function.

sweep_time: Parameter = self.add_parameter( name="sweep_time", label="Sweep time", get_cmd=":SENSe:SWEep:TIME?", set_cmd=":SENSe:SWEep:TIME {}", get_parser=float, unit="s", docstring="gets sweep time", )

gets sweep time

auto_sweep_time_enabled: Parameter = self.add_parameter( name="auto_sweep_time_enabled", get_cmd=":SENSe:SWEep:TIME:AUTO?", set_cmd=":SENSe:SWEep:TIME:AUTO {}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), docstring="enables auto sweep time", )

enables auto sweep time

auto_sweep_type_enabled: Parameter = self.add_parameter( name="auto_sweep_type_enabled", get_cmd=":SENSe:SWEep:TYPE:AUTO?", set_cmd=":SENSe:SWEep:TYPE:AUTO {}", val_mapping=create_on_off_val_mapping(on_val=1, off_val=0), docstring="enables auto sweep type", )

enables auto sweep type

sweep_type: Parameter = self.add_parameter( name="sweep_type", get_cmd=":SENSe:SWEep:TYPE?", set_cmd=":SENSe:SWEep:TYPE {}", val_mapping={ "fft": "FFT", "sweep": "SWE", }, docstring="Sets up sweep type. Possible options are 'fft' and 'sweep'.", )

Sets up sweep type. Possible options are ‘fft’ and ‘sweep’.

freq_axis: FrequencyAxis = self.add_parameter( name="freq_axis", label="Frequency", unit="Hz", start=self.start, stop=self.stop, npts=self.npts, vals=Arrays(shape=(self.npts.get_latest,)), parameter_class=FrequencyAxis, docstring="Creates frequency axis for the sweep from start, " "stop and npts values.", )

Creates frequency axis for the sweep from start, stop and npts values.

trace: Trace = self.add_parameter( name="trace", label="Trace", unit="dB", number=1, vals=Arrays(shape=(self.npts.get_latest,)), setpoints=(self.freq_axis,), get_data=self._get_data, parameter_class=Trace, docstring="Gets trace data.", )

Gets trace data.

update_trace() None[source]

Updates all frequency parameters together when one is changed

setup_swept_sa_sweep(start: float, stop: float, npts: int) None[source]

Sets up the Swept SA measurement sweep for Spectrum Analyzer Mode.

autotune() None[source]

Autotune quickly get to the most likely signal of interest, and position it optimally on the display.

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.Keysight.KeysightP9374A(name: str, address: str, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNAxBase

class qcodes.instrument_drivers.Keysight.KeysightPNABase(name: str, address: str, min_freq: float, max_freq: float, min_power: float, max_power: float, nports: int, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: VisaInstrument

Base class for qcodes drivers for Agilent/Keysight series PNAs

Not to be instantiated directly. Use model specific subclass. http://na.support.keysight.com/pna/help/latest/Programming/GP-IB_Command_Finder/SCPI_Command_Tree.htm

Note: Currently this driver only expects a single channel on the PNA. We

can handle multiple traces, but using traces across multiple channels may have unexpected results.

Attributes:

default_terminator

The default terminator to use if the terminator is not specified when creating the instrument.

output

Parameter output

power

Parameter power

if_bandwidth

Parameter if_bandwidth

averages_enabled

Parameter averages_enabled

averages

Parameter averages

start

Parameter start

stop

Parameter stop

center

Parameter center

span

Parameter span

cw

Parameter cw

points

Parameter points

electrical_delay

Parameter electrical_delay

sweep_time

Parameter sweep_time

sweep_mode

Parameter sweep_mode

sweep_type

Parameter sweep_type

group_trigger_count

Parameter group_trigger_count

trigger_source

Parameter trigger_source

frequency_axis

Parameter frequency_axis

frequency_log_axis

Parameter frequency_log_axis

time_axis

Parameter time_axis

active_trace

Parameter active_trace

auto_sweep

Parameter auto_sweep

traces

Update channel list with active traces and return the new list

Methods:

get_options()

add_trace()

Add a new trace to the instrument and return it

enable_trace(trace_num)

Enable a trace given by trace_num and return it.

get_trace_catalog()

Get the trace catalog, that is a list of trace and sweep types from the PNA.

select_trace_by_name(trace_name)

Select a trace on the PNA by name.

reset_averages()

Reset averaging

averages_on()

Turn on trace averaging

averages_off()

Turn off trace averaging

default_terminator: str | None = '\n'

The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.

output: Parameter = self.add_parameter( "output", label="RF Output", get_cmd=":OUTPut?", set_cmd=":OUTPut {}", val_mapping=create_on_off_val_mapping(on_val="1", off_val="0"), )

Parameter output

power: Parameter = self.add_parameter( "power", label="Power", get_cmd="SOUR:POW?", get_parser=float, set_cmd="SOUR:POW {:.2f}", unit="dBm", vals=Numbers(min_value=min_power, max_value=max_power), )

Parameter power

if_bandwidth: Parameter = self.add_parameter( "if_bandwidth", label="IF Bandwidth", get_cmd="SENS:BAND?", get_parser=float, set_cmd="SENS:BAND {:.2f}", unit="Hz", vals=Numbers(min_value=1, max_value=15e6), )

Parameter if_bandwidth

averages_enabled: Parameter = self.add_parameter( "averages_enabled", label="Averages Enabled", get_cmd="SENS:AVER?", set_cmd="SENS:AVER {}", val_mapping={True: "1", False: "0"}, )

Parameter averages_enabled

averages: Parameter = self.add_parameter( "averages", label="Averages", get_cmd="SENS:AVER:COUN?", get_parser=int, set_cmd="SENS:AVER:COUN {:d}", unit="", vals=Numbers(min_value=1, max_value=65536), )

Parameter averages

start: Parameter = self.add_parameter( "start", label="Start Frequency", get_cmd="SENS:FREQ:STAR?", get_parser=float, set_cmd="SENS:FREQ:STAR {}", unit="Hz", vals=Numbers(min_value=min_freq, max_value=max_freq), )

Parameter start

stop: Parameter = self.add_parameter( "stop", label="Stop Frequency", get_cmd="SENS:FREQ:STOP?", get_parser=float, set_cmd="SENS:FREQ:STOP {}", unit="Hz", vals=Numbers(min_value=min_freq, max_value=max_freq), )

Parameter stop

center: Parameter = self.add_parameter( "center", label="Center Frequency", get_cmd="SENS:FREQ:CENT?", get_parser=float, set_cmd="SENS:FREQ:CENT {}", unit="Hz", vals=Numbers(min_value=min_freq, max_value=max_freq), )

Parameter center

span: Parameter = self.add_parameter( "span", label="Frequency Span", get_cmd="SENS:FREQ:SPAN?", get_parser=float, set_cmd="SENS:FREQ:SPAN {}", unit="Hz", vals=Numbers(min_value=min_freq, max_value=max_freq), )

Parameter span

cw: Parameter = self.add_parameter( "cw", label="CW Frequency", get_cmd="SENS:FREQ:CW?", get_parser=float, set_cmd="SENS:FREQ:CW {}", unit="Hz", vals=Numbers(min_value=min_freq, max_value=max_freq), )

Parameter cw

points: Parameter = self.add_parameter( "points", label="Points", get_cmd="SENS:SWE:POIN?", get_parser=int, set_cmd="SENS:SWE:POIN {}", unit="", vals=Numbers(min_value=1, max_value=100001), )

Parameter points

electrical_delay: Parameter = self.add_parameter( "electrical_delay", label="Electrical Delay", get_cmd="CALC:CORR:EDEL:TIME?", get_parser=float, set_cmd="CALC:CORR:EDEL:TIME {:.6e}", unit="s", vals=Numbers(min_value=0, max_value=100000), )

Parameter electrical_delay

visabackend: str = visabackend
visa_handle: pyvisa.resources.MessageBasedResource = visa_handle

The VISA resource used by this instrument.

visalib: str | None = visalib
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] = {}
sweep_time: Parameter = self.add_parameter( "sweep_time", label="Time", get_cmd="SENS:SWE:TIME?", get_parser=float, unit="s", vals=Numbers(0, 1e6), )

Parameter sweep_time

sweep_mode: Parameter = self.add_parameter( "sweep_mode", label="Mode", get_cmd="SENS:SWE:MODE?", set_cmd="SENS:SWE:MODE {}", vals=Enum("HOLD", "CONT", "GRO", "SING"), )

Parameter sweep_mode

sweep_type: Parameter = self.add_parameter( "sweep_type", label="Type", get_cmd="SENS:SWE:TYPE?", set_cmd="SENS:SWE:TYPE {}", vals=Enum("LIN", "LOG", "POW", "CW", "SEGM", "PHAS"), )

Parameter sweep_type

group_trigger_count: Parameter = self.add_parameter( "group_trigger_count", get_cmd="SENS:SWE:GRO:COUN?", get_parser=int, set_cmd="SENS:SWE:GRO:COUN {}", vals=Ints(1, 2000000), )

Parameter group_trigger_count

trigger_source: Parameter = self.add_parameter( "trigger_source", get_cmd="TRIG:SOUR?", set_cmd="TRIG:SOUR {}", vals=Enum("EXT", "IMM", "MAN"), )

Parameter trigger_source

frequency_axis: PNAAxisParameter = self.add_parameter( "frequency_axis", unit="Hz", label="Frequency", parameter_class=PNAAxisParameter, startparam=self.start, stopparam=self.stop, pointsparam=self.points, vals=Arrays(shape=(self.points,)), )

Parameter frequency_axis

frequency_log_axis: PNALogAxisParamter = self.add_parameter( "frequency_log_axis", unit="Hz", label="Frequency", parameter_class=PNALogAxisParamter, startparam=self.start, stopparam=self.stop, pointsparam=self.points, vals=Arrays(shape=(self.points,)), )

Parameter frequency_log_axis

time_axis: PNATimeAxisParameter = self.add_parameter( "time_axis", unit="s", label="Time", parameter_class=PNATimeAxisParameter, startparam=None, stopparam=self.sweep_time, pointsparam=self.points, vals=Arrays(shape=(self.points,)), )

Parameter time_axis

active_trace: Parameter = self.add_parameter( "active_trace", label="Active Trace", get_cmd="CALC:PAR:MNUM?", get_parser=int, set_cmd="CALC:PAR:MNUM {}", vals=Numbers(min_value=1, max_value=24), )

Parameter active_trace

auto_sweep: Parameter = self.add_parameter( "auto_sweep", label="Auto Sweep", set_cmd=None, get_cmd=None, vals=Bool(), initial_value=True, )

Parameter auto_sweep

property traces: ChannelList

Update channel list with active traces and return the new list

get_options() Sequence[str][source]
add_trace() KeysightPNATrace[source]

Add a new trace to the instrument and return it

enable_trace(trace_num: int) KeysightPNATrace[source]

Enable a trace given by trace_num and return it. Note, if the trace is already enabled, we simply return it.

get_trace_catalog() str[source]

Get the trace catalog, that is a list of trace and sweep types from the PNA.

The format of the returned trace is:

trace_name,trace_type,trace_name,trace_type…

select_trace_by_name(trace_name: str) int[source]

Select a trace on the PNA by name.

Returns:

The trace number of the selected trace

reset_averages() None[source]

Reset averaging

averages_on() None[source]

Turn on trace averaging

averages_off() None[source]

Turn off trace averaging

class qcodes.instrument_drivers.Keysight.KeysightPNAxBase(name: str, address: str, min_freq: float, max_freq: float, min_power: float, max_power: float, nports: int, **kwargs: Unpack[VisaInstrumentKWArgs])[source]

Bases: KeysightPNABase

class qcodes.instrument_drivers.Keysight.KeysightPNAPort(parent: KeysightPNABase, name: str, port: int, min_power: float, max_power: float, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Allow operations on individual PNA ports. Note: This can be expanded to include a large number of extra parameters…

Attributes:

source_power

Parameter source_power

source_power: Parameter = self.add_parameter( "source_power", label="power", unit="dBm", get_cmd=f"{pow_cmd}?", set_cmd=f"{pow_cmd} {{}}", get_parser=float, vals=Numbers(min_value=min_power, max_value=max_power), )

Parameter source_power

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.Keysight.KeysightPNATrace(parent: KeysightPNABase, name: str, trace_name: str, trace_num: int, **kwargs: Unpack[InstrumentBaseKWArgs])[source]

Bases: InstrumentChannel

Allow operations on individual PNA traces.

Attributes:

trace

Parameter trace

format

Parameter format

magnitude

Parameter magnitude

linear_magnitude

Parameter linear_magnitude

phase

Parameter phase

unwrapped_phase

Parameter unwrapped_phase

group_delay

Parameter group_delay

real

Parameter real

imaginary

Parameter imaginary

polar

Parameter polar

Methods:

disable()

Disable this trace on the PNA

run_sweep()

Run a set of sweeps on the network analyzer.

write(cmd)

Select correct trace before querying

ask(cmd)

Select correct trace before querying

trace: Parameter = self.add_parameter( "trace", label="Trace", get_cmd=self._Sparam, set_cmd=self._set_Sparam )

Parameter trace

format: Parameter = self.add_parameter( "format", label="Format", get_cmd="CALC:FORM?", set_cmd="CALC:FORM {}", vals=Enum("MLIN", "MLOG", "PHAS", "UPH", "IMAG", "REAL", "POLAR"), )

Parameter format

magnitude: FormattedSweep = self.add_parameter( "magnitude", sweep_format="MLOG", label="Magnitude", unit="dB", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter magnitude

linear_magnitude: FormattedSweep = self.add_parameter( "linear_magnitude", sweep_format="MLIN", label="Magnitude", unit="ratio", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter linear_magnitude

phase: FormattedSweep = self.add_parameter( "phase", sweep_format="PHAS", label="Phase", unit="deg", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter phase

unwrapped_phase: FormattedSweep = self.add_parameter( "unwrapped_phase", sweep_format="UPH", label="Phase", unit="deg", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter unwrapped_phase

group_delay: FormattedSweep = self.add_parameter( "group_delay", sweep_format="GDEL", label="Group Delay", unit="s", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter group_delay

real: FormattedSweep = self.add_parameter( "real", sweep_format="REAL", label="Real", unit="LinMag", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter real

imaginary: FormattedSweep = self.add_parameter( "imaginary", sweep_format="IMAG", label="Imaginary", unit="LinMag", parameter_class=FormattedSweep, vals=Arrays(shape=(self.parent.points,)), )

Parameter imaginary

polar: FormattedSweep = self.add_parameter( "polar", sweep_format="POLAR", label="Polar", unit="ratio", parameter_class=FormattedSweep, get_parser=self._parse_polar_data, vals=Arrays(shape=(self.parent.points,), valid_types=(complex,)), )

Parameter polar

disable() None[source]

Disable this trace on the PNA

run_sweep() str[source]

Run a set of sweeps on the network analyzer. Note that this will run all traces on the current channel.

write(cmd: str) None[source]

Select correct trace before querying

ask(cmd: str) str[source]

Select correct trace before querying

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] = {}