silq.instrument_interfaces.AlazarTech package

Submodules

silq.instrument_interfaces.AlazarTech.ATS_interface module

class silq.instrument_interfaces.AlazarTech.ATS_interface.ATSInterface(instrument_name, acquisition_controller_names=[], default_settings={}, **kwargs)[source]

Bases: silq.instrument_interfaces.interface.InstrumentInterface

Interface for the AlazarTech ATS.

When a PulseSequence is targeted in the Layout, the pulses are directed to the appropriate interface. Each interface is responsible for translating all pulses directed to it into instrument commands. During the actual measurement, the instrument’s operations will correspond to that required by the pulse sequence.

Parameters
  • instrument_name (str) – Name of ATS instrument.

  • acquisition_controller_names (List[str]) – Instrument names of all ATS acquisition controllers. Interface will find the associated acquisition controllers.

  • default_settings – Default settings to use for the ATS.

  • **kwargs – Additional kwargs passed to Instrument.

Notes

  • Only been tested on ATS9440, might give issues with other models, in particular those having 2 channels instead of 4

  • For a given instrument, its associated interface can be found using get_instrument_interface

Todo

  • Choose continuous acquisition controller if pulse sequence only consists of a measurement pulse, as this doesn’t require a trigger from another instrument

acquisition()[source]

Perform an acquisition.

Should only be called after the interface has been setup and all other instruments have been started (via Layout.start).

Return type

Dict[str, Dict[str, ndarray]]

Returns

Acquisition traces that have been segmented for each pulse. Returned dictionary format is: {pulse.full_name: {channel_id: pulse_channel_trace}}.

add_acquisition_controller(acquisition_controller_name, cls_name=None)[source]

Add an acquisition controller to the available controllers.

If another acquisition controller exists of the same class, it will be overwritten.

Parameters
  • acquisition_controller_name (str) – instrument name of controller. Must be on same server as interface and ATS

  • cls_name (Optional[str]) – Optional name of class, which is used as controller key. If no cls_name is provided, it is found from the instrument class name

get_additional_pulses(connections)[source]

Additional pulses required for instrument, e.g. trigger pulses.

Parameters

connections – List of all connections in the layout

Return type

list

Returns

  • Empty list if there are no acquisition pulses.

  • A single trigger pulse at start of acquisition if using triggered acquisition controller.

  • AcquisitionPulse and TriggerWaitPulse if using the steered initialization controller

Raises

NotImplementedError – Using continous acquisition controller

initialize()[source]

Initializes ATS interface by setting acquisition controller.

Called at the start of targeting a pulse sequence.

segment_traces(traces)[source]

Segment traces by acquisition pulses.

For each pulse with acquire set to True (which should be all pulses passed along to the ATSInterface), the relevant portion of each channel trace is segmented and returned in a new dict

Parameters

traces (Dict[str, ndarray]) – {channel_id: channel_traces} dict

Returns

Dict format is {pulse.full_name: {channel_id: pulse_channel_trace}}.

Return type

Dict[str, Dict[str, np.ndarray]

set_acquisition_settings(**settings)[source]

Sets the acquisition settings for the ATS through its controller.

All existing acquisition settings are cleared. The controller’s acquisition settings are not actually updated here, but will be done when calling ATSInterface.setup.

Parameters

**settings – ATS acquisition settings to be set

Raises

AssertionError – Setting is not an ATS acquisition setting

set_configuration_settings(**settings)[source]

Sets the configuration settings for the ATS through its controller.

All existing configuration settings are cleared. The controller’s configuration settings are not actually updated here, but will be done when calling ATSInterface.setup.

Parameters

**settings – ATS configuration settings to be set

Raises

AssertionError – Setting is not an ATS configuration setting

setting(setting)[source]

Obtain a setting for the ATS.

It then checks if it is a configuration or acquisition setting. If the setting is specified in self.configuration/acquisition_setting, it returns that value, else it returns the value set in the ATS

Parameters

setting – configuration or acquisition setting to look for.

Returns

Value of the setting

Raises

AssertionError – Setting is not an ATS configuration or acquisition setting.

setup(samples=None, connections=None, **kwargs)[source]

Sets up ATS and its controller after targeting a pulse sequence.

Parameters
  • samples (Optional[int]) – Number of acquisition samples. If None, it will use the previously set value.

  • **kwargs – Unused setup kwargs passed from Layout

Return type

Optional[dict]

Returns

If using SteeredInitialization_AcquisitionController, a skip_start flag is passed with the target instrument, which signals to the layout that that instrument should not be started. Instead, it is triggered from the steered initialization controller.

setup_ATS()[source]

Configure ATS using ATS.config

setup_acquisition_controller()[source]

Setup acquisition controller

Notes

  • Triggered_AcquisitionController The following settings are fixed at the moment, but there could be siturations where these are not optimal, e.g. fast measurements.

    • Allocated buffers is maximally 2.

    • Records per buffer is fixed to 1.

  • Continuous_AcquisitionController:

    • Allocated buffers is fixed to 20

  • SteeredInitialization_AcquisitionController:

    • Allocated buffers is fixed to 80

Raises

RuntimeError if acquisition controller is notContinuous_AcquisitionController, SteeredInitialization_AcquisitionController.

setup_trigger()[source]

Configure settings related to triggering of the ATS

Only configures anything if TriggeredAcquisitionController is used.

Raises

AssertionError – TriggeredAcquisitionController is used, and no voltage transition can be determined.

start()[source]

Ignored method called from Layout.start

stop()[source]

Ignored method called from Layout.stop

update_settings(**settings)[source]

Update configuration and acquisition settings

The acquisition controller’s settings are not actually updated here, this will be done when calling ATSInterface.setup.

Parameters

**settings – ATS configuration and acquisition settings to be set.

Raises

AssertionError – Some settings are not configuration nor acquisition settings.

class silq.instrument_interfaces.AlazarTech.ATS_interface.SteeredInitializationImplementation(pulse_requirements=[])[source]

Bases: silq.pulses.pulse_modules.PulseImplementation

implement(interface)[source]

Implements pulse

pulse_class

alias of silq.pulses.pulse_types.SteeredInitialization

target_pulse(pulse, interface, connections, **kwargs)[source]

Target steered initialization pulse to an interface.

The implementation will further have a readout_connection and trigger_connection.

Parameters
  • pulse (Pulse) – Steered initialization pulse to be targeted.

  • interface – Interface to target pulse to.

  • connections (list) – List of output connections

  • **kwargs

Return type

Pulse

Returns

targeted pulse

Raises
class silq.instrument_interfaces.AlazarTech.ATS_interface.TriggerWaitPulseImplementation(pulse_requirements=[])[source]

Bases: silq.pulses.pulse_modules.PulseImplementation

implement(**kwargs)[source]

Implements a targeted pulse for an InstrumentInterface.

This method is called during InstrumentInterface.setup.

Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.

Parameters
  • *args – Interface-specific args to use

  • **kwargs – Interface-specific kwargs to use

Returns

Instrument-specific return values.

See also

Other interface source codes may serve as a guide for this method.

pulse_class

alias of silq.pulses.pulse_types.TriggerWaitPulse

target_pulse(pulse, interface, **kwargs)[source]

Tailors a PulseImplementation to a specific pulse.

Targeting happens in three stages:

  1. Both the pulse and pulse implementation are copied.

  2. PulseImplementation of the copied pulse is set to the copied pulse implementation, and PulseImplementation.pulse is set to the copied pulse. This way, they can both reference each other.

  3. The targeted pulse is returned

Parameters
  • pulse (Pulse) – Pulse to be targeted.

  • interface (InstrumentInterface) – PulseImplementation belongs.

  • connections (List[Connection]) – All connections in Layout.

  • **kwargs – Additional unused kwargs

Raises

TypeError – Pulse class does not match PulseImplementation.pulse_class

Module contents