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 from 2.0.17 to 2.1.0

Changes

2.0.17

2.1.0

Program types

QuantumProgram, DynamicProgram, SequencedProgram

Program

Programming model

Node based.
Node based
Timing block based.
Node based

Waveforms

Define duration and amplitudes on envelopes.
gauss1 = qcs.GaussianEnvelope(80e-9, 0.8, 5)
rf1 = qcs.RFWaveform(gauss1, 100e6)
Define duration and amplitudes on waveforms directly.
amps = qcs.Array("amplitudes", value=[0.2, 0.3])
freq = 5e9
gauss = qcs.RFWaveform(100e-9,
         qcs.GaussianEnvelope(), amps, freq)

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

Dictionary to map from reference points to the classified output.
class keysight.qcs.channels.MinimumDistanceClassifier(
   references: dict[complex | Scalar[complex], int]
)
Array for the reference points.
class keysight.qcs.channels.MinimumDistanceClassifier(
   references: list[complex] | Array[complex]
)

FlatTop envelopes

Separate classes for creating FlatTopSine and FlatTopGaussian.

Uses to_flattop method on a waveform to convert the envelope in a waveform to a flattop envelope.
program.add_waveform(dc_wav.to_flattop(duration), awg)

Linkers

Links an instruction to a program.
linker = qcs.Linker(qcs.GateInstruction(qcs.GATES.h, qudits[0]), replacement_program)
Links an operation on a target to a program.
linker = qcs.Linker(qcs.GATES.h, qudits[0], replacement_program)

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 Programclass. 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()
keysight-logo-svg
Program
Program
Duration 800 ns
Layers 3
Targets 4
Repetitions
Layer #0
Layer #0
Duration 50 ns
Layer #1
Layer #1
Duration 250 ns
Layer #2
Layer #2
Duration 500 ns
awg 0
RFWaveform on ('awg', 0)

Parameters
Duration 50 ns
Amplitude 0.2
Frequency 5 GHz
Envelope GaussianEnvelope(2.0)
Instantaneous Phase 0 rad
Post-phase 0 rad
1
RFWaveform on ('awg', 1)

Parameters
Duration 50 ns
Amplitude 0.2
Frequency 5 GHz
Envelope GaussianEnvelope(2.0)
Instantaneous Phase 0 rad
Post-phase 0 rad
Delay on ('awg', 1)

Parameters
Duration 200 ns
RFWaveform on ('awg', 1)

Parameters
Duration 50 ns
Amplitude 0.2
Frequency 5 GHz
Envelope GaussianEnvelope(2.0)
Instantaneous Phase 0 rad
Post-phase 0 rad
dig 0
Acquisition on ('dig', 0)

Parameters
Duration 500 ns
1
Acquisition on ('dig', 1)

Parameters
Duration 500 ns
On this page