Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,10 +996,7 @@ def substitute_node_with_dag(self, node, input_dag, wires=None):
in_dag.apply_operation_back(replay_node.op, replay_node.qargs, replay_node.cargs)

if in_dag.global_phase:
from sympy import evaluate

with evaluate(False):
self.global_phase += in_dag.global_phase
self.global_phase += in_dag.global_phase

if wires is None:
wires = in_dag.wires
Expand Down
5 changes: 1 addition & 4 deletions qiskit/transpiler/passes/basis/basis_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ def run(self, dag):
dag.substitute_node(node, dag_op, inplace=True)

if bound_target_dag.global_phase:
from sympy import evaluate

with evaluate(False):
dag.global_phase += bound_target_dag.global_phase
dag.global_phase += bound_target_dag.global_phase
else:
dag.substitute_node_with_dag(node, bound_target_dag)
else:
Expand Down