Repository: Qiskit/qiskit

Issue:
Compile and execute use a progress bar even if a single circuit is passed.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Informations

- **Qiskit Terra version**: master
- **Python version**: 3.7
- **Operating system**: OSX

### What is the current behavior?
The `compile` and `execute` functions make use of a progress bar for a single circuit.

### Steps to reproduce the problem
```
from qiskit import *
from qiskit.tools.jupyter import TextProgressBar

q = QuantumRegister(2)
c = ClassicalRegister(2)
qc = QuantumCircuit(q, c)

qc.h(q[0])
qc.cx(q[0], q[1])
qc.measure(q, c)

backend = Aer.get_backend('qasm_simulator')
TextProgressBar()
qobj = compile([qc], backend)
```


### What is the expected behavior?
A progress bar should not be used for a single circuit.

### Suggested solutions





Discussion:

Resolving patch:
diff --git a/qiskit/transpiler/_parallel.py b/qiskit/transpiler/_parallel.py
--- a/qiskit/transpiler/_parallel.py
+++ b/qiskit/transpiler/_parallel.py
@@ -86,11 +86,10 @@ def parallel_map(task, values, task_args=tuple(), task_kwargs={},  # pylint: dis
         terra.transpiler.parallel.update: One of the parallel task has finished.
         terra.transpiler.parallel.finish: All the parallel tasks have finished.
     """
-    Publisher().publish("terra.transpiler.parallel.start", len(values))
     if len(values) == 1:
-        Publisher().publish("terra.transpiler.parallel.finish")
         return [task(values[0], *task_args, **task_kwargs)]
 
+    Publisher().publish("terra.transpiler.parallel.start", len(values))
     nfinished = [0]
 
     def _callback(_):


Test patch:
diff --git a/test/python/notebooks/test_pbar_status.ipynb b/test/python/notebooks/test_pbar_status.ipynb
--- a/test/python/notebooks/test_pbar_status.ipynb
+++ b/test/python/notebooks/test_pbar_status.ipynb
@@ -2,11 +2,11 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 3,
+   "execution_count": 1,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:43.165035Z",
-     "start_time": "2018-11-08T10:45:43.159335Z"
+     "end_time": "2018-11-30T18:31:09.603098Z",
+     "start_time": "2018-11-30T18:31:09.592395Z"
     }
    },
    "outputs": [],
@@ -21,11 +21,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 2,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:44.644196Z",
-     "start_time": "2018-11-08T10:45:43.510868Z"
+     "end_time": "2018-11-30T18:31:12.323585Z",
+     "start_time": "2018-11-30T18:31:09.837946Z"
     }
    },
    "outputs": [],
@@ -38,11 +38,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 3,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:44.650086Z",
-     "start_time": "2018-11-08T10:45:44.647285Z"
+     "end_time": "2018-11-30T18:31:12.328399Z",
+     "start_time": "2018-11-30T18:31:12.325595Z"
     }
    },
    "outputs": [],
@@ -61,11 +61,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 4,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:45.031931Z",
-     "start_time": "2018-11-08T10:45:44.676683Z"
+     "end_time": "2018-11-30T18:31:12.687639Z",
+     "start_time": "2018-11-30T18:31:12.329882Z"
     }
    },
    "outputs": [],
@@ -83,11 +83,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 7,
+   "execution_count": 5,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:45.386513Z",
-     "start_time": "2018-11-08T10:45:45.036608Z"
+     "end_time": "2018-11-30T18:31:13.159985Z",
+     "start_time": "2018-11-30T18:31:12.694658Z"
     }
    },
    "outputs": [],
@@ -105,11 +105,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 8,
+   "execution_count": 6,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:45.753892Z",
-     "start_time": "2018-11-08T10:45:45.392912Z"
+     "end_time": "2018-11-30T18:31:13.621412Z",
+     "start_time": "2018-11-30T18:31:13.166373Z"
     }
    },
    "outputs": [],
@@ -127,11 +127,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 9,
+   "execution_count": 7,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:46.105671Z",
-     "start_time": "2018-11-08T10:45:45.760346Z"
+     "end_time": "2018-11-30T18:31:14.319363Z",
+     "start_time": "2018-11-30T18:31:13.873318Z"
     }
    },
    "outputs": [],
@@ -149,41 +149,20 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 10,
+   "execution_count": 8,
    "metadata": {
     "ExecuteTime": {
-     "end_time": "2018-11-08T10:45:46.631733Z",
-     "start_time": "2018-11-08T10:45:46.114140Z"
+     "end_time": "2018-11-30T18:31:15.401804Z",
+     "start_time": "2018-11-30T18:31:15.396004Z"
     }
    },
    "outputs": [
     {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "949eee6697e548d88bfc6f661e38eb4c",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "VBox(children=(HTML(value=''), IntProgress(value=0, bar_style='info', max=10)))"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "e2b5d98867c2487d801ee260db31e474",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "VBox(children=(HTML(value=\"<p style='font-size:16px;'>Job Status : job is actively running </p>\"),))"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "UsageError: Cell magic `%%qiskit_job_status` not found.\n"
+     ]
     }
    ],
    "source": [
@@ -276,6 +255,7 @@
   }
  ],
  "metadata": {
+  "hide_input": false,
   "kernelspec": {
    "display_name": "Python 3",
    "language": "python",