boss.interfaces.qcodes¶
QCodes Library Interface for BOSS/HEROS.
Classes¶
HEROS representation of a QCoDeS parameter. |
|
HEROS representation of a generic QCoDeS Instrument. |
Module Contents¶
- class boss.interfaces.qcodes.QCodesParam(target_cls: Any, sub_mod_prefix: str)[source]¶
HEROS representation of a QCoDeS parameter.
This class acts as a descriptor that provides access to QCoDeS parameters through a HEROS interface. It handles getting and setting parameter values and manages parameter naming with QCoDes submodule prefixes.
- target_cls¶
The QCoDeS instrument class containing the parameter
- sub_mod_prefix¶
Prefix for submodule parameters
- name¶
Name of the parameter
- sub_mod_prefix¶
- target_cls¶
- __set_name__(owner: Any, name: str) None[source]¶
Set name of QCoDeS parameter to name of the attribute in the owner class.
This method is called when the descriptor is assigned to a class attribute.
- Parameters:
owner – The class that owns this descriptor
name – The name of the attribute in the owner class
- class boss.interfaces.qcodes.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