Repository: Qiskit/qiskit

Issue:
Function `disassemble` is failing on a circuit with an `iso` gate.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**: 0.13
- **Python version**: 3.7
- **Operating system**: MacOS

### What is the current behavior?

The following code:

```python
from qiskit import QuantumCircuit, assemble
from qiskit.assembler import disassemble
import qiskit.quantum_info as qi
qc = QuantumCircuit(4)
qc.iso(qi.random_unitary(16).data, qc.qubits, [])
d = assemble(qc)
c = disassemble(d)
```

Fails with:

```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-19-e812edeeb1eb> in <module>
      5 qc.iso(qi.random_unitary(16).data, qc.qubits, [])
      6 d = assemble(qc)
----> 7 c = disassemble(d)

~/workspace/may4-challenge/.venv/lib/python3.7/site-packages/qiskit/assembler/disassemble.py in disassemble(qobj)
    137     run_config = qobj.config.to_dict()
    138     user_qobj_header = qobj.header.to_dict()
--> 139     circuits = _experiments_to_circuits(qobj)
    140 
    141     return circuits, run_config, user_qobj_header

~/workspace/may4-challenge/.venv/lib/python3.7/site-packages/qiskit/assembler/disassemble.py in _experiments_to_circuits(qobj)
     79                         _inst = instr_method(params, qubits)
     80                     else:
---> 81                         _inst = instr_method(*params, *qubits, *clbits)
     82                 elif name == 'bfunc':
     83                     conditional['value'] = int(i.val, 16)

~/workspace/may4-challenge/.venv/lib/python3.7/site-packages/qiskit/extensions/quantum_initializer/isometry.py in iso(self, isometry, q_input, q_ancillas_for_output, q_ancillas_zero, q_ancillas_dirty)
    542         q_ancillas_dirty = q_ancillas_dirty[:]
    543 
--> 544     return self.append(Isometry(isometry, len(q_ancillas_zero), len(q_ancillas_dirty)),
    545                        q_input + q_ancillas_for_output + q_ancillas_zero + q_ancillas_dirty)
    546 

TypeError: object of type 'Qubit' has no len()
```

### Steps to reproduce the problem

Run the following code:


```python
from qiskit import QuantumCircuit, assemble
from qiskit.assembles import disassemble
import qiskit.quantum_info as qi
qc = QuantumCircuit(4)
qc.iso(qi.random_unitary(16).data, qc.qubits, [])
d = assemble(qc)
c = disassemble(d)
```

### What is the expected behavior?

The function `disassemble` return a circuit equal to `qc`.


Discussion:

Resolving patch:
diff --git a/qiskit/assembler/disassemble.py b/qiskit/assembler/disassemble.py
--- a/qiskit/assembler/disassemble.py
+++ b/qiskit/assembler/disassemble.py
@@ -77,6 +77,8 @@ def _experiments_to_circuits(qobj):
                             params=params)
                     elif i.name == 'initialize':
                         _inst = instr_method(params, qubits)
+                    elif i.name == 'isometry':
+                        _inst = instr_method(*params, qubits, clbits)
                     else:
                         _inst = instr_method(*params, *qubits, *clbits)
                 elif name == 'bfunc':


Test patch:
diff --git a/test/python/compiler/test_disassembler.py b/test/python/compiler/test_disassembler.py
--- a/test/python/compiler/test_disassembler.py
+++ b/test/python/compiler/test_disassembler.py
@@ -17,6 +17,7 @@
 import unittest
 
 import numpy as np
+from numpy.testing import assert_allclose
 
 from qiskit.circuit import QuantumRegister, ClassicalRegister, QuantumCircuit
 from qiskit.circuit import Instruction
@@ -24,6 +25,7 @@
 from qiskit.assembler.disassemble import disassemble
 from qiskit.assembler.run_config import RunConfig
 from qiskit.test import QiskitTestCase
+import qiskit.quantum_info as qi
 
 
 class TestAssembler(QiskitTestCase):
@@ -116,6 +118,26 @@ def test_assemble_initialize(self):
         self.assertEqual(circuits[0], circ)
         self.assertEqual({}, header)
 
+    def test_disassemble_isometry(self):
+        """Test disassembling a circuit with an isometry.
+        """
+        q = QuantumRegister(2, name='q')
+        circ = QuantumCircuit(q, name='circ')
+        circ.iso(qi.random_unitary(4).data, circ.qubits, [])
+        qobj = assemble(circ)
+        circuits, run_config_out, header = disassemble(qobj)
+        run_config_out = RunConfig(**run_config_out)
+        self.assertEqual(run_config_out.n_qubits, 2)
+        self.assertEqual(run_config_out.memory_slots, 0)
+        self.assertEqual(len(circuits), 1)
+        # params array
+        assert_allclose(circuits[0]._data[0][0].params[0], circ._data[0][0].params[0])
+        # all other data
+        self.assertEqual(circuits[0]._data[0][0].params[1:], circ._data[0][0].params[1:])
+        self.assertEqual(circuits[0]._data[0][1:], circ._data[0][1:])
+        self.assertEqual(circuits[0]._data[1:], circ._data[1:])
+        self.assertEqual({}, header)
+
     def test_opaque_instruction(self):
         """Test the disassembler handles opaque instructions correctly."""
         opaque_inst = Instruction(name='my_inst', num_qubits=4,