Device drivers

The device model, driver catalogue and custom driver development.

Quatm separates experiment logic from instrument communication. Every instrument is addressed through a logical name in device_db.py; the driver decides whether that name maps to a serial port, a VISA resource, a TCP socket, a USB device or a vendor DLL.

Access modes

ModeBehaviourWhen to use
localConstructs a driver objectcameras, FPGA controllers, translation stages
attrMaps a channel to a Python attributeDAC/TTL outputs
generic_attrCalls a named driver functionDDS tones, multi-channel settings

All modes support simulation. In simulation the same experiment code runs against a dummy backend, which is essential for developing sequences without occupying the apparatus.

Driver categories

The bundled catalogue covers:

  • Real-time control — ADwin, FPGA, timing and trigger distribution.
  • Lasers and light — Toptica, Moglabs, Vescent, laser locks and shutters.
  • Signal generation and RF — Spectrum AWGs, Rigol, Valon, DDS boards.
  • Scientific cameras — Andor, FLIR/BlackFly, PCO and generic video sources.
  • Motion and positioning — PI stages, Thorlabs, piezo mirrors.
  • DAQ and power supplies — NI, MCC, Keysight, Keithley.
  • Environmental monitoring — temperature controllers, magnetometers, wavemeters, vacuum gauges.

The catalogue and per-driver verification status are tracked in the repository (docs/DRIVER_VERIFICATION.md). A driver is considered verified only after it has been exercised on real hardware.

Writing a driver

A driver is a normal Python class with:

  • __init__ accepting the arguments declared in device_db.py;
  • simulating handling for offline use;
  • explicit close() releasing sockets, serial ports and vendor handles;
  • optional check() / self-test hooks used by the Device Manager.

Place project-specific drivers under <project>/drivers/. They are imported before bundled drivers with the same suffix, so a laboratory can pin a local version without forking the framework.

Device health and leases

Opening a device acquires a cross-process lease, preventing two experiments from silently driving the same instrument. The Device Manager can probe instruments, verify drivers and report the current owner. Bus-level locking protects adapters that cannot be opened concurrently.


Scientific cameras

Scientific camera and image acquisition drivers for 15 brands including Andor, Basler, Hamamatsu and FLIR.

Signal sources and RF

Drivers for frequency synthesizers and RF instruments: Valon 5009, DDS AD9959, Agilent, Rigol.

Lasers and optics

Drivers for lasers and optical measurement: Cobolt, Toptica, Sirah Matisse, M² Solstis, HighFinesse wavemeters.

Motion and positioning

Drivers for precision motion and positioning: PI piezo nanopositioners, Attocube, Newport Picomotor, Thorlabs APT.

DAQ and power supplies

Data acquisition and electrical measurement drivers: NI DAQ, Rigol/EA power supplies, Keithley/Voltcraft multimeters, oscilloscopes.

Environmental monitoring

Drivers for temperature, vacuum and cryogenic monitoring: Lakeshore, Cryocon, Pfeiffer, Leybold.

Experiment control and others

Drivers for FPGA controllers and auxiliary devices such as ADwin, NI-FPGA and Red Pitaya, covering the full spectrum of experiment control requirements from nanosecond real-time timing to general-purpose switching logic.