Two-Qubit States
A single qubit lives in a two-dimensional space spanned by and . When you add a second qubit the state space grows: the two-qubit system has four basis states, one for each possible pair of bit values.
The four computational basis states
The basis states are formed by taking the tensor product of the individual qubit states. Writing qubit 0 (the most significant bit) on the left:
Each label is a two-bit string. means the first qubit is and the second is ; means both are ; and so on. These four states are orthonormal — they are mutually orthogonal and each has unit length — so they form a complete basis for the four-dimensional Hilbert space .
As column vectors the convention is to order them by their decimal values: sits at index 0, at index 1, at index 2, and at index 3. For example:
The tensor product
Each column above is the tensor product of its two single-qubit vectors. For instance:
The tensor product is just the Kronecker product of the column vectors: you multiply each entry of the first vector by the entire second vector.
Preparing basis states in a circuit
Circuits always start in . To reach any of the other three basis states you apply (the NOT gate, which swaps ) to the qubits you want to flip:
- : do nothing.
- : apply to qubit 1.
- : apply to qubit 0.
- : apply to both qubits.
Try it
Prepare the state starting from . Press Run to inspect the state vector amplitude, then Check to confirm you have the right basis state.
The state vector should show a single amplitude of at index 3 (the slot) and zeros everywhere else.
Sign in on the full site to ask questions and join the discussion.