# # Copyright 2025 Keysight Technologies Inc. # # This file generates the asset "channel_mapper.qcs". Run `python channel_mapper.py` # to generate the asset. # import keysight.qcs as qcs awgs = qcs.Channels(range(4), "xy_channels") readout_awgs = qcs.Channels(range(4), "readout_channels") dig = qcs.Channels(range(1), "acquire_channels") # define the address of physical channels awg_1x4x4 = qcs.Address(1, 4, 4) dig_1x3x4 = qcs.Address(1, 3, 4) dc_1x2x4 = qcs.Address(1, 2, 4) # initialize a mapper and specify the mapping mapper = qcs.ChannelMapper() mapper.add_channel_mapping(awgs, [awg_1x4x4] * 4, qcs.InstrumentEnum.M5300AWG) mapper.add_channel_mapping(readout_awgs, [awg_1x4x4] * 4, qcs.InstrumentEnum.M5300AWG) mapper.add_channel_mapping(dig, dig_1x3x4, qcs.InstrumentEnum.M5200Digitizer) # specify the downconverter for the digitizer at `dig_1x3x4` mapper.add_downconverters(dig_1x3x4, dc_1x2x4) mapper.set_delays(dig_1x3x4, 160e-9) # set the LO frequency of the AWG and downconverter channels to be the same value by # passing in a range of possible RF frequencies mapper.constrain_lo_frequencies([awg_1x4x4, dc_1x2x4], 5.5e9, 6.4e9) qcs.save(mapper, "channel_mapper.qcs")