The principle of
superposition allows a qubit to exist in a combination of its basis states, \(|0 \rangle\) and \(|1 \rangle \) (Eq.(1)).
For an \(n\)-qubit system, the state can be a superposition of all \(2^n\) basis states:
\begin{aligned}
|\psi \rangle = \sum_{i=0}^{2^n-1} \alpha_i |i \rangle, \hspace{5em} \hfill (3)
\end{aligned}
where \(\alpha _i \in \mathbb{C}\) and \(\sum_{i=0}^{2^n-1} |\alpha _i |^2 = 1\).
Each \(|i\rangle\) represents a binary combination of the \(n\) qubits' basic states
and can be expressed as a
tensor product of the individual qubits:
$$
|q_1 q_2 \dots q_n \rangle = |q_1 \rangle \otimes |q_2 \rangle \otimes \dots \otimes|q_n \rangle ,
$$
where \(q_1, q_2, \dots, q_n\) denote the states of qubits 1 through \(n\), ordered left to right.
For a two-qubit system (\(n = 2\)), there are four computational basis states: \(|00\rangle\), \(|01\rangle\), \(|10\rangle\), and \(|11\rangle\),
where \(|01\rangle = |0\rangle \otimes |1\rangle,\) meaning the first qubit is \(|0\rangle\) and the second is \(|1\rangle\).
The general state of a two-qubit system is a superposition of all four states:
$$
|\psi\rangle = \alpha _0 |00\rangle + \alpha _1 |01\rangle + \alpha _2 |10\rangle + \alpha _3 |11\rangle,
$$
with \(\sum_{i=0}^{3} |\alpha _i |^2 = 1 \).
In column-vector form:
$$
|\psi\rangle
= \alpha_0
\begin{bmatrix}1\\0\\0\\0\end{bmatrix}
+ \alpha_1
\begin{bmatrix}0\\1\\0\\0\end{bmatrix}
+ \alpha_2
\begin{bmatrix}0\\0\\1\\0\end{bmatrix}
+ \alpha_3
\begin{bmatrix}0\\0\\0\\1\end{bmatrix}
=
\begin{bmatrix}
\alpha_0 \\
\alpha_1 \\
\alpha_2 \\
\alpha_3
\end{bmatrix}.
$$
To create
superposition in a qubit, the Hadamard gate is widely used (see
Quantum gates).