Representing Qubits - RPIQuantumComputing/QuantumCircuits GitHub Wiki

Ket notation: The ket notation is used to represent the state of qubits. Putting a “0” or a “1” inside a ket shows that it represents a quantum state. Implicitly, the state is a vector but more on that later.

Ket

Bloch sphere: The Bloch sphere is a way to visually represent qubit states. Any individual qubit state can be represented on the Bloch sphere. However, entangled states are a notable exception.

  • The |0> state is located at the top of the Bloch sphere, and the |1> state at the bottom.
  • Any other state on the Bloch sphere represents a superposition of |0> and |1>. A superposition can be equal, meaning that |0> and |1> contribute equally to the state, or unequal, meaning that either |0> contributes more or |1> does. If the state is closer to |0>, it has a greater contribution from |0>. If it is closer to |1>, it has a greater contribution from |1>.

Bloch Sphere

Quantum Gates: Quantum gates manipulate or change the state of qubits. Gates are how we create superposition, interference, and entanglement. The operation of gates on qubits can be visualized as rotations on the Bloch sphere for a single qubit. Quantum Gates are a generalization of classical logic gates.

To visualize these rotations, we need to associate a coordinate system with the Bloch sphere. Here is the conventional coordinate system:

The X gate: The X gate can be visualized as a 180 degree rotation about the X axis.

  • | 0 > → | 1 > or | 1 > → | 0 >

The H gate: The H gate creates superposition. It is a uniquely quantum gate. Here, |+> and |-> represent two superposition states.

  • | 0 > → | + > or | 1 > → | - >

The Z gate: The Z gate performs a 180 degree rotation about the Z axis.

  • | + > → | - > or | - > → | + >

The | 1 > and | 0 > states are unaffected by the Z gate since it points in the vertical direction as well. However, the Z gate gives the |1> state a negative sign. This however, does not change where the state lies on the Bloch sphere.

  • | 1 > → - | 1 >

Gate Visualization