3.1.1.1.1. qupulse.hardware.awgs package¶
3.1.1.1.1.1. Submodules¶
3.1.1.1.1.2. qupulse.hardware.awgs.base module¶
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.
-
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
-
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
-
compare_key
¶ Comparison and hashing is based on the id of the AWG so different devices with the same properties are ot equal
Return type: int
-
num_channels
¶ Number of channels
-
num_markers
¶ Number of marker channels
-
programs
¶ The set of program names that can currently be executed on the hardware AWG.
Return type: Set
[str
]
-
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
-
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
- name (