Overview
Curated: · Written: · Reviewed:
Qubits, Superposition & Quantum State Representation
In one line
A qubit state is a normalized complex vector α|0⟩ + β|1⟩ written in a stated basis. Reach for this description when you must predict measurement statistics, decide whether two states are the same, or size a simulator.
Key definitions
- Amplitude: a complex coefficient. Its squared magnitude is a probability; its phase is not.
- Normalization: |α|² + |β|² = 1, so the outcome probabilities sum to one.
- Global phase: a common factor e^{iφ} on every amplitude. It never changes a measurement probability.
- Relative phase: the phase of one amplitude against another. Interference depends on it.
- Inner product ⟨φ|ψ⟩: conjugates the bra. The probability of outcome φ is |⟨φ|ψ⟩|².
- Bloch sphere: pure single-qubit states as points on a unit sphere, after dropping normalization and global phase.
Formulas and complexity
Quote these: 21 qubits in complex64 is 2^21 × 8 bytes = 16 MiB. A 30-qubit statevector in complex128 is 17.2 GB. A 17-qubit density matrix in complex128 costs the same 275 GB as a 34-qubit statevector.
How it works
Fix the basis first. The state is then a vector of complex amplitudes. Gates are unitaries that rotate that vector and shift relative phases. Measuring in a basis returns one outcome with probability |amplitude|², and the state becomes that basis vector. Interference is what cancels amplitudes for wrong answers before measurement.
Worked check: start from (1/2)|0⟩ + (√3/2)|1⟩, apply H, apply a phase of π/3 to the |1⟩ amplitude, then apply H again. The probability of reading 0 is 3/8. Work it through the amplitudes, not the counts.
When to use and when not to
| Situation | Representation | Why |
|---|---|---|
| Ideal pure circuit, n up to about 30 | Statevector, 2^n amplitudes | Exact amplitudes; memory is the limit |
| Noise, mixed preparation, subsystem reduction | Density matrix, 4^n entries | Practical to about 15 qubits on the same hardware |
| Clifford-only circuit | Stabilizer | Polynomial cost; fails on any T gate |
| One qubit, teaching or visualization | Bloch sphere | Two angles; cannot show entanglement |
| Entangled multi-qubit state | No single Bloch sphere | The joint state does not factor |
Traps interviewers probe
- Calling 50/50 counts a fair coin. Counts in one basis cannot separate |+⟩ from an equal mixture of |0⟩ and |1⟩. Fix: name the second basis that does, the X basis, where |+⟩ reads 0 every time.
- Treating global phase as observable. Fix: compare |⟨ψ1|ψ2⟩|² with 1 inside a stated tolerance, not elementwise with np.allclose.
- Dropping the conjugate. A plain dot product gives complex or negative probabilities. Fix: use the adjoint or vdot, and test with an imaginary amplitude.
- Silent bit reversal. Qiskit's statevector index is little-endian, so q0 is the rightmost bit of the key. Fix: test an asymmetric state, such as X on one qubit of three, against hand-computed indices.
- Saying no-cloning forbids CNOT. CNOT copies basis states only. On α|0⟩ + β|1⟩ it produces entanglement, not a copy.
Interview tips
Open with: "A qubit is a normalized complex vector over a stated basis. Squared magnitudes give the outcome probabilities, and relative phase is what interference uses."
Follow-ups to expect:
- Are two states that both measure 50/50 the same? Not necessarily. Name the basis that separates them.
- Why is global phase unobservable? It cancels in |e^{iφ}c|².
- Derive the measurement rule. P(φ) = |⟨φ|ψ⟩|², and orthonormal bases make these sum to one.
- Can you draw an entangled pair on the Bloch sphere? No. The joint state does not factor.
- Why no exponential parallelism? Measurement returns n bits, so algorithms must arrange interference that cancels wrong answers.
30-second outline:
- Define the state: normalized complex amplitudes over a named basis.
- State the measurement rule: outcome probability is the squared magnitude of the overlap.
- Give the phase point: 50/50 in one basis does not identify the state; relative phase shows up in a second basis.
- Close with the cost: 2^n amplitudes, so the simulator choice depends on what the circuit's structure allows.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.