1. Conceptual Framework: Scaling Quantum Systems
When moving from a single isolated qubit to larger processors, we must combine separate quantum systems into one composite computational space.
- The Scaling Law ($2^n$): Adding one qubit increases state-space size exponentially. An $n$-qubit system has a composite Hilbert space dimension of $2^n$.
- State Coexistence: A two-qubit register spans four basis states simultaneously: $|00\rangle$, $|01\rangle$, $|10\rangle$, and $|11\rangle$.
2. The Tensor Product ($\otimes$)
The tensor product combines individual qubit vectors (or gate matrices) into a single multi-qubit representation.
Constructing Multi-Qubit Basis Vectors
For two qubits both initialized in $|0\rangle$:
$$|q_0 q_1\rangle = |q_0\rangle \otimes |q_1\rangle = |0\rangle \otimes |0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \otimes \begin{bmatrix} 1 \\ 0 \end{bmatrix}$$
Distribute each scalar from the first vector across the second:
$$|0\rangle \otimes |0\rangle = \begin{bmatrix} 1 \cdot \begin{bmatrix} 1 \\ 0 \end{bmatrix} \\ 0 \cdot \begin{bmatrix} 1 \\ 0 \end{bmatrix} \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} = |00\rangle$$
Applying the same method gives the full two-qubit basis set:
$$|01\rangle = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \quad |10\rangle = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}, \quad |11\rangle = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}$$
3. Conditional Logic: Multi-Qubit Gates
The Controlled-NOT Gate (CNOT / CX)
CNOT uses a control qubit and a target qubit. It flips the target if and only if the control is in $|1\rangle$; otherwise it leaves the target unchanged.
Matrix Representation of CNOT
$$CX = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}$$
Matrix Multiplications in Action
- Control is $|0\rangle$ (no flip):
$$CX|01\rangle = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} = |01\rangle$$
- Control is $|1\rangle$ (flip triggered):
$$CX|10\rangle = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} = |11\rangle$$
4. Summary Matrix: CNOT Gate Transformations
| Input Computational State |
Control State |
Target State |
Output Computational State |
Action Taken |
| $|00\rangle$ |
$|0\rangle$ |
$|0\rangle$ |
$|00\rangle$ |
No flip |
| $|01\rangle$ |
$|0\rangle$ |
$|1\rangle$ |
$|01\rangle$ |
No flip |
| $|10\rangle$ |
$|1\rangle$ |
$|0\rangle$ |
$|11\rangle$ |
Target flips |
| $|11\rangle$ |
$|1\rangle$ |
$|1\rangle$ |
$|10\rangle$ |
Target flips |
Architectural note on bit order formatting: Always verify endianness conventions. Physics references often use big-endian notation, while software frameworks such as Qiskit frequently use little-endian index ordering.