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.instrument.base.Instrument
Holds 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.instrument.base.Instrument
Test 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.instrument.base.Instrument
Base 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
name
is used.
- class qcodespp.instrument_drivers.instrument_mocks.DummyMeasurementInstrument(name: str, **kwargs)
Bases:
qcodes.instrument.base.Instrument
Base 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
name
is used.
- get_linear()
- get_para()
- ask(cmd)
Write a command string to the hardware and return a response.
Subclasses that transform
cmd
should 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.channel.InstrumentChannel
A single dummy channel implementation
- class qcodespp.instrument_drivers.instrument_mocks.DummyChannelInstrument(name, **kwargs)
Bases:
qcodes.instrument.base.Instrument
Dummy instrument with channels
- class qcodespp.instrument_drivers.instrument_mocks.MultiGetter(**kwargs)
Bases:
qcodes.instrument.parameter.MultiParameter
Test 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_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 forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.MultiSetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.instrument.parameter.MultiParameter
Multiparameter 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_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 forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.Multi2DSetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.instrument.parameter.MultiParameter
Multiparameter 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_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 forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.MultiScalarParam(instrument=None, name='multiscalarparameter')
Bases:
qcodes.instrument.parameter.MultiParameter
Multiparameter whos elements are scalars i.e. similar to Parameter with no setpoints etc.
- get_raw()
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 forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.
- class qcodespp.instrument_drivers.instrument_mocks.ArraySetPointParam(instrument=None, name='testparameter')
Bases:
qcodes.instrument.parameter.ArrayParameter
Arrayparameter 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_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 forParameter
a suitable method is automatically generated ifget_cmd
is supplied to the parameter constructor. The method is automatically wrapped to provide aget
method on the parameter instance.