Skip to content

zhinst.toolkit.session.ModuleHandler(session)

Modules of LabOne.

Handler for all additional so called modules by LabOne. A LabOne module is bound to a user session but creates a independent session to the Data Server. This has the advantage that they do not interfere with the user session. It also means that creating a session causes additional resources allocation, both at the client and the data server. New modules should therefore only be instantiated with care.

Toolkit holds a lazy generated instance of all modules. This ensures that not more than one modules of each type gets created by accident and that the access to the modules is optimized.

Of course there are many use cases where more than one module of a single type is required. This class therefore also exposes a create function for each LabOne module. These functions create a unmanaged instance of that module (unmanaged means toolkit does not hold an instance of that module).

Parameters:

Name Type Description Default
session Session

Active user session

required

awg: tk_modules.BaseModule cached property

Managed instance of the awg module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_awg_module to create an unmanaged instance)

Returns:

Type Description
BaseModule

Managed instance of the awg module

daq: tk_modules.DAQModule cached property

Managed instance of the daq module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_daq_module to create an unmanaged instance)

Returns:

Type Description
DAQModule

Managed instance of the daq module

device_settings: tk_modules.DeviceSettingsModule cached property

Managed instance of the device settings module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_device_settings_module to create an unmanaged instance)

Returns:

Type Description
DeviceSettingsModule

Managed instance of the device settings module

impedance: tk_modules.ImpedanceModule cached property

Managed instance of the impedance module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_awg_module to create an unmanaged instance)

Returns:

Type Description
ImpedanceModule

Managed instance of the impedance module

mds: tk_modules.BaseModule cached property

Managed instance of the multi device sync module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_mds_module to create an unmanaged instance)

Returns:

Type Description
BaseModule

Managed instance of the multi device sync module

pid_advisor: tk_modules.PIDAdvisorModule cached property

Managed instance of the pid advisor module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_pid_advisor_module to create an unmanaged instance)

Returns:

Type Description
PIDAdvisorModule

Managed instance of the pid advisor module

precompensation_advisor: tk_modules.PrecompensationAdvisorModule cached property

Managed instance of the precompensation advisor module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_precompensation_advisor_module to create an unmanaged instance)

Returns:

Type Description
PrecompensationAdvisorModule

Managed instance of the precompensation advisor module

qa: tk_modules.BaseModule cached property

Managed instance of the quantum analyzer module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_qa_module to create an unmanaged instance)

Returns:

Type Description
BaseModule

Managed instance of the quantum analyzer module

scope: tk_modules.ScopeModule cached property

Managed instance of the scope module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_scope_module to create an unmanaged instance)

Returns:

Type Description
ScopeModule

Managed instance of the scope module

shfqa_sweeper: tk_modules.SHFQASweeper cached property

Managed instance of the shfqa sweeper implementation.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_shfqa_sweeper to create an unmanaged instance)

Returns:

Type Description
SHFQASweeper

Managed instance of the shfqa sweeper implementation

sweeper: tk_modules.SweeperModule cached property

Managed instance of the sweeper module.

Managed means that only one instance is created and is held inside the connection Manager. This makes it easier to access the modules from within toolkit, since creating a module requires resources. (use create_sweeper_module to create an unmanaged instance)

Returns:

Type Description
SweeperModule

Managed instance of the sweeper module

create_awg_module()

Create an instance of the AwgModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property awg.

Returns:

Type Description
BaseModule

Created module

create_daq_module()

Create an instance of the DataAcquisitionModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property daq.

Returns:

Type Description
DAQModule

Created module

create_device_settings_module()

Create an instance of the DeviceSettingsModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property device_settings_module.

Returns:

Type Description
DeviceSettingsModule

Created module

create_impedance_module()

Create an instance of the ImpedanceModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property impedance_module.

Returns:

Type Description
ImpedanceModule

Created module

create_mds_module()

Create an instance of the MultiDeviceSyncModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property mds_module.

Returns:

Type Description
BaseModule

Created module

create_pid_advisor_module()

Create an instance of the PidAdvisorModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property pid_advisor_module.

Returns:

Type Description
PIDAdvisorModule

Created module

create_precompensation_advisor_module()

Create an instance of the PrecompensationAdvisorModule.

In contrast to core.ziDAQServer.precompensationAdvisor() a nodetree property is added.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property precompensation_advisor_module.

Returns:

Type Description
PrecompensationAdvisorModule

Created module

create_qa_module()

Create an instance of the QuantumAnalyzerModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property qa_module.

Returns:

Type Description
BaseModule

Created module

create_scope_module()

Create an instance of the ScopeModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property awg_module.

Returns:

Type Description
ScopeModule

Created module

create_shfqa_sweeper()

Create an instance of the SHFQASweeper.

For now the general sweeper module does not support the SHFQA. However a python based implementation called SHFSweeper does already provide this functionality. The SHFSweeper is part of the zhinst module and can be found in the utils.

Toolkit wraps around the SHFSweeper and exposes a interface that is similar to the LabOne modules, meaning the parameters are exposed in a node tree like structure.

In addition a new session is created. This has the benefit that the sweeper implementation does not interfere with the the commands and setups from the user.

Returns:

Type Description
SHFQASweeper

Created object

create_sweeper_module()

Create an instance of the SweeperModule.

The resulting Module will have the nodetree accessible. The underlying zhinst.core Module can be accessed through the raw_module property.

The new instance establishes a new session to the DataServer. New instances should therefor be created carefully since they consume resources.

The new module is not managed by toolkit. A managed instance is provided by the property sweeper_module.

Returns:

Type Description
SweeperModule

Created module