Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Complex vectors, Dirac notation and the Bloch sphere

Clear study notes on complex vectors, Dirac (bra–ket) notation and the Bloch sphere for single-qubit states, with definitions, derivations, formulas and exam-style worked examples.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Quantum information is encoded in vectors with complex components. Engineers use complex vectors, Dirac notation and the Bloch sphere when designing, analysing and simulating single-qubit operations, measurements and state preparation on hardware (superconducting qubits, trapped ions, photonic qubits, etc.). These concepts are the foundation for single-qubit gates, tomography and understanding noise in quantum circuits.

Key ideas

  • Bra: the symbol ⟨ψ| denotes the bra, the conjugate transpose (Hermitian transpose) of |ψ⟩. If |ψ⟩ = [α, β]^T then ⟨ψ| = [α* , β*]. Here * denotes complex conjugation.

  • Inner product: for kets |φ⟩ and |ψ⟩, the inner product is ⟨φ|ψ⟩ = sum of the conjugate of φ's components times ψ's components. It is linear in the second argument and conjugate-linear in the first.

  • Norm and normalization: the (Euclidean) norm of |ψ⟩ is sqrt(⟨ψ|ψ⟩). A normalized state satisfies ⟨ψ|ψ⟩ = 1. For a qubit α and β must satisfy |α|^2 + |β|^2 = 1.

  • Orthonormal basis: { |0⟩, |1⟩ } is an orthonormal basis: ⟨0|0⟩ = ⟨1|1⟩ = 1 and ⟨0|1⟩ = ⟨1|0⟩ = 0.

  • Outer product and projectors: the outer product |ψ⟩⟨φ| is a 2×2 matrix; projectors onto basis states are Π_0 = |0⟩⟨0| and Π_1 = |1⟩⟨1|, and completeness is I = |0⟩⟨0| + |1⟩⟨1|.

  • Probability amplitude and measurement: if a system is in |ψ⟩ and we measure in the {|φ_i⟩} orthonormal basis, the probability of outcome i is |⟨φ_i|ψ⟩|^2. This is a central postulate used in quantum circuits and experiments. Equivalently, with projector Π_i = |φ_i⟩⟨φ_i|, Pr(i) = ⟨ψ|Π_i|ψ⟩.

  • Global and relative phase: multiplying a state by a global phase e^{iγ} does not change measurement probabilities; it is physically unobservable. Relative phase between components is observable (interference).

  • Bloch-sphere representation (pure single-qubit states): any normalized single-qubit pure state can be written (up to a global phase) as |ψ⟩ = cos(θ/2) |0⟩ + e^{iφ} sin(θ/2) |1⟩, with 0 ≤ θ ≤ π and 0 ≤ φ < 2π. The pair (θ, φ) are spherical coordinates on the Bloch sphere.

    • Derivation (standard, show in exams): start from |ψ⟩ = α|0⟩ + β|1⟩ with |α|^2 + |β|^2 = 1. Factor a global phase γ so that α = e^{iγ} |α|; choose γ = −arg(α) to make α real and non-negative. Then write |α| = cos(θ/2) with θ in [0, π]. Let β/α = |β|/|α| e^{iφ}; after factoring the global phase, β becomes e^{iφ} sin(θ/2). This gives the Bloch form. If α = 0, choose γ = −arg(β) to fix the global phase and set θ = π; φ can be taken arbitrary (conventionally φ = 0), since |ψ⟩ is then proportional to |1⟩.

    • Bloch vector coordinates: the 3D real vector r = (x, y, z) corresponding to |ψ⟩ is x = sin θ cos φ, y = sin θ sin φ, z = cos θ. Equivalently, for |ψ⟩ = [α, β]^T with |α|^2 + |β|^2 = 1, x = 2 Re(αβ), y = 2 Im(αβ), z = |α|^2 − |β|^2; for pure states |r| = 1.

    • Diagram (what to draw for exams): draw a unit sphere with three labelled orthogonal axes +x (to the right), +y (to the back or up depending on page), +z (vertical up). Mark north pole as |0⟩ (θ = 0) and south pole as |1⟩ (θ = π). Draw a vector from origin to the surface at polar angle θ from +z and azimuthal angle φ measured from +x towards +y; label θ and φ clearly and mark coordinates (x,y,z) on the sphere.

  • Pauli matrices (often used with Bloch vectors): define σ_x, σ_y, σ_z as the 2×2 Hermitian matrices used to describe rotations and observables for a qubit. These are exact matrix forms universities require to be memorised.

Note: Include the single-qubit density-operator Bloch form ρ = (I + r·σ)/2 here for completeness. For a physical ρ, r ∈ R^3 with |r| ≤ 1 and r = (Tr(ρσ_x), Tr(ρσ_y), Tr(ρσ_z)); |r| = 1 iff ρ is pure.

Formulas

|ψ⟩ = α|0⟩ + β|1⟩ — α, β are complex amplitudes; dimensionless; applies to single-qubit pure states.

⟨ψ| = (|ψ⟩)† — bra is Hermitian transpose of ket; † means conjugate transpose; dimensionless.

⟨φ|ψ⟩ = Σ_i φ_i* ψ_i — inner product; dimensionless; applies to any complex vectors.

⟨ψ|ψ⟩ = |α|^2 + |β|^2 = 1 — normalization condition; dimensionless; applies to quantum state vectors.

Pr(measure outcome |φ⟩) = |⟨φ|ψ⟩|^2 — measurement probability; dimensionless, between 0 and 1; applies to projective measurements in orthonormal basis.

|ψ⟩ = cos(θ/2)|0⟩ + e^{iφ} sin(θ/2)|1⟩ — Bloch-sphere parametrisation; θ ∈ [0, π], φ ∈ [0, 2π).

x = sin θ cos φ, y = sin θ sin φ, z = cos θ — Bloch vector coordinates; dimensionless; applies to pure single-qubit states.

σ_x = [[0, 1], [1, 0]] — Pauli X matrix; unitless matrix acting on qubit state.

σ_y = [[0, -i], [i, 0]] — Pauli Y matrix; unitless.

σ_z = [[1, 0], [0, -1]] — Pauli Z matrix; unitless.

ρ = (I + r·σ) / 2 — Bloch form of the single-qubit density matrix; ρ is unitless, Hermitian, positive semidefinite, trace 1; |r| ≤ 1 and r = (Tr(ρσ_x), Tr(ρσ_y), Tr(ρσ_z)) with |r| = 1 iff ρ is pure.

Worked examples

  1. Normalise a complex vector

    Question: Normalise the vector v = [1 + i, 2]^T and write it as a ket.

    Steps:

    1. Compute squared norm: |1 + i|^2 + |2|^2 = (1^2 + 1^2) + 4 = 2 + 4 = 6.
    2. Norm = sqrt(6).
    3. Normalised vector = [ (1 + i)/sqrt(6), 2/sqrt(6) ]^T.

    Final answer: |ψ⟩ = ((1 + i)/√6) |0⟩ + (2/√6) |1⟩.

  2. Map a ket to Bloch-sphere coordinates

    Question: Given |ψ⟩ = cos(π/6)|0⟩ + e^{iπ/4} sin(π/6)|1⟩, find the Bloch vector (x, y, z).

    Steps:

    1. Identify θ/2 = π/6 → θ = π/3; identify φ = π/4.
    2. Compute sin θ = sin(π/3) = √3/2 ≈ 0.8660254.
    3. Compute cos φ = cos(π/4) = √2/2 ≈ 0.7071068; sin φ = same.
    4. x = sin θ cos φ ≈ 0.8660254 * 0.7071068 ≈ 0.612372.
    5. y = sin θ sin φ ≈ 0.612372.
    6. z = cos θ = cos(π/3) = 1/2 = 0.5.

    Final answer: r ≈ (0.612372, 0.612372, 0.5).

  3. Probability of measuring |0⟩

    Question: For |ψ⟩ = (1/√3)|0⟩ + √(2/3) e^{iπ/3} |1⟩, find probability of outcome |0⟩.

    Steps:

    1. ⟨0|ψ⟩ = 1/√3 (coefficient of |0⟩).
    2. Probability = |⟨0|ψ⟩|^2 = |1/√3|^2 = 1/3.

    Final answer: Probability = 1/3.

Common mistakes

  • Confusing global and relative phase: thinking e^{iγ}|ψ⟩ changes measurement outcomes.
  • Using θ instead of θ/2 in the Bloch parametrisation (common sign/half-angle error).
  • Wrong signs or factors of i in Pauli Y matrix (σ_y = [[0, -i], [i, 0]] is exact).
  • Not labelling θ and φ correctly on the Bloch-sphere diagram (θ measured from +z, φ measured in x–y plane from +x towards +y).

For your exam

Kinds of questions you will see:

  • Definitions: define bra, ket, inner product, normalization, global vs relative phase, Bloch sphere.
  • Short notes: explain Bloch-sphere parametrisation and draw the sphere; include θ and φ and examples of poles.
  • Derivations: show how any normalized qubit can be written as cos(θ/2)|0⟩ + e^{iφ} sin(θ/2)|1⟩ (do the multiplication by a global phase step explicitly).
  • Numericals: normalise vectors, compute probabilities, map between amplitudes and Bloch angles, compute Pauli matrix action on a state.
  • Diagrams: draw a Bloch sphere, mark |0⟩ and |1⟩, a vector with θ and φ; label axes x, y, z.

What a full-marks answer includes:

  • Clear definitions with bolded terms (bra, ket, inner product).
  • Correct algebra with conjugation shown for bras.
  • Verification of normalization and allowed ranges for θ, φ.
  • Correct diagram: unit sphere, coordinate axes labelled, poles labelled |0⟩ and |1⟩, vector drawn from origin, angles labelled.
  • For derivations, the step of choosing the global phase to make α real and non-negative must be explicit.

Quick check

  1. What is ⟨1| (α|0⟩ + β|1⟩)?
  2. How does the Bloch angle θ relate to the amplitudes α and β?
  3. What is the matrix form of σ_y?

Answers: 1) β (or more precisely β, the complex number); 2) |α| = cos(θ/2), |β| = sin(θ/2) up to a global phase; 3) [[0, -i], [i, 0]].

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?