Bloch Sphere

The Bloch sphere is a geometric representation used in quantum mechanics to visualize the state of a single qubit, which is the fundamental unit of quantum information. It represents qubit states as points on the surface of a unit sphere, where each point on the sphere corresponds to a specific quantum state. We will demonstrate these states using Qiskit.

  1. General Representation

  2. Computational Basis States (Z-Basis)

  3. X-Basis States

  4. Y-Basis States

a5e8ff1417a94882837273e503d651bf

1. General Representation of a Qubit on the Bloch Sphere

A general single-qubit state \(\ket{\psi}\) can be written as:

\[\ket{\psi} = \cos \left( \frac{\theta}{2} \right) \ket{0} + e^{i\phi} \sin \left( \frac{\theta}{2} \right) \ket{1}\]

1.1 Utilizing Qiskit - IBM Quantum Documentation

We use Qiskit’s built-in visualization function to help us plot the states on the Bloch Sphere.

qiskit.visualization.plot_bloch_vector(bloch, title=’’, ax=None, figsize=None, coord_type=’cartesian’, font_size=None)

We focus on the inputs to bloch and coord_type.

  • bloch (list[double]) – array of three elements where [<x>, <y>, <z>] (Cartesian) or [<r>, <theta>, <phi>] (spherical in radians)

  • coord_type (str) – a string that specifies coordinate type for bloch (Cartesian or spherical), default is Cartesian

More documentation for this function is available here: https://docs.quantum.ibm.com/api/qiskit/qiskit.visualization.plot_bloch_vector

Imports

[ ]:
%pip install qiskit
%pip install numpy
[1]:
from qiskit.visualization import plot_bloch_vector
import numpy as np

2. Computational Basis States (Z-Basis)

The computational basis states \(\ket{0}\) and \(\ket{1}\) are represented at the North and South poles of the Bloch Sphere, respectively.

2.1 \(\ket{0}\)

Using Qiskit, we plot the state \(\ket{0}\) in Cartesian and polar coordinates.

3b116873535048e2a17e5a9bf619174d

[2]:
#cartesian coordinates
plot_bloch_vector([0, 0, 1], coord_type='cartesian')
[2]:
../../_images/introductory_qubits_bloch_sphere_10_0.png
[3]:
#polar coordinates
plot_bloch_vector([1, 0, 0], coord_type='spherical')
[3]:
../../_images/introductory_qubits_bloch_sphere_11_0.png

2.2 \(\ket{1}\)

Using Qiskit, we plot the state \(\ket{1}\) in Cartesian and polar coordinates.

b2aba88652bf4267a17b9cc0476d8ee3

[4]:
#cartiesian coordinates
plot_bloch_vector([0, 0, -1], coord_type='cartesian')
[4]:
../../_images/introductory_qubits_bloch_sphere_14_0.png
[5]:
#polar coordinates
plot_bloch_vector([1, np.pi, 0], coord_type='spherical')
[5]:
../../_images/introductory_qubits_bloch_sphere_15_0.png

3. X-Basis States

\(\ket{+}\) and \(\ket{-}\) are located on the \(x\)-axis of the Bloch Sphere.

3.1 \(\ket{+}\)

The \(\ket{+}\) state lies on the positive \(x\)-axis, and is defined as:

\[\ket{+} = \frac{1}{\sqrt{2}}(\ket{0} + \ket{1})\]

Using Qiskit, we plot the state \(\ket{+}\) in Cartesian and polar coordinates.

5c6155d16c07481ab6d463dafd65141b

[6]:
#cartesian coordinates
plot_bloch_vector([1, 0, 0], coord_type='cartesian')
[6]:
../../_images/introductory_qubits_bloch_sphere_18_0.png
[7]:
#polar coordinates
plot_bloch_vector([1, np.pi/2, 0], coord_type='spherical')
[7]:
../../_images/introductory_qubits_bloch_sphere_19_0.png

3.2 \(\ket{-}\)

The \(\ket{-}\) state lies on the negative \(x\)-axis, and is defined as:

\[\ket{-} = \frac{1}{\sqrt{2}}(\ket{0} - \ket{1})\]

Using Qiskit, we plot the state \(\ket{-}\) in Cartesian and polar coordinates.

44c491f3c15b4fabb5c5a37abc604287

[8]:
# cartesian coordinates
plot_bloch_vector([-1, 0, 0], coord_type='cartesian')
[8]:
../../_images/introductory_qubits_bloch_sphere_21_0.png
[9]:
# polar coordinates
plot_bloch_vector([1, -np.pi/2, 0], coord_type='spherical')
[9]:
../../_images/introductory_qubits_bloch_sphere_22_0.png

4. Y-Basis States

\(\ket{+i}\) and \(\ket{-i}\) are states located on the \(y\)-axis of the Bloch Sphere.

4.1 \(\ket{+i}\)

The \(\ket{+i}\) state lies on the positive \(y\)-axis, and is defined as:

\[\ket{+i} = \frac{1}{\sqrt{2}}(\ket{0} + i\ket{1})\]

Using Qiskit, we plot the state \(\ket{+i}\) in Cartesian and polar coordinates.

ff7bf9eb70414673aa3e69e177c477ee

[10]:
# cartesian coordinates
plot_bloch_vector([0, 1, 0], coord_type='cartesian')
[10]:
../../_images/introductory_qubits_bloch_sphere_25_0.png
[11]:
# polar coordinates
plot_bloch_vector([1, np.pi/2, np.pi/2], coord_type='spherical')
[11]:
../../_images/introductory_qubits_bloch_sphere_26_0.png

4.2 \(\ket{-i}\)

The \(\ket{-i}\) state lies on the negative \(y\)-axis, and is defined as:

\[\ket{-i} = \frac{1}{\sqrt{2}}(\ket{0} - i\ket{1})\]

Using Qiskit, we plot the state \(\ket{-i}\) in Cartesian and polar coordinates.

c30e025da5d741c28cf122f97df495eb

[12]:
# cartesian coordinates
plot_bloch_vector([0, -1, 0], coord_type='cartesian')
[12]:
../../_images/introductory_qubits_bloch_sphere_28_0.png
[13]:
# polar coordinates
plot_bloch_vector([1, -np.pi/2, np.pi/2], coord_type='spherical')
[13]:
../../_images/introductory_qubits_bloch_sphere_29_0.png