The Different States in the Bloch Sphere

Let’s explore different states in the Bloch sphere. We use the Python library qutip as it allows us to easily play around with other visualizations of the Bloch sphere (see the documentation for details).

The Bloch class of qutip works with cartesian coordinates. Let’s write a function that allows us to use the angles θ\theta and ϕ\phi. If we interpret θ\theta and ϕ\phi as spherical coordinates (with the radius is 11) we can plot any qubit state on the surface of the Bloch sphere.

Get hands-on with 1400+ tech skills courses.