prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Make interactive visualizations default for Jupyter
  <!-- ⚠️ If you do not respect this template, your issue will be closed -->
  <!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
  
  ### What is the expected enhancement?
  The interactive visualizations contributed in PR #765 are much better than the static ones, and should be default when the environment is a Jupyter notebook. This is related to Epic #707 for providing better jupyter tools.
  
  Several issues must be solved first:
  - These visualizations need internet connection. Can we eliminate that?
  - The interface of the static and interactive visualizations are all the same, except for `plot_histogram` vs `iplot_histogram`. These should be made similar for consistency. But the interactive visualization is able to plot multiple histograms in one plot.
  - How "heavy" is it to run these interactive visualizations? I hear my laptop fan.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `qiskit/tools/visualization/__init__.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 
  3 # Copyright 2018, IBM.
  4 #
  5 # This source code is licensed under the Apache License, Version 2.0 found in
  6 # the LICENSE.txt file in the root directory of this source tree.
  7 
  8 """Main QISKit visualization methods."""
  9 
  10 from ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\
  11     latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme
  12 from ._state_visualization import plot_state
  13 from ._counts_visualization import plot_histogram
  14
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/qiskit/tools/visualization/__init__.py b/qiskit/tools/visualization/__init__.py
  --- a/qiskit/tools/visualization/__init__.py
  +++ b/qiskit/tools/visualization/__init__.py
  @@ -7,7 +7,18 @@
   
   """Main QISKit visualization methods."""
   
  +import sys
  +
   from ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\
       latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme
  -from ._state_visualization import plot_state
   from ._counts_visualization import plot_histogram
  +
  +if ('ipykernel' in sys.modules) and ('spyder' not in sys.modules):
  +    import requests
  +    if requests.get(
  +            'https://qvisualization.mybluemix.net/').status_code == 200:
  +        from .interactive._iplot_state import iplot_state as plot_state
  +    else:
  +        from ._state_visualization import plot_state
  +else:
  +    from ._state_visualization import plot_state
  
verification_info: {"golden_diff": "diff --git a/qiskit/tools/visualization/__init__.py b/qiskit/tools/visualization/__init__.py\n--- a/qiskit/tools/visualization/__init__.py\n+++ b/qiskit/tools/visualization/__init__.py\n@@ -7,7 +7,18 @@\n \n \"\"\"Main QISKit visualization methods.\"\"\"\n \n+import sys\n+\n from ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\\\n     latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme\n-from ._state_visualization import plot_state\n from ._counts_visualization import plot_histogram\n+\n+if ('ipykernel' in sys.modules) and ('spyder' not in sys.modules):\n+    import requests\n+    if requests.get(\n+            'https://qvisualization.mybluemix.net/').status_code == 200:\n+        from .interactive._iplot_state import iplot_state as plot_state\n+    else:\n+        from ._state_visualization import plot_state\n+else:\n+    from ._state_visualization import plot_state\n", "issue": "Make interactive visualizations default for Jupyter\n<!-- \u26a0\ufe0f If you do not respect this template, your issue will be closed -->\r\n<!-- \u26a0\ufe0f Make sure to browse the opened and closed issues to confirm this idea does not exist. -->\r\n\r\n### What is the expected enhancement?\r\nThe interactive visualizations contributed in PR #765 are much better than the static ones, and should be default when the environment is a Jupyter notebook. This is related to Epic #707 for providing better jupyter tools.\r\n\r\nSeveral issues must be solved first:\r\n- These visualizations need internet connection. Can we eliminate that?\r\n- The interface of the static and interactive visualizations are all the same, except for `plot_histogram` vs `iplot_histogram`. These should be made similar for consistency. But the interactive visualization is able to plot multiple histograms in one plot.\r\n- How \"heavy\" is it to run these interactive visualizations? I hear my laptop fan.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Main QISKit visualization methods.\"\"\"\n\nfrom ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\\\n    latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme\nfrom ._state_visualization import plot_state\nfrom ._counts_visualization import plot_histogram\n", "path": "qiskit/tools/visualization/__init__.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Main QISKit visualization methods.\"\"\"\n\nimport sys\n\nfrom ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\\\n    latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme\nfrom ._counts_visualization import plot_histogram\n\nif ('ipykernel' in sys.modules) and ('spyder' not in sys.modules):\n    import requests\n    if requests.get(\n            'https://qvisualization.mybluemix.net/').status_code == 200:\n        from .interactive._iplot_state import iplot_state as plot_state\n    else:\n        from ._state_visualization import plot_state\nelse:\n    from ._state_visualization import plot_state\n", "path": "qiskit/tools/visualization/__init__.py"}]}