Repository: Qiskit/qiskit

Issue:
Update __qiskit_version__
### What should we add?

We are moving towards qiskit=qiskit-terra and many subpackages have been removed from the metapackage (aqua, ignis, ibmq-provider and soon aer). What are going to do with the version string `__qiskit_version__` and the handy `%qiskit_version_table` jupyter magic command (which just display the information of `__qiskit_version__`?

There a few cases:

1. Deprecated packages (for example, aqua, ignis, ibmq-provider).
   1. Packages: `aqua`, `ignis`, `ibmq-provider` 
   2. Suggestion: Remove them
3. New packages that replaced the deprecated packages:
   1. Packages `nature`, `optimization`, `finance`, `machine-learning`, `experiments`, `ibm-provider`, `ibm-runtime`, `ibm-experiment`.
   2. Currently we include aqua's replacement the application modules, but not ignis' replacement qiskit-experiments, and ibmq-provider's replacements qiskit-ibm-provider, qiskit-ibm-runtime, qiskit-ibm-experiment
   3. Suggestion: add the replacements packages.
5. Other ibm developed qiskit packages that were not replacement of old "element" sub packages.
   1. Packages: `dynamics`, `metal`
   1. Suggestion: I am not sure. 


Discussion:
Tbh, we should just remove it, this was added for the context of everything sharing the same `qiskit` namespace. Like specifically it was because when everything was all under `qiskit` you couldn't use `qiskit.__version__` to figure out which versions of all the various elements were installed. In a world where all these things have different namespaces they all should have different version attributes and we don't need a common entry point (especially for the core project that all these others depend on).
All the Jupyter tooling currently uses `__qiskit_version__` to make the version table at the bottom of basically every notebook that's built into any form of Qiskit documentation.  We'll most likely want some sort of single-callable replacement for that if we're getting rid of `__qiskit_version__`.
> All the Jupyter tooling currently uses `__qiskit_version__` to make the version table at the bottom of basically every notebook that's built into any form of Qiskit documentation. We'll most likely want some sort of single-callable replacement for that if we're getting rid of `__qiskit_version__`.

Yes I agree with this. The version table is still very useful for documentation purposes.

Related to this, it would be great to have an equivalent version table that is friendly for rst files without using `jupyter-execute` directive.
A bit unrelated, maybe a `QiskitVersion._repr_html_()` instead of the magic?

Resolving patch:
diff --git a/qiskit/tools/jupyter/version_table.py b/qiskit/tools/jupyter/version_table.py
--- a/qiskit/tools/jupyter/version_table.py
+++ b/qiskit/tools/jupyter/version_table.py
@@ -14,6 +14,7 @@
 """A module for monitoring backends."""
 
 import time
+from sys import modules
 from IPython.display import HTML, display
 from IPython.core.magic import line_magic, Magics, magics_class
 import qiskit
@@ -33,19 +34,27 @@ def qiskit_version_table(self, line="", cell=None):
         """
         html = "<h3>Version Information</h3>"
         html += "<table>"
-        html += "<tr><th>Qiskit Software</th><th>Version</th></tr>"
+        html += "<tr><th>Software</th><th>Version</th></tr>"
 
-        packages = []
-        qver = qiskit.__qiskit_version__
+        packages = {}
 
-        for pkg in qver:
-            if qver[pkg]:
-                packages.append((f"<code>{pkg}</code>", qver[pkg]))
+        from importlib.metadata import metadata, PackageNotFoundError
 
-        for name, version in packages:
-            html += f"<tr><td>{name}</td><td>{version}</td></tr>"
+        try:
+            packages["qiskit"] = metadata("qiskit")["Version"]
+        except PackageNotFoundError:
+            packages["qiskit"] = None
+
+        packages["qiskit-terra"] = qiskit.__version__
+
+        qiskit_modules = {module.split(".")[0] for module in modules.keys() if "qiskit" in module}
+        for qiskit_module in qiskit_modules:
+            packages[qiskit_module] = getattr(modules[qiskit_module], "__version__", None)
+
+        for name, version in packages.items():
+            html += f"<tr><td><code>{name}</code></td><td>{version}</td></tr>"
 
-        html += "<tr><th>System information</th></tr>"
+        html += "<tr><th colspan='2'>System information</th></tr>"
 
         local_hw_info = local_hardware_info()
         sys_info = [
diff --git a/qiskit/version.py b/qiskit/version.py
--- a/qiskit/version.py
+++ b/qiskit/version.py
@@ -12,12 +12,14 @@
 
 # pylint: disable=no-name-in-module,broad-except,cyclic-import
 
-"""Contains the terra version."""
+"""Contains Qiskit (terra) version."""
 
 import os
 import subprocess
 from collections.abc import Mapping
 
+import warnings
+
 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
 
 
@@ -86,16 +88,21 @@ def get_version_info():
 
 
 class QiskitVersion(Mapping):
-    """A lazy loading wrapper to get qiskit versions."""
+    """DEPRECATED in 0.25.0 use qiskit.__version__"""
 
     __slots__ = ["_version_dict", "_loaded"]
 
     def __init__(self):
+        warnings.warn(
+            "qiskit.__qiskit_version__ is deprecated since "
+            "Qiskit Terra 0.25.0, and will be removed 3 months or more later. "
+            "Instead, you should use qiskit.__version__. The other packages listed in "
+            "former qiskit.__qiskit_version__ have their own __version__ module level dunder, "
+            "as standard in PEP 8.",
+            category=DeprecationWarning,
+        )
         self._version_dict = {
             "qiskit-terra": __version__,
-            "qiskit-aer": None,
-            "qiskit-ignis": None,
-            "qiskit-ibmq-provider": None,
             "qiskit": None,
         }
         self._loaded = False


Test patch: