3.3.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

Classes

AWG(identifier)

An arbitrary waveform generator abstraction class.

AWGAmplitudeOffsetHandling()

ProgramEntry(loop, channels, markers, ...[, ...])

This is a helper class for implementing awgs drivers.

Exceptions

ChannelNotFoundException(channel)

OutOfWaveformMemoryException

ProgramOverwriteException(name)

class qupulse.hardware.awgs.base.AWG(identifier: str)[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
abstract arm(name: Optional[str]) None[source]

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

abstract clear() None[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!

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

property identifier: 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.

abstract remove(name: str) None[source]

Remove a program from the AWG.

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

Parameters

name – The name of the program to remove.

abstract property sample_rate: float

The sample rate of the AWG.

abstract set_volatile_parameters(program_name: str, parameters: Mapping[str, numbers.Real])[source]

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

abstract upload(name: str, program: qupulse.program.loop.Loop, channels: Tuple[Optional[Union[str, int]], ...], markers: Tuple[Optional[Union[str, int]], ...], voltage_transformation: Tuple[Optional[Callable], ...], force: bool = False) None[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 – A name for the program on the AWG.

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

  • channels – Tuple of length num_channels that ChannelIDs of in the program to use. Position in the list corresponds to the AWG channel

  • markers – List of channels in the program to use. Position in the List in the list corresponds to the AWG channel

  • voltage_transformation – transformations applied to the waveforms extracted rom the program. Position

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

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

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