Qubit Demonstration
Pauli Gates
Hadamard Gate
Phase Gates
Actions
Current State
Custom Rotation
A qubit (quantum bit) is the fundamental unit of quantum information. Unlike classical bits that can only be 0 or 1, a qubit can exist in a superposition of both states simultaneously.
The general state of a qubit is written as:
\[|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\]
Where \(\alpha\) and \(\beta\) are complex numbers called probability amplitudes, satisfying \(|\alpha|^2 + |\beta|^2 = 1\).
On the Bloch sphere, any pure state can be written as:
\[|\psi\rangle = \cos\frac{\theta}{2}|0\rangle + e^{i\varphi}\sin\frac{\theta}{2}|1\rangle\]
The Bloch sphere is a geometric representation of a qubit's state:
- North pole \(|0\rangle\): The classical "0" state
- South pole \(|1\rangle\): The classical "1" state
- Equator: Equal superposition states like \(|+\rangle\) and \(|-\rangle\)
- Any point on the surface: A valid pure qubit state
Quantum gates are operations that transform qubit states. On the Bloch sphere, they correspond to rotations.
X Gate (Pauli-X)
Bit flip gate. Rotates \(\pi\) around X-axis.
\(|0\rangle \rightarrow |1\rangle\), \(|1\rangle \rightarrow |0\rangle\)
Y Gate (Pauli-Y)
Rotates \(\pi\) around Y-axis.
\(|0\rangle \rightarrow i|1\rangle\), \(|1\rangle \rightarrow -i|0\rangle\)
Z Gate (Pauli-Z)
Phase flip gate. Rotates \(\pi\) around Z-axis.
\(|0\rangle \rightarrow |0\rangle\), \(|1\rangle \rightarrow -|1\rangle\)
H Gate (Hadamard)
Creates superposition.
\(|0\rangle \rightarrow |+\rangle\), \(|1\rangle \rightarrow |-\rangle\)
S Gate (Phase)
Rotates \(\frac{\pi}{2}\) around Z-axis.
\(|1\rangle \rightarrow i|1\rangle\), also \(\sqrt{Z}\)
T Gate
Rotates \(\frac{\pi}{4}\) around Z-axis.
\(|1\rangle \rightarrow e^{i\pi/4}|1\rangle\)
When a qubit is measured, its superposition state collapses to one of the basis states:
- Collapses to \(|0\rangle\) with probability \(|\alpha|^2 = \cos^2(\theta/2)\)
- Collapses to \(|1\rangle\) with probability \(|\beta|^2 = \sin^2(\theta/2)\)
This is fundamentally probabilistic, you cannot predict which outcome will occur, only the probabilities. After measurement, the qubit is in the measured state.
On the Bloch sphere, measurement projects the state to either the north pole (\(|0\rangle\)) or south pole (\(|1\rangle\)).