Skip to content

Commit

Permalink
made changes requested in PR 6899 #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nbronn committed Nov 2, 2021
1 parent bd6dda4 commit 6ea9d90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qiskit/circuit/parameterexpression.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def is_real(self):
return False
return True

def get_expr(self):
def get_sympy_expr(self):
"""Return symbolic expression from sympy"""
from sympy import sympify

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,10 @@ def _attempt_bind(self, template_sublist, circuit_sublist):
for t_idx, template_params in enumerate(template_params):
if isinstance(template_params, ParameterExpression):
if isinstance(circuit_params[t_idx], ParameterExpression):
circ_param_sym = circuit_params[t_idx].get_expr()
circ_param_sym = circuit_params[t_idx].get_sympy_expr()
else:
circ_param_sym = parse_expr(str(circuit_params[t_idx]))
equations.append(sym.Eq(template_params.get_expr(), circ_param_sym))
equations.append(sym.Eq(template_params.get_sympy_expr(), circ_param_sym))

for param in template_params.parameters:
temp_symbols[param] = sym.Symbol(str(param))
Expand Down

0 comments on commit 6ea9d90

Please sign in to comment.