PQSC

class zhinst.qcodes.PQSC(name: str, serial: str, interface: str = '1gbe', host: str = 'localhost', port: int = 8004, api: int = 6, **kwargs)

Bases: zhinst.qcodes.control.drivers.base.base.ZIBaseInstrument

QCoDeS driver for the Zurich Instruments PQSC

arm(sync=True, repetitions: int = None, holdoff: float = None) → None

Prepare PQSC for triggering the instruments.

This method configures the execution engine of the PQSC and clears the register bank. Optionally, the number of triggers and hold-off time can be set when specified as keyword arguments. If they are not specified, they are not changed.

Note that the PQSC is disabled at the end of the hold-off time after sending out the last trigger. Therefore, the hold-off time should be long enough such that the PQSC is still enabled when the feedback arrives. Otherwise, the feedback cannot be processed.

Parameters
  • sync (bool) – A flag that specifies if a synchronisation should be performed between the device and the data server after stopping the PQSC and clearing the register bank (default: True).

  • repetitions (int) – If specified, the number of triggers sent over ZSync ports will be set (default: None).

  • holdoff (double) – If specified, the time between repeated triggers sent over ZSync ports will be set. It has a minimum value and a granularity of 100 ns (default: None).

arm_and_run(repetitions: int = None, holdoff: float = None) → None

Arm the PQSC and start sending out triggers.

Simply combines the methods arm and run. A synchronisation is performed between the device and the data server after arming and running the PQSC.

Parameters
  • repetitions (int) – If specified, the number of triggers sent over ZSync ports will be set (default: None).

  • holdoff (double) – If specified, the time between repeated triggers sent over ZSync ports will be set. It has a minimum value and a granularity of 100 ns (default: None).

check_ref_clock(blocking: bool = True, timeout: int = 30, sleep_time: int = 1) → None

Check if reference clock is locked successfully.

Keyword Arguments
  • blocking (bool) – A flag that specifies if the program should be blocked until the reference clock is ‘locked’. (default: True)

  • timeout (int) – Maximum time in seconds the program waits when blocking is set to True (default: 30).

  • sleep_time (int) – Time in seconds to wait between requesting the reference clock status (default: 1)

Raises

ToolkitError – If the device fails to lock on the reference clock.

check_zsync_connection(ports=0, blocking=True, timeout=30) → None

Check if the ZSync connection on the given port is successful.

This function checks the current status of the instrument connected to the given port.

Parameters
  • ports (list) or (int) – The port numbers to check the ZSync connection for. It can either be a single port number given as integer or a list of several port numbers. (default: 0)

  • blocking (bool) – A flag that specifies if the program should be blocked until the status is ‘connected’. (default: False)

  • timeout (int) – Maximum time in seconds the program waits when blocking is set to True. (default: 30)

Raises

ToolkitError – If ZSync connection to the instruments on the specified ports is not established.

factory_reset(sync=True) → None

Load the factory default settings.

Parameters

sync (bool) – A flag that specifies if a synchronisation should be performed between the device and the data server after loading the factory preset (default: True).

run(sync=True) → None

Start sending out triggers.

This method activates the trigger generation to trigger all connected instruments over ZSync ports.

Parameters

sync (bool) – A flag that specifies if a synchronisation should be performed between the device and the data server after enabling the PQSC (default: True).

stop(sync=True) → None

Stop the trigger generation.

Parameters

sync (bool) – A flag that specifies if a synchronisation should be performed between the device and the data server after disabling the PQSC (default: True).

wait_done(timeout: float = 10, sleep_time: float = 0.005) → None

Wait until trigger generation and feedback processing is done.

Parameters
  • timeout (float) – The maximum waiting time in seconds for the PQSC (default: 10).

  • sleep_time (float) – Time in seconds to wait between requesting PQSC state

Raises

TimeoutError – If the PQSC is not done sending out all triggers and processing feedback before the timeout.