instrument_coordinator#

Module containing the main InstrumentCoordinator Component.

Module Contents#

Classes#

Functions#

_convert_acquisition_data_format(→ list[numpy.ndarray])

class InstrumentCoordinator(name: str, add_default_generic_icc: bool = True)[source]#

Bases: qcodes.instrument.base.Instrument

The InstrumentCoordinator serves as the central interface of the hardware abstraction layer.

It provides a standardized interface to execute Schedules on control hardware.

The InstrumentCoordinator has two main functionalities exposed to the user, the ability to configure its components representing physical instruments, and the ability to execute experiments.

Parameters:
  • name – The name for the instrument coordinator instance.

  • add_default_generic_icc – If True, automatically adds a GenericInstrumentCoordinatorComponent to this instrument coordinator with the default name.

components[source]#
timeout[source]#
_last_schedule = None[source]#
_compiled_schedule = None[source]#
property last_schedule: quantify_scheduler.schedules.schedule.CompiledSchedule[source]#

Returns the last schedule used to prepare the instrument coordinator.

This feature is intended to aid users in debugging.

property is_running: bool[source]#

Returns if any of the InstrumentCoordinator components is running.

Returns:

The InstrumentCoordinator’s running state.

get_component(full_name: str) quantify_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase[source]#

Returns the InstrumentCoordinator component by name.

Parameters:

full_name – The component name.

Returns:

The component.

Raises:

KeyError – If key name is not present in self.components.

add_component(component: quantify_scheduler.instrument_coordinator.components.base.InstrumentCoordinatorComponentBase) None[source]#

Adds a component to the components collection.

Parameters:

component – The component to add.

Raises:
  • ValueError – If a component with a duplicated name is added to the collection.

  • TypeError – If component is not an instance of the base component.

remove_component(name: str) None[source]#

Removes a component by name.

Parameters:

name – The component name.

prepare(compiled_schedule: quantify_scheduler.schedules.schedule.CompiledSchedule) None[source]#

Prepares each component for execution of a schedule.

It attempts to configure all instrument coordinator components for which compiled instructions, typically consisting of a combination of sequence programs, waveforms and other instrument settings, are available in the compiled schedule.

Parameters:

compiled_schedule – A schedule containing the information required to execute the program.

Raises:
  • KeyError – If the compiled schedule contains instructions for a component absent in the instrument coordinator.

  • TypeError – If the schedule provided is not a valid CompiledSchedule.

start() None[source]#

Start all of the components that appear in the compiled instructions.

The instruments will be started in the order in which they were added to the instrument coordinator.

stop(allow_failure: bool = False) None[source]#

Stops all components.

The components are stopped in the order in which they were added.

Parameters:

allow_failure – By default it is set to False. When set to True, the AttributeErrors raised by a component are demoted to warnings to allow other components to stop.

retrieve_acquisition() xarray.Dataset[source]#

Retrieves the latest acquisition results of the components with acquisition capabilities.

Returns:

The acquisition data in an xarray.Dataset. For each acquisition channel it contains an xarray.DataArray.

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

Awaits each component until it is done.

The timeout in seconds specifies the allowed amount of time to run before it times out.

Parameters:

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

retrieve_hardware_logs() dict[str, dict][source]#

Return the hardware logs of the instruments of each component.

The instruments must be referenced in the CompiledSchedule.

Returns:

A nested dict containing the components hardware logs

_convert_acquisition_data_format(raw_results: xarray.Dataset) list[numpy.ndarray][source]#
class ZIInstrumentCoordinator(*args, **kwargs)[source]#

Bases: InstrumentCoordinator

Support ZI backend.

This class is a hack and extension to the InstrumentCoordinator, which is introduced to support the quirks when using the ZI backend during the acquisition of results.

timeout_reacquire[source]#
max_num_reacquisitions[source]#
_last_acquisition = None[source]#
_num_reacquisitions = 0[source]#
_compare_reacquire(raw_results: xarray.Dataset) bool[source]#
retrieve_acquisition() xarray.Dataset[source]#

Retrieves the latest acquisition results of the components.

Returns:

The acquisition data in an xarray.Dataset. For each acquisition channel it contains an xarray.DataArray.