3.4.1.1. qupulse.hardware.awgs.base

This module defines the common interface for arbitrary waveform generators.

Classes:
  • AWG: Common AWG interface.

  • DummyAWG: A software stub implementation of the AWG interface.

  • ProgramOverwriteException

  • OutOfWaveformMemoryException

class qupulse.hardware.awgs.base.AWG(identifier)[source]

Bases: qupulse.comparable.Comparable

An arbitrary waveform generator abstraction class.

It represents a set of channels that have to have(hardware enforced) the same:

-control flow -sample rate

It keeps track of the AWG state and manages waveforms and programs on the hardware.

property amplitude_offset_handling: str
Return type

str

abstract arm(name)[source]

Load the program ‘name’ and arm the device for running it. If name is None the awg will “dearm” its current program.

Return type

None

abstract clear()[source]

Removes all programs and waveforms from the AWG.

Caution: This affects all programs and waveforms on the AWG, not only those uploaded using qupulse!

Return type

None

property compare_key: int

Comparison and hashing is based on the id of the AWG so different devices with the same properties are ot equal

Return type

int

property identifier: str
Return type

str

abstract property num_channels

Number of channels

abstract property num_markers

Number of marker channels

abstract property programs: Set[str]

The set of program names that can currently be executed on the hardware AWG.

Return type

Set[str]

abstract remove(name)[source]

Remove a program from the AWG.

Also discards all waveforms referenced only by the program identified by name.

Parameters

name (str) – The name of the program to remove.

Return type

None

abstract property sample_rate: float

The sample rate of the AWG.

Return type

float

abstract set_volatile_parameters(program_name, parameters)[source]

Set the values of parameters which were marked as volatile on program creation.

abstract upload(name, program, channels, markers, voltage_transformation, force=False)[source]

Upload a program to the AWG.

Physically uploads all waveforms required by the program - excluding those already present - to the device and sets up playback sequences accordingly. This method should be cheap for program already on the device and can therefore be used for syncing. Programs that are uploaded should be fast(~1 sec) to arm.

Parameters
  • name (str) – A name for the program on the AWG.

  • program (Loop) – The program (a sequence of instructions) to upload.

  • channels (Tuple[Union[str, int, None], …]) – Tuple of length num_channels that ChannelIDs of in the program to use. Position in the list corresponds to the AWG channel

  • markers (Tuple[Union[str, int, None], …]) – List of channels in the program to use. Position in the List in the list corresponds to the AWG channel

  • voltage_transformation (Tuple[Optional[Callable], …]) – transformations applied to the waveforms extracted rom the program. Position

  • the list corresponds to the AWG channel (in) –

  • force (bool) – If a different sequence is already present with the same name, it is overwritten if force is set to True. (default = False)

Return type

None

class qupulse.hardware.awgs.base.AWGAmplitudeOffsetHandling[source]

Bases: object

CONSIDER_OFFSET = 'consider_offset'
IGNORE_OFFSET = 'ignore_offset'
exception qupulse.hardware.awgs.base.OutOfWaveformMemoryException[source]

Bases: Exception

qupulse.hardware.awgs.base.Program

alias of qupulse._program._loop.Loop

exception qupulse.hardware.awgs.base.ProgramOverwriteException(name)[source]

Bases: Exception