zhinst#

Module containing Zurich Instruments InstrumentCoordinator Components.

Module Contents#

Classes#

ZIInstrumentCoordinatorComponent

Zurich Instruments InstrumentCoordinator component base class.

HDAWGInstrumentCoordinatorComponent

Zurich Instruments HDAWG InstrumentCoordinator Component class.

UHFQAInstrumentCoordinatorComponent

Zurich Instruments UHFQA InstrumentCoordinator Component class.

Attributes#

logger

logger[source]#
exception AcquisitionProtocolNotSupportedError[source]#

Bases: NotImplementedError

Method or function hasn’t been implemented yet.

class ZIInstrumentCoordinatorComponent(instrument: zhinst.qcodes.base.ZIBaseInstrument, **kwargs: Any)[source]#

Bases: quantify_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase

Zurich Instruments InstrumentCoordinator component base class.

abstract property is_running: bool[source]#

Returns if the InstrumentCoordinator component is running.

The property is_running is evaluated each time it is accessed. Example:

while my_instrument_coordinator_component.is_running:
    print('running')
Returns:

The components’ running state.

prepare(zi_device_config: quantify_scheduler.backends.zhinst_backend.ZIDeviceConfig) bool[source]#

Prepare the InstrumentCoordinator component with configuration required to arm the instrument.

The preparation is skipped when the new zi_device_config is the same as that from the previous time prepare was called. This saves significant time overhead.

Parameters:

zi_device_config – The ZI instrument configuration. See the link for details of the configuration format.

Returns:

A boolean indicating if the ZI component was configured in this call.

retrieve_acquisition() xarray.Dataset | None[source]#

Gets and returns acquisition data.

class HDAWGInstrumentCoordinatorComponent(instrument: zhinst.qcodes.HDAWG, **kwargs: Any)[source]#

Bases: ZIInstrumentCoordinatorComponent

Zurich Instruments HDAWG InstrumentCoordinator Component class.

property instrument: zhinst.qcodes.HDAWG[source]#

Returns the instrument referenced by instrument_ref.

property is_running: bool[source]#

Returns if the InstrumentCoordinator component is running.

The property is_running is evaluated each time it is accessed. Example:

while my_instrument_coordinator_component.is_running:
    print('running')
Returns:

The components’ running state.

get_awg(index: int) zhinst.qcodes.hdawg.AWG[source]#

Returns the AWG by index.

Parameters:

index – The awg index.

Returns:

The HDAWG AWG instance.

start() None[source]#

Starts all HDAWG AWG(s) in reversed order by index.

stop() None[source]#

Stops all HDAWG AWG(s) in order by index.

retrieve_acquisition() None[source]#

Gets and returns acquisition data.

wait_done(timeout_sec: int = 10) None[source]#

Wait until the InstrumentCoordinator is done.

The coordinator is ready when it has stopped running or until it has exceeded the amount of time to run.

The maximum amount of time, in seconds, before it times out is set via the timeout_sec parameter.

Parameters:

timeout_sec – The maximum amount of time in seconds before a timeout.

get_hardware_log(compiled_schedule: quantify_scheduler.schedules.schedule.CompiledSchedule) dict | None[source]#

Retrieve the hardware logs of the instrument associated to this component.

class UHFQAInstrumentCoordinatorComponent(instrument: zhinst.qcodes.UHFQA, **kwargs: Any)[source]#

Bases: ZIInstrumentCoordinatorComponent

Zurich Instruments UHFQA InstrumentCoordinator Component class.

property instrument: zhinst.qcodes.UHFQA[source]#

Returns the instrument referenced by instrument_ref.

property is_running: bool[source]#

Returns if the InstrumentCoordinator component is running.

The property is_running is evaluated each time it is accessed. Example:

while my_instrument_coordinator_component.is_running:
    print('running')
Returns:

The components’ running state.

start() None[source]#

Starts the InstrumentCoordinator Component.

stop() None[source]#

Stops the InstrumentCoordinator Component.

prepare(zi_device_config: quantify_scheduler.backends.zhinst_backend.ZIDeviceConfig) bool[source]#

Prepares the component with configurations required to arm the instrument.

After this step is complete, the waveform file is uploaded to the LabOne WebServer.

Parameters:

zi_device_config – The ZI instrument configuration. See the link for details of the configuration format.

Returns:

A boolean indicating if the ZI component was configured in this call.

retrieve_acquisition() xarray.Dataset[source]#

Gets and returns acquisition data.

wait_done(timeout_sec: int = 10) None[source]#

Wait until the InstrumentCoordinator is done.

The coordinator is ready when it has stopped running or until it has exceeded the amount of time to run.

The maximum amount of time, in seconds, before it times out is set via the timeout_sec parameter.

Parameters:

timeout_sec – The maximum amount of time in seconds before a timeout.

get_hardware_log(compiled_schedule: quantify_scheduler.schedules.schedule.CompiledSchedule) dict | None[source]#

Retrieve the hardware logs of the instrument associated to this component.