Repository: Qiskit/qiskit

Issue:
Jupyter Notebook: Stretched Bloch and Q-Spheres
<!-- ⚠️ 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**: 14.2
- **Matplotlib version**: 3.3.0
- **Python version**: 3.7.7
- **Operating system**: macOS

### What is the current behavior?

![E58F2CA8-49F3-419B-82CB-654332C5678E](https://user-images.githubusercontent.com/25377399/88094255-23631000-cb48-11ea-9dd2-5f8ef34daa94.jpeg)

When I create a Bloch or Q-Sphere, the drawing displayed is horizontally stretched.

### Steps to reproduce the problem

1. Open a Jupyter Notebook
2. Type the following into a cell:

```
from numpy import sqrt
from qiskit.visualization import plot_bloch_multivector

plot_bloch_multivector([1/sqrt(2), 1/sqrt(2)])
```

3. Run the cell

### What is the expected behavior?

I would expect the spheres to be shaped like spheres instead of ellipsoids.

### Suggested solutions

Is it possible the backend (matplotlib?) needs to be updated?




Discussion:
What's your matplotlib version? Cause mine is  3.2.2 and Bloch shpere is fine for me. 
Additionally, did you try adding `%matplotlib inline` or infact, try adding figsize param: `plot_bloch_multivector([1/sqrt(2), 1/sqrt(2)], figsize=(10,10))`?

@obliviateandsurrender I'm running matplotlib version `3.3.0` (so this might be a version issue?) and neither `figsize=(10,10)` nor `%matplotlib inline` fixed the drawing.

![Screen Shot 2020-07-21 at 12 28 45 PM](https://user-images.githubusercontent.com/25377399/88097880-ba7e9680-cb4d-11ea-8fce-5cf858b24386.png)
I can also replicate the issue with matplotlib 3.3.0 but not with 3.2.2.

Likely due to https://matplotlib.org/3.3.0/users/whats_new.html#axes3d-no-longer-distorts-the-3d-plot-to-match-the-2d-aspect-ratio
@gschaffner Do you think creating a default argument for [set_box_aspect](https://matplotlib.org/3.3.0/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.set_box_aspect) would fix the distortion?
Hey, looks like this has not been fixed yet. Mind if I take a look at this?
@e-eight yes please do! i hope you can figure it out but let me know if i can help with anything 
Cool. I'll let you know what I find.

Resolving patch:
diff --git a/qiskit/visualization/bloch.py b/qiskit/visualization/bloch.py
--- a/qiskit/visualization/bloch.py
+++ b/qiskit/visualization/bloch.py
@@ -52,10 +52,12 @@
 
 import os
 import numpy as np
+import matplotlib as mpl
 from matplotlib import get_backend
 import matplotlib.pyplot as plt  # pylint: disable=import-error
 from matplotlib.patches import FancyArrowPatch  # pylint: disable=import-error
 from mpl_toolkits.mplot3d import (Axes3D, proj3d)  # pylint: disable=import-error
+from packaging import version
 
 
 class Arrow3D(FancyArrowPatch):
@@ -413,6 +415,9 @@ def render(self, title=''):
             self.axes.set_ylim3d(-0.7, 0.7)
             self.axes.set_zlim3d(-0.7, 0.7)
 
+        if version.parse(mpl.__version__) >= version.parse('3.3.0'):
+            self.axes.set_box_aspect((1, 1, 1))
+
         self.axes.grid(False)
         self.plot_back()
         self.plot_points()
diff --git a/qiskit/visualization/state_visualization.py b/qiskit/visualization/state_visualization.py
--- a/qiskit/visualization/state_visualization.py
+++ b/qiskit/visualization/state_visualization.py
@@ -27,6 +27,7 @@
 from .matplotlib import HAS_MATPLOTLIB
 
 if HAS_MATPLOTLIB:
+    import matplotlib as mpl
     from matplotlib import get_backend
     from matplotlib import pyplot as plt
     from matplotlib.patches import FancyArrowPatch
@@ -40,6 +41,7 @@
     from qiskit.visualization.bloch import Bloch
     from qiskit.visualization.utils import _bloch_multivector_data, _paulivec_data
     from qiskit.circuit.tools.pi_check import pi_check
+    from packaging import version
 
 
 if HAS_MATPLOTLIB:
@@ -712,6 +714,9 @@ def plot_state_qsphere(state, figsize=None, ax=None, show_state_labels=True,
     ax.axes.grid(False)
     ax.view_init(elev=5, azim=275)
 
+    if version.parse(mpl.__version__) >= version.parse('3.3.0'):
+        ax.axes.set_box_aspect((1, 1, 1))
+
     # start the plotting
     # Plot semi-transparent sphere
     u = np.linspace(0, 2 * np.pi, 25)


Test patch: