qcodespp.instrument_drivers.instrument_mocks
Attributes
Classes
Functions
Module Contents
- qcodespp.instrument_drivers.instrument_mocks.log
- class qcodespp.instrument_drivers.instrument_mocks.MockParabola(name, **kw)
Bases:
qcodes.InstrumentHolds dummy parameters which are get and set able as well as provides some basic functions that depends on these parameters for testing purposes.
This instrument is intended to be simpler than the mock model in that it does not emulate communications.
It has 3 main parameters (x, y, z) in order to allow for testing of 3D sweeps. The function (parabola with optional noise) is chosen to allow testing of numerical optimizations.
- class qcodespp.instrument_drivers.instrument_mocks.MockMetaParabola(name, mock_parabola_inst, **kw)
Bases:
qcodes.InstrumentTest for a meta instrument, has a tunable gain knob
- mock_parabola_inst
- class qcodespp.instrument_drivers.instrument_mocks.DummyInstrument(name='dummy', gates=['dac1', 'dac2'], **kwargs)
Bases:
qcodes.InstrumentBase class for all QCodes instruments.
- Args:
- name: an identifier for this instrument, particularly for
attaching it to a Station.
- metadata: additional static metadata to add to this
instrument’s JSON snapshot.
- label: nicely formatted name of the instrument; if None, the
nameis used.
- class qcodespp.instrument_drivers.instrument_mocks.DummyMeasurementInstrument(name: str, **kwargs)
Bases:
qcodes.InstrumentBase class for all QCodes instruments.
- Args:
- name: an identifier for this instrument, particularly for
attaching it to a Station.
- metadata: additional static metadata to add to this
instrument’s JSON snapshot.
- label: nicely formatted name of the instrument; if None, the
nameis used.
- get_linear()
- get_para()
- ask(cmd)
Write a command string to the hardware and return a response.
Subclasses that transform
cmdshould override this method, and in it callsuper().ask(new_cmd). Subclasses that define a new hardware communication should instead overrideask_raw.- Args:
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.
- class qcodespp.instrument_drivers.instrument_mocks.DummyChannel(parent, name, channel)
Bases:
qcodes.instrument.InstrumentChannelA single dummy channel implementation
- class qcodespp.instrument_drivers.instrument_mocks.DummyChannelInstrument(name, **kwargs)
Bases:
qcodes.InstrumentDummy instrument with channels
- class qcodespp.instrument_drivers.instrument_mocks.MultiGetter(**kwargs)
Bases:
qcodes.parameters.MultiParameterTest parameters with complicated return values instantiate with kwargs:
MultiGetter(name1=return_val1, name2=return_val2)
to set the names and (constant) return values of the pieces returned. Each return_val can be any array-like object eg:
MultiGetter(one=1, onetwo=(1, 2))
- get_raw()
get_rawis called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParametera suitable method is automatically generated ifget_cmdis supplied to the parameter constructor. The method is automatically wrapped to provide agetmethod on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.MultiSetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.parameters.MultiParameterMultiparameter which only purpose it to test that units, setpoints and so on are copied correctly to the individual arrays in the datarray.
- get_raw()
get_rawis called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParametera suitable method is automatically generated ifget_cmdis supplied to the parameter constructor. The method is automatically wrapped to provide agetmethod on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.Multi2DSetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.parameters.MultiParameterMultiparameter which only purpose it to test that units, setpoints and so on are copied correctly to the individual arrays in the datarray.
- get_raw()
get_rawis called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParametera suitable method is automatically generated ifget_cmdis supplied to the parameter constructor. The method is automatically wrapped to provide agetmethod on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.MultiScalarParam(instrument=None, name='multiscalarparameter')
Bases:
qcodes.parameters.MultiParameterMultiparameter whos elements are scalars i.e. similar to Parameter with no setpoints etc.
- get_raw()
get_rawis called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParametera suitable method is automatically generated ifget_cmdis supplied to the parameter constructor. The method is automatically wrapped to provide agetmethod on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.ArraySetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.parameters.ArrayParameterArrayparameter which only purpose it to test that units, setpoints and so on are copied correctly to the individual arrays in the datarray.
- get_raw()
get_rawis called to perform the actual data acquisition from the instrument. This method should either be overwritten to perform the desired operation or alternatively forParametera suitable method is automatically generated ifget_cmdis supplied to the parameter constructor. The method is automatically wrapped to provide agetmethod on the parameter instance.