boss.interfaces

This module contains adapters/wrappers for classes from libraries that need special treatment for usage with HEROS

Submodules

Classes

QCodesDeviceWrapper

HEROS representation of a generic QCoDeS Instrument.

Package Contents

class boss.interfaces.QCodesDeviceWrapper(**_kwargs)[source]

HEROS representation of a generic QCoDeS Instrument.

This class wraps QCoDeS instruments to make them accessible through HEROS. It provides methods to resolve parameters (including those in submodules) and build dynamic subclasses that expose QCoDeS functionality.

_qcodes_instance

The wrapped QCoDeS instrument instance

_qcodes_instance: type
name: str
static _resolve_parameter(qcodes_instance: Any, parameter_path: str) tuple[source]

Resolve a parameter path to a QCoDeS parameter instance.

This method takes a parameter path (e.g., “submodule.param_name”) and navigates through the QCoDeS instrument’s submodules to find the specified parameter.

Parameters:
  • qcodes_instance – The QCoDeS instrument instance

  • parameter_path – Dot-separated path to the parameter (e.g., “submodule.param_name”)

Returns:

A tuple of (target_instance, parameter) where target_instance is the QCoDeS instance (device or submodule) containing the parameter, and parameter is the parameter itself

Raises:

AttributeError – If the submodule path is invalid or the parameter doesn’t exist

classmethod _build(source_class: type, name: str, arg_dict: dict) type[source]

Build a dynamic subclass that wraps a QCoDeS instrument.

This method creates a new class that inherits from QCodesDeviceWrapper and wraps the specified QCoDeS instrument class. It exposes selected parameters as attributes and copies methods from the QCoDeS instrument to be exposed to HEROS.

Parameters:
  • source_class – The QCoDeS instrument class to wrap

  • name – Name of the HERO used as an internal name for QCoDeS

  • arg_dict – Dictionary of arguments for the QCoDeS instrument constructor, including a ‘parameters’ key with a list of parameter paths to expose

get_parameter_spec(parameter_path: str) dict[source]

Get the parameter specification of a parameter.

This method retrieves the specification dictionary for a QCoDeS parameter, which contains metadata about the parameter such as its type, units, etc.

Parameters:

parameter_path – Dot-separated path to the parameter (e.g., “submodule.param_name”)

Returns:

Dictionary containing the parameter specification

Raises:

AttributeError – If the parameter path is invalid