Chapter 3
Quantum States, Measurement and Information
Diploma in Quantum Computing
Quantum Programming and Simulation
•
Diploma
Quantum States, Measurement and Information
Introduction
Quantum programming requires a precise description of information before, during, and after a computation. In classical computing, a bit is either 0 or 1. A qubit may occupy a superposition of basis states, and the result obtained from a measurement is probabilistic. This does not mean that quantum mechanics is merely random: the probability distribution is determined exactly by the qubit’s state and the measurement basis.
This chapter develops the mathematical and practical foundations needed to represent quantum states, calculate measurement probabilities, change bases, and interpret experimental samples. The emphasis is on single-qubit and small multi-qubit systems suitable for diploma-level quantum programming and simulation.
Learning Objectives
By the end of this chapter, you should be able to:
represent single- and multi-qubit states with state vectors;
interpret the Bloch-sphere representation;
distinguish global phase from relative phase;
calculate Born probabilities and post-measurement states;
explain observables, eigenvalues, eigenvectors, and basis changes;
distinguish pure states from mixed states using density matrices;
interpret finite samples from a quantum simulator or device;
identify practical sources of disagreement between ideal probabilities and observed counts.
1. State Vectors and Quantum Information
A quantum state is a mathematical description of the information available about a quantum system. For a qubit, the computational basis consists of the orthonormal states |0⟩ and |1⟩. A general pure qubit state is
|ψ⟩ = α|0⟩ + β|1⟩
where α and β are generally complex probability amplitudes. Normalisation requires
|α|² + |β|² = 1
Here, |α|² and |β|² are real numbers obtained by multiplying each amplitude by its complex conjugate. They are probabilities only when measuring in the computational basis.
In column-vector notation,
|0⟩ = [1, 0]ᵀ, |1⟩ = [0, 1]ᵀ, |ψ⟩ = [α, β]ᵀ
The symbol T denotes transpose. A complex conjugate transpose is written †. The inner product of a state with itself is ⟨ψ|ψ⟩, and a valid state satisfies ⟨ψ|ψ⟩ = 1.
For n qubits, the computational basis contains 2ⁿ states:
|ψ⟩ = ∑x=02ⁿ−1 cx|x⟩, ∑x=02ⁿ−1|cx|² = 1
The basis label x is usually written as an n-bit string. For two qubits, the ordered basis is commonly |00⟩, |01⟩, |10⟩, |11⟩. Thus, a two-qubit state is a four-component vector. The ordering must be documented in software because reversing qubit significance changes how amplitudes are interpreted.
Worked example: a two-qubit state
Consider
|ψ⟩ = (1/√2)|00⟩ + (i/2)|01⟩ + (1/2)|11⟩
The state is normalised because
|1/√2|² + |i/2|² + |1/2|² = 1/2 + 1/4 + 1/4 = 1
The probability of obtaining 00, 01, 10, or 11 in a computational-basis measurement is respectively 1/2, 1/4, 0, and 1/4.
2. Global and Relative Phase
Complex amplitudes contain both magnitude and phase. A phase factor has the form e^{iφ}, where φ is real and i² = −1. Multiplying an entire state by the same phase gives
|ψ'⟩ = eiφ|ψ⟩
This is a global phase. It does not change any measurement probability, because
|eiφα|² = |α|²
Consequently, |0⟩ and −|0⟩ describe the same physical state for ordinary measurement predictions.
A relative phase is different. The states
|+⟩ = (|0⟩ + |1⟩)/√2, |−⟩ = (|0⟩ − |1⟩)/√2
produce identical computational-basis probabilities: one-half for 0 and one-half for 1. However, they produce different results after a Hadamard transformation. Since H|+⟩ = |0⟩ and H|−⟩ = |1⟩, the relative minus sign is physically observable through interference.
This distinction is central to quantum programming. A simulator that stores only probabilities cannot reproduce quantum algorithms, because it loses relative phase information.
3. The Bloch-Sphere Model
Every pure single-qubit state can be expressed, apart from a global phase, as
|ψ⟩ = cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩
where 0 ≤ θ ≤ π is the polar angle and 0 ≤ φ < 2π is the azimuthal angle. The corresponding Bloch vector is
r = (sin θ cos φ, sin θ sin φ, cos θ)
The north pole represents |0⟩, the south pole represents |1⟩, and the equator contains equal-magnitude superpositions. The states |+⟩ and |−⟩ lie on opposite sides of the x-axis; the states (|0⟩ + i|1⟩)/√2 and (|0⟩ − i|1⟩)/√2 lie on opposite sides of the y-axis.
Bloch sphere showing computational basis poles and equatorial states
Figure: Bloch sphere showing computational basis poles and equatorial states
Figure: The Bloch sphere maps a pure qubit state to a point on the unit sphere. The red arrow is an illustrative state vector.
The Bloch sphere is a geometric model, not a replacement for the state vector in multi-qubit systems. General n-qubit states require 2ⁿ complex amplitudes, whereas a single qubit can be visualised with three real coordinates.
4. Measurement and the Born Rule
A measurement is described by possible outcomes and operators associated with those outcomes. For a projective measurement with projector P_m, the probability of outcome m for state |ψ⟩ is
p(m) = ⟨ψ|Pm|ψ⟩
The projectors satisfy P_m² = P_m, P_m† = P_m, and ∑_m P_m = I. For computational-basis measurement, P_0 = |0⟩⟨0| and P_1 = |1⟩⟨1|. Therefore, for |ψ⟩ = α|0⟩ + β|1⟩,
p(0) = |α|², p(1) = |β|²
These probabilities are called Born probabilities. They describe an ideal, immediately repeated experiment under identical preparation and measurement conditions.
Measurement in another basis
A measurement need not use the computational basis. The X basis is {|+⟩, |−⟩}, where
|+⟩ = (|0⟩ + |1⟩)/√2, |−⟩ = (|0⟩ − |1⟩)/√2
The probability of obtaining + is |⟨+|ψ⟩|² and that of obtaining − is |⟨−|ψ⟩|². In a circuit, an X-basis measurement can be implemented by applying H and then measuring in the computational basis. This works because H maps |+⟩ to |0⟩ and |−⟩ to |1⟩.
For a general orthonormal basis {|u₀⟩, |u₁⟩}, the state may be expanded as
|ψ⟩ = γ₀|u₀⟩ + γ₁|u₁⟩
and the probabilities are |γ₀|² and |γ₁|². Basis changes therefore alter the probability distribution without changing the physical state itself.
5. Observables and Expectation Values
An observable is represented by a Hermitian operator A, meaning A† = A. Its eigenvalues are possible measurement values, and its orthonormal eigenvectors define the corresponding measurement basis. The expectation value in state |ψ⟩ is
⟨A⟩ = ⟨ψ|A|ψ⟩
This is the long-run average of repeated measurements, not necessarily a value obtained in any one run. For the Pauli operators,
X = [0, 1; 1, 0], Y = [0, −i; i, 0], Z = [1, 0; 0, −1]
The eigenvalues of each Pauli operator are +1 and −1. A Z measurement distinguishes |0⟩ and |1⟩; an X measurement distinguishes |+⟩ and |−⟩. For a pure state with Bloch vector r = (r_x, r_y, r_z),
⟨X⟩ = rx, ⟨Y⟩ = ry, ⟨Z⟩ = rz
For an observable with outcomes a_j and projectors P_j, the expectation may also be written
⟨A⟩ = ∑j aj p(j)
6. State Collapse and Conditional States
In the ideal projective measurement model, if outcome m is observed, the state immediately after measurement becomes
|ψm⟩ = Pm|ψ⟩ / √p(m)
provided p(m) is nonzero. The denominator normalises the post-measurement state. This is called state collapse or state projection.
For example, measuring |ψ⟩ = √0.7|0⟩ + √0.3|1⟩ in the computational basis gives outcome 0 with probability 0.7 and leaves the system in |0⟩. If outcome 1 occurs, the state becomes |1⟩. A second immediate measurement in the same basis returns the same result in the ideal model.
Collapse should not be interpreted as a classical observer simply discovering a pre-existing definite bit. In a superposition, the measurement basis and physical interaction determine which alternatives can be distinguished. In practical systems, environmental interactions can also cause decoherence, which suppresses observable interference without requiring a deliberate measurement by a human.
7. Mixed States and Density Matrices
A state vector describes a pure state: maximal knowledge of the quantum preparation. A mixed state represents classical uncertainty about which pure state was prepared, or a subsystem of an entangled state. Mixed states are represented by density matrices.
For an ensemble containing state |ψ_k⟩ with classical probability q_k,
ρ = ∑k qk|ψk⟩⟨ψk|, qk ≥ 0, ∑k qk = 1
A valid density matrix is Hermitian, positive semidefinite, and has trace one. The probability of outcome m is
p(m) = Tr(ρPm)
and the expectation value is
⟨A⟩ = Tr(ρA)
For a pure state, ρ = |ψ⟩⟨ψ| and Tr(ρ²) = 1. For a genuinely mixed state, Tr(ρ²) < 1. The quantity Tr(ρ²) is called purity.
Example: two ensembles with different physical content
The pure state |+⟩ has density matrix
ρ_+ = 1/2 [1, 1; 1, 1]
An equal classical mixture of |0⟩ and |1⟩ has density matrix
ρmix = 1/2|0⟩⟨0| + 1/2|1⟩⟨1| = 1/2 [1, 0; 0, 1]
Both give 50% zeros and 50% ones in the computational basis. However, ρ_+ gives the result + with certainty in the X basis, whereas ρ_mix gives + and − with equal probability. Thus, density matrices retain information about coherence that cannot be seen in only one measurement basis.
For a single qubit, every density matrix can be expressed as
ρ = 1/2(I + rxX + ryY + rzZ)
where the Bloch vector satisfies |r| ≤ 1. Equality holds for pure states; strict inequality indicates a mixed state. The maximally mixed state has r = 0 and is ρ = I/2.
8. Multi-Qubit States and Entanglement
The joint state of independent systems is represented by the tensor product. If qubit A is |a⟩ and qubit B is |b⟩, their joint state is |a⟩⊗|b⟩, usually written |ab⟩. For example,
|+⟩⊗|1⟩ = (|01⟩ + |11⟩)/√2
A state is separable if it can be written as |a⟩⊗|b⟩. The Bell state
|Φ⁺⟩ = (|00⟩ + |11⟩)/√2
cannot be written as a product of two single-qubit states and is therefore entangled. Computational-basis measurement gives 00 and 11 with equal probabilities, while 01 and 10 never occur. The individual qubits each appear maximally random, but their results are perfectly correlated.
For a subsystem described by density matrix ρ_AB, the state of subsystem A is obtained by the partial trace:
ρA = TrB(ρAB)
For |Φ⁺⟩, ρ_A = I/2. This demonstrates an important distinction: a global pure state can have mixed local states.
9. Sampling and Interpreting Measurement Results
Quantum software generally estimates probabilities by repeated shots. If an outcome has ideal probability p and is measured N times, the count K is commonly modelled as binomial:
K ~ Binomial(N, p)
The observed frequency is
p̂ = K/N
For independent shots, its standard deviation is
σp̂ = √[p(1−p)/N]
This is a sampling uncertainty, not an error in the underlying quantum state. The standard deviation is largest near p = 0.5 and decreases as N increases. For several mutually exclusive outcomes, the counts follow a multinomial distribution rather than separate independent binomial distributions.
Worked sampling example
Suppose an ideal circuit predicts p(1) = 0.25 and is executed for N = 1,000 shots. If 267 ones are observed, then
p̂ = 267/1000 = 0.267
Using the ideal probability to estimate shot noise,
σp̂ = √[0.25(0.75)/1000] ≈ 0.0137
The difference 0.017 is approximately 1.24 standard deviations, which is not surprising under ordinary statistical variation. A professional analysis should not conclude that the circuit is faulty from this result alone. Hardware noise, readout bias, gate error, drift, and incorrect qubit-order conventions must also be considered.
In a simulator, a state-vector mode returns amplitudes and can calculate exact ideal probabilities. A shot-based mode samples from those probabilities. These are different outputs: the first is a model description, while the second imitates repeated experimental observations.
10. Applied Case: Diagnosing a Phase-Sensitive Circuit
Background
A training laboratory prepares one qubit in either |+⟩ or |−⟩ and asks students to identify the preparation. A computational-basis measurement alone produces equal numbers of zeros and ones for both states.
Problem
A student reports that the two preparations are indistinguishable because both produce approximately 50% zeros and 50% ones.
Analysis
The student has measured only in the Z basis. The states differ by relative phase, which is invisible in that basis. The laboratory therefore adds a Hadamard gate before the computational-basis measurement. Since H|+⟩ = |0⟩ and H|−⟩ = |1⟩, the additional basis change converts relative phase into a measurable population difference.
Approach and solution
The circuit is:
prepare |+⟩ or |−⟩;
apply H;
measure in the computational basis;
repeat for a sufficiently large number of shots.
Ideally, |+⟩ produces only 0 and |−⟩ produces only 1. On real hardware, small numbers of opposite results may occur because of gate and readout errors. The experiment should include calibration data and report counts, shot number, and measurement basis.
Outcome
The preparation can be identified reliably after the basis change. The case demonstrates that probabilities are basis-dependent, global phase is unobservable, relative phase affects interference, and a measurement result must always be interpreted with reference to the measurement procedure.
Learning points
Equal probabilities in one basis do not imply identical quantum states.
Basis changes can expose phase information.
Finite samples should be distinguished from ideal probabilities.
Experimental conclusions require documentation of circuits, qubit ordering, shots, and calibration conditions.
11. Implementation Practices and Limitations
When programming a simulator or quantum device, adopt the following practices:
State the basis ordering explicitly, especially for multi-qubit vectors.
Check normalisation after state preparation and numerical operations.
Separate amplitudes, probabilities, counts, and expectation values in variable names and reports.
Record the measurement basis and number of shots.
Use density matrices when modelling noise, classical uncertainty, or subsystems.
Compare ideal state-vector predictions with shot-based results.
Use independent test cases such as |0⟩, |1⟩, |+⟩, and Bell states.
Never infer phase from computational-basis probabilities alone.
State-vector simulation scales exponentially in memory because an n-qubit vector contains 2ⁿ amplitudes. Density-matrix simulation is more demanding still, because a density matrix has 2ⁿ × 2ⁿ entries. Consequently, practical simulators use sparse methods, tensor-network methods, stabilizer methods, or hardware execution where appropriate. These methods may exploit structure, but they do not eliminate the conceptual distinction between state, measurement, and sampled data.
Quantum information also raises governance issues. Experimental results should be reproducible, with software versions, random seeds where relevant, circuit definitions, device calibration information, and shot counts recorded. Claims about quantum advantage must distinguish an ideal simulation result from a noisy hardware result and must use statistically defensible comparisons.
Chapter Summary
A qubit is represented by a normalised complex state vector, and an n-qubit pure state requires 2ⁿ amplitudes. Amplitude magnitudes determine probabilities in a specified measurement basis, while relative phases determine interference. A global phase has no observable effect. The Bloch sphere gives an intuitive geometric representation of single-qubit pure states and connects its coordinates with Pauli expectation values.
Measurements are described by projectors or, more generally, observables. The Born rule calculates outcome probabilities, and ideal projective measurement produces a conditional post-measurement state. Density matrices represent both pure and mixed states, support partial tracing, and provide probability and expectation formulas through the trace operation. Tensor products describe composite systems, while entangled states cannot be decomposed into independent subsystem states.
Practical quantum programs often estimate probabilities using finite shots. Observed frequencies fluctuate statistically and may also be affected by hardware noise and readout errors. Reliable interpretation therefore requires attention to basis choice, qubit ordering, normalisation, sampling uncertainty, and experimental documentation.
Key Terms
State vector: A complex vector representing a pure quantum state.
Qubit: The basic unit of quantum information, represented by a two-dimensional Hilbert space.
Amplitude: A complex coefficient whose squared magnitude contributes to measurement probability.
Normalisation: The condition that the total probability equals one.
Global phase: A common complex phase factor multiplying an entire state; it does not affect measurement predictions.
Relative phase: A phase difference between components of a superposition; it can affect interference.
Bloch sphere: A geometric representation of a single-qubit state.
Born rule: The rule assigning probabilities from squared amplitudes or projector expectation values.
Projector: An operator representing a particular subspace or measurement outcome.
Observable: A Hermitian operator whose eigenvalues represent possible measurement values.
Expectation value: The long-run average of repeated measurements of an observable.
State collapse: The ideal post-measurement projection into the state associated with the observed outcome.
Density matrix: An operator representing pure states, mixed states, or subsystems.
Purity: The quantity Tr(ρ²), indicating whether a state is pure or mixed.
Mixed state: A statistical ensemble or reduced state represented by a density matrix.
Tensor product: The operation used to construct composite-system states.
Entanglement: A form of non-separable quantum correlation.
Partial trace: The operation that obtains a subsystem state from a joint density matrix.
Shot: One execution of a quantum circuit followed by measurement.
Sampling uncertainty: Variation in observed frequencies caused by a finite number of shots.
Review Questions
Short Answer Questions
What normalisation condition must the amplitudes of a qubit satisfy?
Why is global phase unobservable?
What information does the Bloch-sphere azimuthal angle represent?
State the Born-rule formula for a projective measurement.
What is the difference between a pure state and a mixed state?
Long Answer Questions
Explain how a Hadamard gate can reveal a relative phase that is invisible in computational-basis probabilities.
Describe the role of eigenvalues and eigenvectors in the measurement of an observable.
Derive the computational-basis probabilities for a general qubit state and explain the normalisation requirement.
Explain how density matrices represent classical mixtures and why one measurement basis may fail to distinguish different states.
Discuss the meaning of entanglement using the Bell state |Φ⁺⟩ and its reduced density matrix.
Analytical / Application Questions
A circuit predicts an outcome probability of 0.6 and is run for 2,000 shots. Explain how you would assess whether an observed frequency of 0.575 is consistent with sampling variation.
Design a measurement procedure that distinguishes |+⟩ from |−⟩, and explain why direct computational-basis measurement is insufficient.
A two-qubit simulator reports amplitudes in the order |00⟩, |01⟩, |10⟩, |11⟩. Explain how you would calculate the probability of measuring the first qubit as 1 and identify the information required from the amplitude vector.
Multiple Choice Questions with Answers
Question 1
For the qubit state |ψ⟩ = (1/√2)|0⟩ + (i/√2)|1⟩, what is the probability of measuring 1 in the computational basis?
A. 0
B. 1/4
C. 1/2
D. 1
Correct Answer: C. 1/2
Question 2
Which change leaves all measurement probabilities unchanged for an isolated quantum state?
A. Multiplying the entire state by a global phase e^{iφ}
B. Changing only the relative phase between two components
C. Applying a non-unitary projection
D. Removing one component without renormalisation
Correct Answer: A. Multiplying the entire state by a global phase e^{iφ}
Question 3
Which state is an eigenstate of the Pauli-X operator with eigenvalue +1?
A. |0⟩
B. |1⟩
C. (|0⟩ − |1⟩)/√2
D. (|0⟩ + |1⟩)/√2
Correct Answer: D. (|0⟩ + |1⟩)/√2
Question 4
For a projective measurement with projector P_m, which expression gives the probability of outcome m for |ψ⟩?
A. ⟨ψ|P_m|ψ⟩
B. ⟨ψ|ψ⟩P_m
C. Tr(P_m) only
D. P_m|ψ⟩ without normalisation
Correct Answer: A. ⟨ψ|P_m|ψ⟩
Question 5
What is the density matrix of an equal classical mixture of |0⟩ and |1⟩?
A. |0⟩⟨0|
B. I/2
C. |+⟩⟨+|
D. X/2
Correct Answer: B. I/2
Question 6
What is the ideal probability of measuring 00 from the Bell state (|00⟩ + |11⟩)/√2?
A. 0
B. 1/4
C. 1/2
D. 1
Correct Answer: C. 1/2
Question 7
A circuit is run for 1,000 shots and produces 250 occurrences of outcome 1. What is the observed frequency?
A. 0.025
B. 0.25
C. 2.5
D. 250
Correct Answer: B. 0.25
Question 8
Which operation converts an X-basis measurement into a computational-basis measurement?
A. Applying H before measurement
B. Applying X after measurement
C. Applying Z after measurement
D. Applying the identity twice
Correct Answer: A. Applying H before measurement
Question 9
For a pure density matrix ρ = |ψ⟩⟨ψ|, what is Tr(ρ²)?
A. 0
B. 1/2
C. 1
D. It depends on the measurement basis
Correct Answer: C. 1
Question 10
Why can a state-vector simulator and a shot-based simulator produce different immediate outputs for the same circuit?
A. The state-vector simulator ignores amplitudes
B. Shot-based simulation samples finite outcomes, while state-vector simulation represents ideal amplitudes
C. The shot-based simulator cannot represent probabilities
D. State vectors always describe mixed states
Correct Answer: B. Shot-based simulation samples finite outcomes, while state-vector simulation represents ideal amplitudes
Quantum Programming and Simulation
Chapter 3
of 15