Repository: Qiskit/qiskit

Issue:
Running a schedule in execute gives warning about transpiler
<!-- ⚠️ 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
- **Python version**:
- **Operating system**:

### What is the current behavior?
The docs (https://qiskit.org/documentation/tutorials/advanced/terra/pulse/getting_started_with_pulse.html) say that I can use the `execute` function for a schedule the same as a circuit.  However when I do I get the warning:

```
UserWarning:

Transpiling schedules is not supported yet.
```
but the job gets sent to the device.  

### Steps to reproduce the problem



### What is the expected behavior?



### Suggested solutions





Discussion:

Resolving patch:
diff --git a/qiskit/execute.py b/qiskit/execute.py
--- a/qiskit/execute.py
+++ b/qiskit/execute.py
@@ -224,14 +224,23 @@ def execute(experiments, backend,
 
             job = execute(qc, backend, shots=4321)
     """
-    # transpiling the circuits using given transpile options
-    if pass_manager is not None:
-        _check_conflicting_argument(optimization_level=optimization_level, basis_gates=basis_gates,
-                                    coupling_map=coupling_map, seed_transpiler=seed_transpiler,
+    if isinstance(experiments, Schedule) or (isinstance(experiments, list) and
+                                             isinstance(experiments[0], Schedule)):
+        # do not transpile a schedule circuit
+        if schedule_circuit:
+            raise QiskitError("Must supply QuantumCircuit to schedule circuit.")
+    elif pass_manager is not None:
+        # transpiling using pass_manager
+        _check_conflicting_argument(optimization_level=optimization_level,
+                                    basis_gates=basis_gates,
+                                    coupling_map=coupling_map,
+                                    seed_transpiler=seed_transpiler,
                                     backend_properties=backend_properties,
-                                    initial_layout=initial_layout, backend=backend)
+                                    initial_layout=initial_layout,
+                                    backend=backend)
         experiments = pass_manager.run(experiments)
     else:
+        # transpiling the circuits using given transpile options
         experiments = transpile(experiments,
                                 basis_gates=basis_gates,
                                 coupling_map=coupling_map,
@@ -242,14 +251,11 @@ def execute(experiments, backend,
                                 backend=backend)
 
     if schedule_circuit:
-        if isinstance(experiments, Schedule) or isinstance(experiments[0], Schedule):
-            raise QiskitError("Must supply QuantumCircuit to schedule circuit.")
         experiments = schedule(circuits=experiments,
                                backend=backend,
                                inst_map=inst_map,
                                meas_map=meas_map,
-                               method=scheduling_method
-                               )
+                               method=scheduling_method)
 
     # assembling the circuits into a qobj to be run on the backend
     qobj = assemble(experiments,


Test patch: