A state vector is a Python list of complex amplitudes representing a quantum state in a chosen computational basis. Each list index identifies an outcome, while the squared magnitude of its amplitude gives that outcome’s probability. section 3.0 section 4.2.1
For one qubit, the list has two amplitudes; for two qubits, it has four, corresponding to 00, 01, 10, and 11. A valid two-qubit vector has squared magnitudes that sum to 1. section 3.0 section 4.2.1
Encoding and composing states
A two-qubit state can be generated from probabilities and phases: state = [sqrt(p) * (cos(theta) + 1j*sin(theta)) for (p, theta) in zip(probs, angles)]. Independent single-qubit states combine by multiplying their amplitudes pairwise, producing a four-entry product state. section 4.2.1
Bell-state vectors
The vectors [sqrt(0.5), 0.0, 0.0, sqrt(0.5)] and [sqrt(0.5), 0.0, 0.0, -sqrt(0.5)] provide two concrete two-qubit state representations with different amplitude signs. section 4.2.1
Figure 3.1 A dependency diagram of concepts introduced in this chapter
Use the dependency diagram to navigate how state vectors connect single-qubit states, gates, circuits, and simulation. section 3.0
