Skip to content

Commit

Permalink
remove unnecessary parens
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed May 10, 2024
1 parent 9ebf0ea commit 182731c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions qiskit_research/utils/pulse_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,12 @@ def run(self, dag: DAGCircuit) -> DAGCircuit:
gp1 = next(dag.bfs_successors(rz_node))
if cx2_node in gp1[1]:
if (
(
dag.find_bit(cx1_node.qargs[0]).index
== dag.find_bit(cx2_node.qargs[0]).index
)
and (
dag.find_bit(cx1_node.qargs[1]).index
== dag.find_bit(cx2_node.qargs[1]).index
)
and (
dag.find_bit(cx2_node.qargs[1]).index
== dag.find_bit(rz_node.qargs[0]).index
)
dag.find_bit(cx1_node.qargs[0]).index
== dag.find_bit(cx2_node.qargs[0]).index
and dag.find_bit(cx1_node.qargs[1]).index
== dag.find_bit(cx2_node.qargs[1]).index
and dag.find_bit(cx2_node.qargs[1]).index
== dag.find_bit(rz_node.qargs[0]).index
):
dag = self.sub_zz_in_dag(
dag, cx1_node, rz_node, cx2_node
Expand Down

0 comments on commit 182731c

Please sign in to comment.