Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conjugate reduction in optimize annotated pass #11811

Merged
merged 17 commits into from
May 2, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rewriting as list comprehension
  • Loading branch information
alexanderivrii committed May 1, 2024
commit 7bd7b45b17fa4cbc3d59beae504f8b4a0079ebe0
4 changes: 2 additions & 2 deletions qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,11 +1776,11 @@ def predecessors(self, node):

def op_successors(self, node):
"""Get the list of "op" successors of a node in the dag."""
return list(pred for pred in self.successors(node) if isinstance(pred, DAGOpNode))
return [pred for pred in self.successors(node) if isinstance(pred, DAGOpNode)]

def op_predecessors(self, node):
"""Get the list of "op" predecessors of a node in the dag."""
return list(pred for pred in self.predecessors(node) if isinstance(pred, DAGOpNode))
return [pred for pred in self.predecessors(node) if isinstance(pred, DAGOpNode)]

def is_successor(self, node, node_succ):
"""Checks if a second node is in the successors of node."""
Expand Down
Loading