In short
One qubit lives in a 2-dimensional complex vector space with basis \{|0\rangle, |1\rangle\}. Two qubits live in a 4-dimensional complex vector space with basis \{|00\rangle, |01\rangle, |10\rangle, |11\rangle\}. A general two-qubit state is a superposition of all four, |\psi\rangle = \alpha_{00}|00\rangle + \alpha_{01}|01\rangle + \alpha_{10}|10\rangle + \alpha_{11}|11\rangle, with the amplitudes summing in modulus-squared to one. Whether the leftmost label refers to qubit 0 or qubit 1 is a convention — Qiskit writes little-endian (|q_1 q_0\rangle), Nielsen & Chuang writes big-endian (|q_0 q_1\rangle) — and you must check which convention a source uses before trusting its basis labels. A state is a product if it factors as |\alpha\rangle \otimes |\beta\rangle, and entangled otherwise.
Here is where multi-qubit quantum computing really begins.
For a single qubit, the Bloch sphere was enough — two amplitudes, a point on a unit sphere, every gate a rotation. The whole story fit in 3D. You could draw it, turn it, reason about it without once writing down a 4-by-4 matrix.
The moment you add a second qubit, that picture stops working. You cannot embed the state of two qubits in 3D — not because of a drawing limitation, but because the state space genuinely has more room. Two qubits live in a 4-dimensional complex vector space. There is no sphere left to point at. The geometry stops helping, and the algebra takes over.
This chapter builds that algebra. You will see the four basis states |00\rangle, |01\rangle, |10\rangle, |11\rangle as 4-component column vectors, learn how to write a general two-qubit state using four complex amplitudes, meet the two competing conventions for qubit ordering (and learn why you have to check which one a given paper uses), and get your first taste of how to tell a product state apart from an entangled one. The tools you build here are the alphabet for every multi-qubit article that follows — Bell states, CNOT, Toffoli, teleportation, every algorithm in the track.
From 2 dimensions to 4
You already know from qubit as a unit vector that a single qubit is a unit-length column vector in \mathbb{C}^2:
Any one-qubit state is \alpha|0\rangle + \beta|1\rangle with |\alpha|^2 + |\beta|^2 = 1 — two complex amplitudes, one real normalisation constraint.
Now put a second qubit on the chip. The joint system has to keep track of what qubit A is doing and what qubit B is doing at the same time. The mathematical operation that combines two vector spaces to describe a joint system is the tensor product — worked out carefully in tensor products the quantum way. The short version: if qubit A's space has dimension 2 and qubit B's space has dimension 2, the joint space is \mathbb{C}^2 \otimes \mathbb{C}^2, which has dimension 2 \times 2 = 4.
Why multiply instead of add: the joint system has to store both qubits' states simultaneously. A direct sum (\mathbb{C}^2 \oplus \mathbb{C}^2, dimension 2 + 2 = 4) would describe a system that is either on A or on B, never both. Two qubits are on both.
Four dimensions means a basis of four vectors. Those four vectors are the four possible joint configurations of the two qubits, written with one compact ket per configuration:
Read each two-character label as "qubit A in the first state, qubit B in the second." So |01\rangle means "qubit A is in |0\rangle, qubit B is in |1\rangle." This is the computational basis for two qubits — the analogue of \{|0\rangle, |1\rangle\} for one qubit.
The four basis states as column vectors
Just as one-qubit basis states are \begin{pmatrix} 1 \\ 0 \end{pmatrix} and \begin{pmatrix} 0 \\ 1 \end{pmatrix}, the four two-qubit basis states are standard basis vectors of \mathbb{C}^4:
The ordering is not arbitrary — it is binary counting. Read the two-bit label as a binary number: 00 = 0, 01 = 1, 10 = 2, 11 = 3. The basis vector |ab\rangle is the column with a 1 in position (2a + b) and 0 everywhere else. This is the reason every textbook, paper, and piece of software lists the basis in this specific order — it matches the integer index of the classical bit-string the ket represents.
You can derive these columns directly from the tensor-product recipe. For example:
Why the Kronecker rule puts 1 in slot 2: the tensor product stacks "a_0 times the second ket" on top of "a_1 times the second ket." Here a_0 = 1, a_1 = 0, so the top half is |1\rangle = (0, 1)^T and the bottom half is the zero vector. That gives (0, 1, 0, 0)^T — a 1 in slot 2, zero elsewhere.
Do it for the other three combinations and you get exactly the four columns above. The tensor product is how the basis is built; the integer-index rule is how it is numbered.
The labelling convention — who is on the left?
Here is where a real confusion enters multi-qubit quantum computing, and where you must be careful whenever you read a new source.
When we write |01\rangle, which character refers to qubit 0 and which to qubit 1? There are two conventions, both in live use:
Convention A — "qubit 0 on the left" (big-endian, textbook convention). The leftmost character is the first qubit (often called qubit 0 or qubit A); the rightmost is the second qubit. This is the convention used in Nielsen & Chuang's textbook, in Preskill's lecture notes, in most academic papers, and throughout this wiki. If you write |01\rangle under this convention, you mean "qubit 0 is in state |0\rangle, qubit 1 is in state |1\rangle."
Convention B — "qubit 0 on the right" (little-endian, Qiskit convention). The rightmost character is qubit 0; the leftmost is the highest-indexed qubit. This matches how binary numbers are written in computer science: the least-significant bit on the right. IBM's Qiskit software stack — the most widely used open-source quantum programming framework — uses this. If you write |01\rangle in Qiskit, you mean "qubit 1 is in state |0\rangle, qubit 0 is in state |1\rangle."
The two conventions disagree whenever the qubits are not in the same state. Under big-endian, |01\rangle means "qubit 0 in |0\rangle, qubit 1 in |1\rangle." Under little-endian, the same symbols mean "qubit 0 in |1\rangle, qubit 1 in |0\rangle." These are physically different states. If you copy a matrix from N&C into a Qiskit simulator without translating, the simulator will compute the right linear algebra but apply it to the wrong physical configuration.
The conventions agree on three things, which is why confusion can persist for a while before you notice:
- The symbols |00\rangle and |11\rangle mean the same thing under both conventions — both qubits in the same state, so which is on the left does not matter.
- The dimension is 4 either way.
- The 4-by-4 matrices of two-qubit gates look the same, as long as everyone uses the same ordering for the basis.
But the matrix of a gate like CNOT (control on qubit 0, target on qubit 1) looks different from the matrix of CNOT (control on qubit 1, target on qubit 0), and the ordering convention controls which qubit sits in which matrix block.
The padho-wiki convention, matching N&C and Preskill: big-endian. In every article on this wiki, the leftmost character of a multi-qubit ket is qubit 0 (or qubit A), and the rightmost is qubit 1 (or qubit B). When we quote Qiskit code or refer to Qiskit output, we will note the translation explicitly.
Why the conventions diverge: big-endian matches mathematical ordering — you read left-to-right like reading English and the first symbol is the "first" qubit. Little-endian matches how computer scientists write binary numbers — the rightmost bit is the "ones place," the next is the "twos place," so the rightmost qubit is the least-significant one. Both traditions are internally consistent. The awkwardness is in translating between them, and the only fix is to check the convention every time you pick up a new source.
A general two-qubit state
With the basis nailed down, a general two-qubit state is a complex linear combination of the four basis vectors:
The four numbers \alpha_{00}, \alpha_{01}, \alpha_{10}, \alpha_{11} are amplitudes — each one complex. Writing this as a column vector using the basis ordering from above:
Four complex numbers means eight real parameters. But not all eight are physically meaningful. Two constraints cut them down:
Normalisation. The total probability of measuring any outcome is 1, and the probability of outcome |ij\rangle is |\alpha_{ij}|^2. So the four probabilities must sum to 1:
This is one real constraint on the eight real parameters, leaving seven.
Global phase is unobservable. The state e^{i\gamma}|\psi\rangle describes the same physical system as |\psi\rangle for any real \gamma. You can always multiply the whole vector by an overall phase and throw it away. That is one more real parameter eliminated.
So a generic two-qubit state has 8 - 1 - 1 = 6 physically meaningful real parameters. Compare this to a single qubit, which has 4 - 1 - 1 = 2 real parameters — exactly the two angles (\theta, \phi) of the Bloch sphere. The single qubit's two real parameters fit on a sphere; the two-qubit system's six do not fit on anything you can easily draw.
The amplitude table — the two-qubit bookkeeping habit
Because the four amplitudes are the whole story of the state, a useful habit is to keep an amplitude table: four rows, one per basis state, listing the amplitude and the probability for each.
Reading off the sample table: the state is
Each amplitude has modulus 1/2, so each probability is 1/4. The four probabilities sum to 1 — the normalisation condition — and the relative phases (+1, +i, -1, +i) are the part of the state that is not visible in the probability column but will matter the moment you apply another gate or measure in a non-computational basis.
Product states and the first glimpse of entanglement
There is a special class of two-qubit states: the ones that can be written as a tensor product of two single-qubit states. These are called product states (or separable states).
If you expand the tensor product using the Kronecker recipe, the four joint amplitudes are products of single-qubit amplitudes:
Why the expansion is just four multiplications: the tensor product is linear in both slots, so you distribute the sum over both factors and every term in the first sum pairs with every term in the second. Four pairings, four amplitudes.
So a product state has four amplitudes of the special form \alpha_{00} = a_0 b_0, \alpha_{01} = a_0 b_1, \alpha_{10} = a_1 b_0, \alpha_{11} = a_1 b_1. The four joint amplitudes are not independent: they are determined by four single-qubit amplitudes, which after normalisation is just two real parameters per qubit, four real parameters total — half of what a generic two-qubit state has.
Entangled states are the ones you cannot write this way. Their four amplitudes do not factor as products a_i b_j. The canonical example is
— the first of the Bell states. Try to factor it as (a_0|0\rangle + a_1|1\rangle) \otimes (b_0|0\rangle + b_1|1\rangle) and see what you need: a_0 b_0 = 1/\sqrt{2}, a_0 b_1 = 0, a_1 b_0 = 0, a_1 b_1 = 1/\sqrt{2}.
From a_0 b_1 = 0, either a_0 = 0 or b_1 = 0. If a_0 = 0, then a_0 b_0 = 0 \ne 1/\sqrt{2} — contradiction. If b_1 = 0, then a_1 b_1 = 0 \ne 1/\sqrt{2} — also a contradiction. No factorisation exists, so |\Phi^+\rangle is entangled. The full story of entanglement — its definition, its measurement signatures, why Einstein hated it — is in the entanglement defined article; here you just need the quick factor-or-fail recogniser.
The factorisation-cross-product test
There is a fast test for whether a two-qubit state is a product state. If |\psi\rangle = \alpha_{00}|00\rangle + \alpha_{01}|01\rangle + \alpha_{10}|10\rangle + \alpha_{11}|11\rangle is a product, then
Why: if \alpha_{ij} = a_i b_j, then \alpha_{00}\alpha_{11} = a_0 b_0 a_1 b_1 and \alpha_{01}\alpha_{10} = a_0 b_1 a_1 b_0, which equal the same product a_0 a_1 b_0 b_1. Any two-qubit state whose amplitudes obey this cross-product equation factors; any state where the two sides differ cannot.
Check it on a product: if |\psi\rangle = |+\rangle|0\rangle = \tfrac{1}{\sqrt{2}}(|00\rangle + |10\rangle), the amplitudes are (\alpha_{00}, \alpha_{01}, \alpha_{10}, \alpha_{11}) = (1/\sqrt{2}, 0, 1/\sqrt{2}, 0). The test: \alpha_{00}\alpha_{11} = (1/\sqrt{2}) \cdot 0 = 0 and \alpha_{01}\alpha_{10} = 0 \cdot (1/\sqrt{2}) = 0. Both are zero. The test passes — |+\rangle|0\rangle is a product, as it should be.
Check it on |\Phi^+\rangle: amplitudes (1/\sqrt{2}, 0, 0, 1/\sqrt{2}). Test: \alpha_{00}\alpha_{11} = 1/2, \alpha_{01}\alpha_{10} = 0. Not equal. Test fails — the state is entangled.
Example 1: from Dirac to 4-vector and back
Consider the state (in big-endian convention):
Step 1 — write the 4-vector. Read off the amplitudes in the order \alpha_{00}, \alpha_{01}, \alpha_{10}, \alpha_{11} and stack them:
Why: the Dirac expression names which amplitude multiplies which basis state. The column vector orders those amplitudes using the basis ordering |00\rangle, |01\rangle, |10\rangle, |11\rangle. Each Dirac coefficient goes into the slot of its basis state.
Step 2 — check normalisation. Each amplitude has modulus 1/2, so each probability is 1/4. Sum of probabilities: 4 \times 1/4 = 1. Normalised.
Step 3 — go back to Dirac from a column. Suppose someone hands you
Read each nonzero row: row 2 is |01\rangle with amplitude 1/\sqrt{2}; row 3 is |10\rangle with amplitude 1/\sqrt{2}. So
Result. You can move between Dirac and column-vector form just by knowing the basis ordering. The two notations carry the same information; pick the one that makes your next step easier. Column vectors are convenient for matrix multiplication; Dirac notation is convenient for reading and writing states by hand.
Example 2: product or entangled?
You are handed two states. For each one, decide whether it is a product state. If it is, write the factorisation.
State A: |\psi_A\rangle = \tfrac{1}{2}|00\rangle + \tfrac{1}{2}|01\rangle + \tfrac{1}{2}|10\rangle + \tfrac{1}{2}|11\rangle.
State B: |\psi_B\rangle = \tfrac{1}{\sqrt{2}}|00\rangle - \tfrac{1}{\sqrt{2}}|11\rangle.
State A — apply the cross-product test. Amplitudes (\alpha_{00}, \alpha_{01}, \alpha_{10}, \alpha_{11}) = (1/2, 1/2, 1/2, 1/2).
Both sides equal. Product state — so find the factorisation.
Find the factors. If |\psi_A\rangle = (a_0|0\rangle + a_1|1\rangle) \otimes (b_0|0\rangle + b_1|1\rangle), then a_i b_j = \alpha_{ij} for each pair. All four amplitudes equal 1/2, so a_0 b_0 = a_0 b_1 = a_1 b_0 = a_1 b_1 = 1/2. Setting a_0 = a_1 = 1/\sqrt{2} and b_0 = b_1 = 1/\sqrt{2} gives every product = 1/2. So
Why this factorisation is unique up to a global phase: the ratio a_0 / a_1 = (a_0 b_0)/(a_1 b_0) = \alpha_{00} / \alpha_{10} = 1, so qubit A is in an equal-amplitude state. Normalisation then fixes the magnitudes. The same argument fixes qubit B. Any other factorisation would just multiply one factor by a phase and the other by its inverse — same physical state.
State B — cross-product test. Amplitudes (\alpha_{00}, \alpha_{01}, \alpha_{10}, \alpha_{11}) = (1/\sqrt{2}, 0, 0, -1/\sqrt{2}).
-1/2 \ne 0, so the test fails. State B is entangled — this is in fact |\Phi^-\rangle, another Bell state.
Result. State A is a product state |++\rangle; State B is the entangled Bell state |\Phi^-\rangle. The cross-product test is the fastest recogniser — one multiplication per side, one comparison.
Common confusions
-
"Four basis states means four qubits." No. Four basis states means a 4-dimensional state space, which is the joint space of two qubits. The number of basis states is 2^n for n qubits — 2 basis states for 1 qubit, 4 for 2 qubits, 8 for 3, and so on. Do not confuse the size of the basis with the number of qubits.
-
"|01\rangle must mean qubit 0 is in state 0." Only under big-endian ordering. Under little-endian (Qiskit), |01\rangle means qubit 0 is in state 1. This is not a philosophical debate — it is a convention you have to look up for every source. When in doubt, read the paper's or software's conventions section.
-
"A general two-qubit state has 8 independent parameters." No. Start with 4 complex amplitudes (8 real parameters), then subtract 1 for normalisation and 1 for global phase. A generic two-qubit state has 6 physically meaningful real parameters — more than a qubit's 2, but fewer than the naive 8.
-
"Entanglement is a property of one of the qubits." No. Entanglement is a property of the joint state — of how the two qubits' amplitudes are correlated. A single qubit is never "entangled" on its own. It is entangled with another qubit. If you look at only one qubit from an entangled pair, it does not even have a pure quantum state of its own; it has a reduced density matrix that looks like a classical probability mixture.
-
"Measurement collapses a two-qubit state to a single qubit's outcome." Measurement of one qubit in the computational basis collapses the joint state to a state consistent with that outcome — the other qubit may now be in a different state than it was before (especially if the pair was entangled). The full story is in the projective measurement article; the summary is that measuring one qubit of an entangled pair updates the state of the other, which is what makes Bell correlations remarkable.
Going deeper
If you are here to understand what the computational basis for two qubits looks like and how to recognise a product state, you have it. The rest of this article takes you into multi-qubit generalisation, Dirac-versus-integer notation, and the practical consequences of the 2^n blowup that makes quantum computing interesting in the first place.
Ordering-convention pitfalls
Even once you know which convention a source uses, the mistakes that actually happen in practice are:
-
Copying a matrix without translating. If a textbook gives you a CNOT matrix assuming big-endian and you paste it into a Qiskit
UnitaryGate, Qiskit will interpret the matrix in little-endian order and apply what is effectively a CNOT with the control and target swapped. The fix is to either reorder the rows and columns (|01\rangle and |10\rangle swap places) or applyqiskit.quantum_info.Operator.reverse_qargs()before use. -
Reading a simulator output bitstring.
result.get_counts()in Qiskit returns keys like'01'— and those keys are in reverse order of the qubit indices. The rightmost character is qubit 0. A simulator that says most counts are on'01'is saying most counts are on (qubit 1 = 0, qubit 0 = 1), which in big-endian notation is the state |10\rangle. Every experienced Qiskit user has been bitten by this once. -
Mixing conventions within a single derivation. If you start a calculation in big-endian (the tensor factor on the left is qubit 0) and then quote a Qiskit matrix halfway through without flipping it, the linear algebra is wrong and the error is extremely easy to miss because the symbols |01\rangle and |01\rangle look identical in both conventions.
The discipline: pick one convention at the top of your working, say what it is, and do not switch without saying so.
The multi-qubit computational basis — \{0, 1\}^n \to 2^n
Generalise the two-qubit story to n qubits. The basis states are labelled by the 2^n bit-strings of length n:
This is a set of 2^n orthonormal basis vectors, and a general n-qubit state is a complex linear combination of all of them, with a normalisation constraint. The number of complex amplitudes doubles for each additional qubit:
| qubits | basis states | complex amplitudes | real parameters (after norm + phase) |
|---|---|---|---|
| 1 | 2 | 2 | 2 |
| 2 | 4 | 4 | 6 |
| 3 | 8 | 8 | 14 |
| 4 | 16 | 16 | 30 |
| 10 | 1,024 | 1,024 | 2,046 |
| 20 | 1,048,576 | ~10⁶ | ~2 × 10⁶ |
| 50 | ~10¹⁵ | ~10¹⁵ | ~2 × 10¹⁵ |
| 100 | ~10³⁰ | ~10³⁰ | ~10³⁰ |
This is the famous 2^n state-space explosion. It is why a classical simulator cannot store the state of 60 fully arbitrary qubits — you would need roughly 2^{60} \approx 10^{18} complex numbers, which is past the storage of even the largest supercomputers. And it is why Feynman's 1982 argument for quantum simulation of quantum systems makes sense: let the quantum hardware itself store the 2^n amplitudes, and you skip the classical impossibility.
But beware — the 2^n number is the size of the description, not the amount of classical work the algorithm saves. A quantum computer does not perform 2^n operations in parallel. It manipulates a vector in a 2^n-dimensional space using a polynomial number of gates, and measurement at the end collapses the vector to a single outcome. The advantage, when it exists, comes from interference concentrating amplitude on a useful answer — not from reading out all 2^n branches (you never read more than n bits).
Dirac notation vs binary integer notation — the |5\rangle = |101\rangle shorthand
For multi-qubit systems it is often convenient to write a basis state using its integer index instead of its bit-string. The state |5\rangle in a 3-qubit system is the basis state at index 5, which in binary is 101:
This is especially useful when you want to write a superposition like the output of a Hadamard tower on |00\cdots 0\rangle:
The sum is over the integer indices x from 0 to 2^n - 1, and each |x\rangle is shorthand for the bit-string of length n representing x.
Watch the conventions again. Whether |5\rangle in a 3-qubit system means "qubit 0 = 1, qubit 1 = 0, qubit 2 = 1" or the reverse depends on — you guessed it — whether the bit-string is big-endian or little-endian. Qiskit writes the integer with qubit 0 as the least-significant bit, so |5\rangle in Qiskit means qubit 0 = 1, qubit 1 = 0, qubit 2 = 1 (the string '101' read right-to-left). Textbooks more often treat qubit 0 as the most-significant bit, giving the opposite physical configuration.
Indian context — NISQ hardware sizes and what 2^n looks like on real chips
Where does the two-qubit basis sit in the current generation of quantum hardware?
- 2–5 qubit devices (early IBM Quantum Experience, 2016–2017): 4 to 32 basis states. Enough to run the Deutsch algorithm, the Deutsch-Jozsa algorithm, small Bell-state experiments. A state vector fits on a pocket calculator.
- 20–50 qubit devices (IBM Manhattan, Rigetti Aspen-series, 2019–2020): up to 2^{50} \approx 10^{15} basis states. State vectors are past laptop-memory sizes but still tractable on supercomputers.
- ~100 qubit devices (IBM Eagle 127, IBM Heron, Google Willow 105, 2022–2024): 2^{100} basis states, a number past the estimated count of atoms in a small human. No classical simulator can store a generic state at this scale.
- 1000+ physical qubit devices (announced roadmaps from IBM, Google, PsiQuantum, Quantinuum): 2^{1000} basis states. Past the number of atoms in the observable universe, many times over.
Indian groups are squarely in this conversation. TIFR Mumbai has demonstrated superconducting qubit fabrication. IIT Madras has a trapped-ion group working on few-ion quantum processors. ISRO's satellite QKD experiments are quantum communication rather than computation, but the underlying qubit hardware is the same. The National Quantum Mission (NQM), launched in 2023 with a budget of ₹6000 crore, explicitly targets 50-to-1000-qubit devices by 2031.
What you use a 2-qubit chip for is very different from a 100-qubit chip: on 2 qubits you verify Bell-state violations (experiments that confirmed quantum mechanics against Einstein's objections); on 100 qubits you run quantum-simulation benchmarks that no classical machine can keep up with. Every step up the qubit count is a new regime of possibilities — and every step also doubles the physical hardware you need to build, cool, control, and error-correct. The curriculum's later chapters on NISQ, error correction, and fault-tolerance trace this trajectory in detail.
Where this leads next
- CNOT gate — the canonical two-qubit gate, the one that turns product states into entangled ones.
- Controlled-U gates — generalising CNOT to any unitary on the target, the building blocks of every quantum algorithm.
- Bell states — the four maximally-entangled two-qubit states, the archetypes of quantum correlation.
- Entanglement defined — a careful treatment of what "no factorisation exists" really means and why it matters.
- Tensor products the quantum way — the linear-algebra operation that builds multi-qubit spaces out of single-qubit ones.
- SWAP and iSWAP — moving two-qubit information around a chip with limited connectivity.
References
- Nielsen and Chuang, Quantum Computation and Quantum Information (2010), §2.1.7 (computational basis states) and §2.2.8 (composite systems) — Cambridge University Press.
- John Preskill, Lecture Notes on Quantum Computation, Ch. 2 — theory.caltech.edu/~preskill/ph229.
- Qiskit Textbook, Representing Qubit States — the Qiskit little-endian convention is documented in the multi-qubit sections.
- IBM Quantum Learning, Multiple Systems — composite systems and the tensor-product construction with worked examples.
- Wikipedia, Qubit — Multiple qubits — the basis of an n-qubit register.
- John Watrous, The Theory of Quantum Information (2018), Ch. 1 — cs.uwaterloo.ca/~watrous/TQI — formal treatment of multipartite state spaces.