diff --git a/pyzx/circuit/qasmparser.py b/pyzx/circuit/qasmparser.py index e54ae4eb..15b1b8c8 100644 --- a/pyzx/circuit/qasmparser.py +++ b/pyzx/circuit/qasmparser.py @@ -229,6 +229,7 @@ def parse_phase_arg(self, val): else: val = val.strip() if not val: phase = 1 + elif val == '-': phase = -1 else: phase = float(val) except: raise TypeError("Invalid specification {}".format(val)) phase = Fraction(phase).limit_denominator(100000000)