Skip to content

Commit

Permalink
Check for isTimeAmp attribute
Browse files Browse the repository at this point in the history
Check if attribute exists before reading its value
  • Loading branch information
dieris committed Oct 11, 2016
1 parent a25567e commit 2e731e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QGL/Compiler.py
Expand Up @@ -609,7 +609,7 @@ def compile_sequence(seq, channels=None, edgesToCompile=None, qubitToCompile=Non
logger.debug("Modifying pulse on %s: %s", chan, wires[chan][-1])
# search for last non-TA entry
for ct in range(1,len(wires[chan])):
if not wires[chan][-ct].isTimeAmp:
if hasattr(wires[chan][-ct], 'isTimeAmp') and not wires[chan][-ct].isTimeAmp:
updated_frameChange = wires[chan][-ct].frameChange + block.pulses[chan].frameChange
wires[chan][-ct] = wires[chan][-ct]._replace(frameChange=updated_frameChange)
break
Expand Down

0 comments on commit 2e731e5

Please sign in to comment.