Repository: Qiskit/qiskit

Issue:
Unnecessary check and exception in `GateDirection` pass
### Environment

- **Qiskit Terra version**: 0.25
- **Python version**: 3.9
- **Operating system**: MacOS


### What is happening?

The `GateDirection` transpiler pass has an unnecessary check that input circuits only contain 1 register:

https://github.com/Qiskit/qiskit/blob/main/qiskit/transpiler/passes/utils/gate_direction.py#L328-L332


### How can we reproduce the issue?

```python
from qiskit.circuit import QuantumRegister, QuantumCircuit
from qiskit.transpiler import PassManager, CouplingMap
from qiskit.transpiler.passes import GateDirection

q1 = QuantumRegister(1)
q2 = QuantumRegister(1)
qc = QuantumCircuit(q1, q2)
qc.cx(1, 0)
qc.cx(0, 1)

cmap = CouplingMap([[0, 1]])
pm = PassManager([GateDirection(coupling_map=cmap)])
pm.run(qc)
```
raises 
```
TranspilerError: "GateDirection expects a single qreg input DAG,but input DAG had qregs: OrderedDict([('q67', QuantumRegister(1, 'q67')), ('q68', QuantumRegister(1, 'q68'))])."
```

### What should happen?

If the check is removed it works as you would expect:
```python

class GateDirectionFixed(GateDirection):
    
    def run(self, dag):
        layout_map = {bit: i for i, bit in enumerate(dag.qubits)}
        if self.target is None:
            return self._run_coupling_map(dag, layout_map)
        return self._run_target(dag, layout_map)

pm = PassManager([GateDirectionFixed(coupling_map=cmap)])
pm.run(qc).draw()
```
```
     ┌───┐     ┌───┐     
q77: ┤ H ├──■──┤ H ├──■──
     ├───┤┌─┴─┐├───┤┌─┴─┐
q78: ┤ H ├┤ X ├┤ H ├┤ X ├
     └───┘└───┘└───┘└───┘
```

### Any suggestions?

Remove the incorrect check for a single register from the `GateDirection.run` method


Discussion:

Resolving patch:
diff --git a/qiskit/transpiler/passes/utils/gate_direction.py b/qiskit/transpiler/passes/utils/gate_direction.py
--- a/qiskit/transpiler/passes/utils/gate_direction.py
+++ b/qiskit/transpiler/passes/utils/gate_direction.py
@@ -60,6 +60,10 @@ class GateDirection(TransformationPass):
              │  RZX │  =       ├───┤│  RZX │├───┤
         q_1: ┤1     ├     q_1: ┤ H ├┤0     ├┤ H ├
              └──────┘          └───┘└──────┘└───┘
+
+    This pass assumes that the positions of the qubits in the :attr:`.DAGCircuit.qubits` attribute
+    are the physical qubit indicies. For example if ``dag.qubits[0]`` is qubit 0 in the
+    :class:`.CouplingMap` or :class:`.Target`.
     """
 
     _KNOWN_REPLACEMENTS = frozenset(["cx", "cz", "ecr", "swap", "rzx", "rxx", "ryy", "rzz"])
@@ -325,11 +329,6 @@ def run(self, dag):
                 cx nodes.
         """
         layout_map = {bit: i for i, bit in enumerate(dag.qubits)}
-        if len(dag.qregs) > 1:
-            raise TranspilerError(
-                "GateDirection expects a single qreg input DAG,"
-                "but input DAG had qregs: {}.".format(dag.qregs)
-            )
         if self.target is None:
             return self._run_coupling_map(dag, layout_map)
         return self._run_target(dag, layout_map)


Test patch:
diff --git a/test/python/transpiler/test_gate_direction.py b/test/python/transpiler/test_gate_direction.py
--- a/test/python/transpiler/test_gate_direction.py
+++ b/test/python/transpiler/test_gate_direction.py
@@ -101,6 +101,26 @@ def test_direction_correct(self):
 
         self.assertEqual(dag, after)
 
+    def test_multi_register(self):
+        """The CX is in the right direction
+        qr0:---(+)---
+                |
+        qr1:----.----
+
+        CouplingMap map: [0] -> [1]
+        """
+        qr1 = QuantumRegister(1, "qr1")
+        qr2 = QuantumRegister(1, "qr2")
+        circuit = QuantumCircuit(qr1, qr2)
+        circuit.cx(qr1, qr2)
+        coupling = CouplingMap([[0, 1]])
+        dag = circuit_to_dag(circuit)
+
+        pass_ = GateDirection(coupling)
+        after = pass_.run(dag)
+
+        self.assertEqual(dag, after)
+
     def test_direction_flip(self):
         """Flip a CX
         qr0:----.----