Skip to content

Commit

Permalink
Fix Delay instruction's new validate is_real check
Browse files Browse the repository at this point in the history
The definition of the Delay's validate_parameter method was changed in
PR #6225, this just updates it to use the new
ParameterExpression.is_real() so it works in a world with symengine.
  • Loading branch information
mtreinish committed May 5, 2021
1 parent d193f29 commit 98f1130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit/circuit/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def validate_parameter(self, parameter):
elif isinstance(parameter, ParameterExpression):
if len(parameter.parameters) > 0:
return parameter # expression has free parameters, we cannot validate it
if not parameter._symbol_expr.is_real:
if not parameter.is_real():
raise CircuitError(f"Bound parameter expression is complex in delay {self.name}")
fval = float(parameter)
if self.unit == "dt":
Expand Down

0 comments on commit 98f1130

Please sign in to comment.