diff --git a/QGL/drivers/APS2Pattern.py b/QGL/drivers/APS2Pattern.py index 7a54251b..224d1158 100644 --- a/QGL/drivers/APS2Pattern.py +++ b/QGL/drivers/APS2Pattern.py @@ -1390,8 +1390,9 @@ def tdm_instructions(seqs): elif isinstance(s, PulseSequencer.Pulse): if s.label == 'MEAS' and s.maddr != (-1, 0): + # tdm_chan specifies the input channel to the TDM carrying the qubit state. Defaults to 1 tdm_chan = m.channel.processor_chan.channel if getattr(m.channel, 'processor_chan') else 1 - instructions.append(CrossBar(2**m.maddr[1], 2**(tdm_chan-1))) + instructions.append(CrossBar(2**m.maddr[1], 2**(tdm_chan-1)), label=label) instructions.append(LoadCmp(label=label)) instructions.append(StoreMeas(s.maddr[0], 1 << 16, label=label)) @@ -1405,6 +1406,7 @@ def tdm_instructions(seqs): if len(set(maddr))>1: raise Exception('Storing simultaneous measurements on different addresses not supported.') for n,m in enumerate(sim_meas): + # each tdm_chan specifies the input channel to the TDM carrying the corresponding qubit state. Default values are the first n channels tdm_chan = m.channel.processor_chan.channel if getattr(m.channel, 'processor_chan') else n+1 instructions.append(CrossBar(2**m.maddr[1], 2**(tdm_chan-1))) instructions.append(LoadCmp(label=label))