Skip to content

Commit 0e7f011

Browse files
committed
Fixed accidental call by reference for drive channels.
1 parent 3bf7324 commit 0e7f011

File tree

3 files changed

+254
-171
lines changed

3 files changed

+254
-171
lines changed

c3/generator/generator.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
are put through via a mixer device to produce an effective modulated signal.
1010
"""
1111

12+
import copy
1213
import hjson
1314
import numpy as np
1415
from c3.signal.gates import Instruction
@@ -98,6 +99,6 @@ def generate_signals(self, instr: Instruction):
9899
inputs.append(signal_stack.pop())
99100
outputs = dev.process(instr, chan, *inputs)
100101
signal_stack.append(outputs)
101-
102-
gen_signal[chan] = signal_stack.pop()
102+
# The stack is reused here, thus we need to deepcopy.
103+
gen_signal[chan] = copy.deepcopy(signal_stack.pop())
103104
return gen_signal

0 commit comments

Comments
 (0)