qcodes_contrib_drivers.drivers.SwabianInstruments package¶
Subpackages¶
- qcodes_contrib_drivers.drivers.SwabianInstruments.private package
- Submodules
- qcodes_contrib_drivers.drivers.SwabianInstruments.private.time_tagger module
- Module contents
Submodules¶
qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger module¶
QCoDeS driver for the Swabian Instruments Time Tagger series.
Since the Swabian Instruments Python driver is already excellent, this driver is mostly concerned with wrapping its object-oriented API into QCoDeS Instruments and Parameters. It is organized as follows:
The actual device driver is
TimeTagger
, which wraps the APITimeTagger
object.Measurements and Virtual Channels are implemented as
InstrumentChannel
s, which should dynamically be added and removed from theTimeTagger
instrument’s correspondingChannelList
as needed. These channels ownParameter
s which may be required to be initialized to instantiate the API object of the TimeTagger library that actually controls the measurement.If properly initialized, each QCoDeS instrument or channel has a cached
api()
property that gives access to the TimeTagger API object. The cache is automatically invalidated if a Paramaeter is changed that was used to instantiate the object (e.g., the binwidth).
TimeTaggerVirtualChannel
andTimeTaggerMeasurement
inherit from the abstractTimeTaggerModule
, and subclasses are automatically registered. This is used to generate convenience methods in theTimeTagger
instrument to add a new measurement or virtual channel to its corresponding channel list.Measurements inherit common functionality from
IteratorBase
(formatted in snake_case).The
TimeTagger
instrument has a submodulesynchronized_measurements
that wraps the APISynchronizedMeasurements
and allows for syncing multiple measurements using the same tagger.Parameters in this driver are named according to their API counterparts. See the API documentation for their explanations.
Implementing new Measurement or VirtualChannel classes
As corresponding channel lists are automatically added to the main
instrument driver, to implement new measurements or virtual channels
from the TimeTagger API one simply needs to inherit from
TimeTaggerMeasurement
or
TimeTaggerVirtualChannel
, respectively.
The subclasses should have a api()
method decorated with
cached_api_object()
, which takes care
of asserting all required parameters are initialized as well as
invalidating the object if parameters changed. For the former, required
parameters should be passed as argument to the decorator. For the
latter, required parameters should be instances of
ParameterWithSetSideEffect
, with the side
effect argument set_side_effect=self._invalidate_api. Note that, if
parameter classes other than
Parameter
are required, one
could dynamically modify them to include set side effects. For now and
for legibility, only this class is provided.
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.CoincidenceVirtualChannel(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerVirtualChannel
Virtual channel clicking on coincidence of physical clicks.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.CombinerVirtualChannel(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerVirtualChannel
Virtual channel combining physical ones.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.CorrelationMeasurement(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerMeasurement
Measurement of the time-delay between clicks on channels.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.CountRateMeasurement(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerMeasurement
Measurement of the click rate on channels.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.CounterMeasurement(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerMeasurement
Measurement of the clicks on channels.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.HistogramLogBinsMeasurement(parent: InstrumentBase, name: str, api_tagger: tt.TimeTaggerBase | None = None, **kwargs: Any)[source]¶
Bases:
TimeTaggerMeasurement
Log-spaced measurement of the time-delay between clicks on channels.
- api¶
- class qcodes_contrib_drivers.drivers.SwabianInstruments.Swabian_Instruments_Time_Tagger.TimeTagger(*args: Any, **kwargs: Any)[source]¶
Bases:
TimeTaggerInstrumentBase
,Instrument
QCoDeS driver for Time Tagger devices.
- __init__(name: str, serial: str = '', **kwargs)[source]¶
Initialize a TimeTagger instrument.
- Parameters:
name – The instrument name
serial – The device’s serial number. If left empty, the first available device is connected to.
- close() None [source]¶
Irreversibly stop this instrument and free its resources.
Subclasses should override this if they have other specific resources to close.
- 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.
- get_input_delay(channel: int) int [source]¶
Forwards API method
TimeTaggerBase.getInputDelay()
. See documentation there.
- get_test_signal(channel: int) bool [source]¶
Forwards API method
TimeTagger.getTestSignal()
. See documentation there.
- get_trigger_level(channel: int) float [source]¶
Forwards API method
TimeTagger.getTriggerLevel()
. See documentation there.
- remove_all_measurements()[source]¶
Remove all entries of TimeTaggerMeasurement instances from channel lists.
- remove_all_virtual_channels()[source]¶
Remove all entries of TimeTaggerVirtualChannel instances from channel lists.
- set_input_delay(channel: int, delay: int)[source]¶
Forwards API method
TimeTaggerBase.setInputDelay()
. See documentation there.
- set_test_signal(channels: list[int], state: bool)[source]¶
Forwards API method
TimeTagger.setTestSignal()
. See documentation there.
- set_trigger_level(channel: int, level: float)[source]¶
Forwards API method
TimeTagger.setTriggerLevel()
. See documentation there.
- property api: tt.TimeTaggerBase¶