Repository: Qiskit/qiskit

Issue:
Error in compile for sdg 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**: master (+ Aer master)
- **Python version**: 3.6
- **Operating system**: MacOS

### What is the current behavior?

A recently merged PR is causing all Aer tests involding `sdg` gates to fail.

The failing tests seem to involve calling the `compile` function on a circuit with `sdg` gates.

*Note: this error doesn't occur if execute is used instead of compile, or if `"sdg"` is in the `basis_gates` used for `compile`*

### Steps to reproduce the problem

Running the following code:

```python
from qiskit import QuantumCircuit, QuantumRegister, execute, compile
from qiskit.providers.aer import StatevectorSimulator

backend = StatevectorSimulator()

q = QuantumRegister(1)
qc = QuantumCircuit(q)
qc.sdg(q)

qobj = compile(qc, backend, basis_gates=['u1', 'u2', 'u3'])
```

raises:

```python
---------------------------------------------------------------------------
DAGCircuitError                           Traceback (most recent call last)
<ipython-input-6-9eea536c17ec> in <module>()
     10 
     11 result = execute(qc, backend, basis_gates=['u1', 'u2', 'u3']).result()
---> 12 qobj = compile(qc, backend, basis_gates=['u1', 'u2', 'u3'])

~/git/qiskit/terra/qiskit/tools/compiler.py in compile(circuits, backend, config, basis_gates, coupling_map, initial_layout, shots, max_credits, seed, qobj_id, seed_mapper, pass_manager, memory)
     65 
     66     new_circuits = transpiler.transpile(circuits, backend, basis_gates, coupling_map,
---> 67                                         initial_layout, seed_mapper, pass_manager)
     68 
     69     qobj = assemble_circuits(new_circuits, qobj_header=None, run_config=run_config,

~/git/qiskit/terra/qiskit/transpiler/transpiler.py in transpile(circuits, backend, basis_gates, coupling_map, initial_layout, seed_mapper, pass_manager)
     88                                          'initial_layout': initial_layout,
     89                                          'seed_mapper': seed_mapper,
---> 90                                          'pass_manager': pass_manager})
     91     if return_form_is_single:
     92         return circuits[0]

~/git/qiskit/terra/qiskit/tools/parallel.py in parallel_map(task, values, task_args, task_kwargs, num_processes)
     91     """
     92     if len(values) == 1:
---> 93         return [task(values[0], *task_args, **task_kwargs)]
     94 
     95     Publisher().publish("terra.parallel.start", len(values))

~/git/qiskit/terra/qiskit/transpiler/transpiler.py in _transpilation(***failed resolving arguments***)
    147                               initial_layout=initial_layout,
    148                               seed_mapper=seed_mapper,
--> 149                               pass_manager=pass_manager)
    150 
    151     out_circuit = dag_to_circuit(final_dag)

~/git/qiskit/terra/qiskit/transpiler/transpiler.py in transpile_dag(dag, basis_gates, coupling_map, initial_layout, seed_mapper, pass_manager)
    221         name = dag.name
    222 
--> 223         dag = Unroller(basis_gates).run(dag)
    224         dag = BarrierBeforeFinalMeasurements().run(dag)
    225 

~/git/qiskit/terra/qiskit/transpiler/passes/unroller.py in run(self, dag)
     59             # TODO: need anonymous rules to address wires by index
     60             decomposition = DAGCircuit()
---> 61             decomposition.add_qreg(rule[0][1][0][0])
     62             for inst in rule:
     63                 decomposition.apply_operation_back(*inst)

~/git/qiskit/terra/qiskit/dagcircuit/dagcircuit.py in add_qreg(self, qreg)
    163         """Add all wires in a quantum register."""
    164         if not isinstance(qreg, QuantumRegister):
--> 165             raise DAGCircuitError("not a QuantumRegister instance.")
    166         if qreg.name in self.qregs:
    167             raise DAGCircuitError("duplicate register %s" % qreg.name)

DAGCircuitError: 'not a QuantumRegister instance.'
```
### What is the expected behavior?

No error when using depreciated compile.

### Suggested solutions

There is probably a typo or bug in recently merged `sdg` instruction code.




Discussion:

Resolving patch:
diff --git a/qiskit/extensions/standard/s.py b/qiskit/extensions/standard/s.py
--- a/qiskit/extensions/standard/s.py
+++ b/qiskit/extensions/standard/s.py
@@ -58,7 +58,7 @@ def _define(self):
         definition = []
         q = QuantumRegister(1, "q")
         rule = [
-            (U1Gate(-pi/2), q[0], [])
+            (U1Gate(-pi/2), [q[0]], [])
         ]
         for inst in rule:
             definition.append(inst)


Test patch: