Upgrading SDK software version from 2.0.17 to 2.1.0
Version 2.1.0 introduces a new timing model to facilitate programming and execution flow. This page contains a list of the major changes when upgrading from previous versions to 2.1.0. See the changelog for a full list of changes.
Changes |
2.0.17 |
2.1.0 |
---|---|---|
Program types |
QuantumProgram, DynamicProgram, SequencedProgram |
Program |
Programming model |
||
Waveforms |
|
|
Data storage |
Data is stored in files and the program retains a reference to the file paths. Program and data files are stored separately. |
Data is stored in a database and the program retains reference to those. Program and data can be written to a single HDF5 file. |
Backend execution |
Uses Labber as a backend with the ExecuteSequence pass. |
Uses HCL as a backend with the HCLBackend pass. |
Data Access |
Data is accessed through a program’s Results object. |
Data is accessed through the program directly. |
Support for Backward Compatibility of .qcs file |
N/A |
Loading .qcs files from versions 2.0.1 to 2.0.17 from version 2.2.0 onwards. Loaded programs are automatically upgraded. |
Operations on variable arrays |
Arbitrary functions can be applied via the DependentArray class including basic arithmetic. |
Only supports basic arithmetic operations with dedicated classes. |
Variable data type specification |
Data type inferred from values, defaults to complex. |
Data type needs to be specified for every variable. |
Classifiers |
|
|
FlatTop envelopes |
Separate classes for creating FlatTopSine and FlatTopGaussian. |
|
Linkers |
|
|
Program creation
In version 2.0.17 and lower, there are three different types of programs depending on the use case, whereas in 2.1.0 and above all use cases are covered through the single Program
class.
Below is an example to create a program.
2.0.17
import keysight.qcs as qcs
# define channels representing two AWGs and one digitizer
awgs = qcs.Channels(range(2), "awgs", absolute_phase=False)
dig = qcs.Channels(range(1), "digitizer")
# instantiate an empty sequenced program
program = qcs.SequencedProgram()
# instantiate a pulse with two different amplitudes
amps = qcs.Array("amplitudes", value=[0.2, 0.3])
gauss = qcs.GaussianEnvelope(100e-9, amps, 5)
# instantiate an acquisition
acq = qcs.Acquisition(integration_filter=5e-7)
# add the pulses to the program
program.add_waveforms(gauss, awgs)
# add the acquisition to the program
program.add_acquisition(acq, dig)
2.1.0 and higher
import keysight.qcs as qcs
# define abstract channels for the two AWGs and two digitizers
awg = qcs.Channels(range(2), "awg", absolute_phase=False)
dig = qcs.Channels(range(2), "dig")
# instantiate a program and add a waveform to play on the AWG channels
program = qcs.Program()
# create a Gaussian pulse with 50 ns duration, an amplitude of 20% of the channel's
# maximum and a frequency of 5 GHz:
gauss = qcs.RFWaveform(50e-9, qcs.GaussianEnvelope(), 0.2, 5e9)
# add this waveform to both channels
program.add_waveform(gauss, awg)
# add a wait period to the second channel followed by another pulse
program.add_waveform(qcs.Delay(200e-9), awg[1], new_layer=True)
program.add_waveform(gauss, awg[1])
# add a 500 ns acquisition on the digitizer channel after the AWG pulses
program.add_acquisition(500e-9, dig, new_layer=True)
program.draw()
Program
Program
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Layer #0
Layer #0
|
Layer #1
Layer #1
|
Layer #2
Layer #2
|
||||||||||||||||||||||||||||
|
|
RFWaveform on ('awg', 0)
Parameters
|
||||||||||||||||||||||||||||
|
RFWaveform on ('awg', 1)
Parameters
|
Delay on ('awg', 1)
Parameters
|
RFWaveform on ('awg', 1)
Parameters
|
|||||||||||||||||||||||||||
|
|
Acquisition on ('dig', 0)
Parameters
|
||||||||||||||||||||||||||||
|
Acquisition on ('dig', 1)
Parameters
|