pnpq package#

Subpackages#

Submodules#

pnpq.errors module#

exception pnpq.errors.DeviceDisconnectedError#

Bases: Exception

Exception raised for the device is disconnected

exception pnpq.errors.DevicePortNotFoundError#

Bases: Exception

Rasied when a port not found

exception pnpq.errors.InvalidStateException#

Bases: Exception

Thrown when a method is called on an object, but the object is not in an appropriate state for that function to be called.

For example, if an object processes streams of data, and those streams have already been closed, it should not be possible to re-open them.

exception pnpq.errors.OdlGetPosNotCompleted#

Bases: Exception

Raised when no response has been received for GetPos command

exception pnpq.errors.OdlHomeNotCompleted#

Bases: Exception

Raised when Homed response has not been received from ODL device

exception pnpq.errors.OdlMoveNotCompleted#

Bases: Exception

Raised when Move complete response has not been received from ODL device

exception pnpq.errors.OdlMoveOutofRangeError#

Bases: Exception

Raised when the requesed move is our of range of the odl device

exception pnpq.errors.WavePlateCustomRotateError#

Bases: Exception

Raised when custom rotation failed

exception pnpq.errors.WavePlateGetPosNotCompleted#

Bases: Exception

Raised when GetPos response has not been received from Waveplate Rotator Device

exception pnpq.errors.WavePlateHomedNotCompleted#

Bases: Exception

Raised when a Homed response has not been received from WavePlate Rotator device

exception pnpq.errors.WavePlateMoveNotCompleted#

Bases: Exception

Raised when Moved Complete response has not been receieved from WavePlate Rotator device

exception pnpq.errors.WaveplateEnableChannelError#

Bases: Exception

Raised when no response has been received from Enable Channel Command

exception pnpq.errors.WaveplateInvalidDegreeError#

Bases: Exception

Raised when an invalid degree specified. degree must be in a range 0-360

exception pnpq.errors.WaveplateInvalidMotorChannelError#

Bases: Exception

Raised when trying to access an invalid motor channel number. check max_channel

exception pnpq.errors.WaveplateInvalidStepsError#

Bases: Exception

Raised when a specified step value is more than the device’s maximum steps

pnpq.events module#

class pnpq.events.Event(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: StrEnum

DEVICE_CONNECTED = 'device_connected'#
DEVICE_IDENTIFY = 'device_identify'#
DEVICE_NOT_CONNECTED = 'device_not_connected'#
RX_MESSAGE_KNOWN = 'rx_message_known'#
RX_MESSAGE_UNKNOWN = 'rx_message_unknown'#
SWITCH_BAR_STATE = 'switch_bar_state'#
SWITCH_CROSS_STATE = 'switch_cross_state'#
TX_MESSAGE_ORDERED = 'tx_message_ordered'#
TX_MESSAGE_UNORDERED = 'tx_message_unordered'#
UNCAUGHT_EXCEPTION = 'uncaught_exception'#
WAVEPLATE_HOME = 'waveplate_home'#
WAVEPLATE_ROTATE = 'waveplate_rotate'#

pnpq.units module#

pnpq.units.get_unit_transformation(input_to_output, input_unit, output_unit, output_range=None, output_rounded=False)#
Parameters:
  • input_to_output (Callable[[float], float])

  • input_unit (Unit)

  • output_unit (Unit)

  • output_range (None | tuple[float, float])

  • output_rounded (bool)

Return type:

Transformation

Module contents#

Python library to control hardware used in quantum optical testbeds.