Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ def _get_basis_gates(self) -> Optional[Tuple[str, ...]]:
return tuple(sorted(basis_gates)) if basis_gates else None

def is_bidirectional(coupling_map):
if coupling_map is None:
# None for a coupling map implies all-to-all coupling
return True
return len(coupling_map.reduce(self.physical_qubits).get_edges()) == 2

# 2 qubits case: Return all basis gates except for one-way directed 2q-gates.
Expand Down