Diploma in Quantum Computing
Quantum Mechanics for Computer Science
•
Diploma
Qubits and Geometric Representation
Introduction
A classical bit is either 0 or 1. A qubit is a two-level quantum system whose state is represented by a vector in a two-dimensional complex vector space. This difference is fundamental: a qubit may be in a superposition of computational-basis states, and measurement probabilities arise from the squared magnitudes of complex probability amplitudes.
This chapter develops the mathematical and geometric language used to describe a single qubit. It introduces computational and alternative bases, state normalization, global and relative phase, basis transformations, and the Bloch sphere. The central theme is that a physical quantum state and one mathematical representation of that state are related but not identical. Different vectors can describe the same physical state when they differ only by a global phase.
Learning Objectives
By the end of this chapter, you should be able to:
Represent a single-qubit state in the computational basis.
Explain normalization, amplitudes, probabilities, and phase.
Distinguish global phase from physically meaningful relative phase.
Transform states between computational, Hadamard, and other bases.
Calculate Bloch-sphere coordinates for a pure qubit state.
Interpret common quantum gates as geometric rotations.
Distinguish physical states from their mathematical representations.
Apply these ideas to simple quantum-computing problems.
1. The Single-Qubit State
The computational basis consists of two orthonormal states, conventionally written |0⟩ and |1⟩. A general pure qubit state is
|ψ⟩ = α|0⟩ + β|1⟩
where α and β are complex amplitudes. In column-vector form,
|0⟩ = [1, 0]ᵀ, |1⟩ = [0, 1]ᵀ, |ψ⟩ = [α, β]ᵀ
The superscript T denotes transpose. The state must be normalized:
|α|² + |β|² = 1
Here |α|² and |β|² are dimensionless probabilities. If the qubit is measured in the computational basis, the probability of obtaining 0 is |α|², and the probability of obtaining 1 is |β|². These probabilities add to one because one of the two outcomes must occur.
The amplitudes are generally complex. If z = a + ib, then its complex modulus is
|z| = √(a² + b²)
and |z|² = a² + b². The complex phase of an amplitude affects interference, even though the measurement probability of that amplitude alone depends only on its modulus squared.
Example 1: Checking normalization
Consider
|ψ⟩ = (1/√5)|0⟩ + (2i/√5)|1⟩
Since |1/√5|² = 1/5 and |2i/√5|² = 4/5,
|α|² + |β|² = 1/5 + 4/5 = 1
The state is normalized. A computational-basis measurement gives 0 with probability 1/5 and 1 with probability 4/5.
2. Superposition and Measurement
A superposition is not simply an unknown classical value. Before measurement, the state contains amplitudes for both possible outcomes. Measurement produces a classical result and changes the state to the corresponding eigenstate of the measurement basis. For a computational-basis measurement,
P(0) = |α|², P(1) = |β|²
The post-measurement state is |0⟩ if the result is 0 and |1⟩ if the result is 1. This process is probabilistic, but the probabilities are precisely determined by the state amplitudes.
A state such as |0⟩ is not a superposition in the computational basis, although it can be expressed as a superposition in another basis. Thus, “being a superposition” is basis-dependent.
3. Phase and Physical Equivalence
Every nonzero complex number can be expressed in polar form. A normalized qubit may therefore be written as
|ψ⟩ = eiγ(cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩)
where θ and φ are real angles and γ is a global phase. The factor e^{iγ} multiplies the entire state. It has no effect on measurement probabilities or any physical prediction:
|eiγα|² = |α|²
Consequently, |ψ⟩ and e^{iγ}|ψ⟩ represent the same physical pure state. Their state vectors are mathematically different, but they correspond to the same ray in Hilbert space.
By contrast, the relative phase e^{iφ} between the |0⟩ and |1⟩ components is physically significant. For example,
|+⟩ = (|0⟩ + |1⟩)/√2
and
|−⟩ = (|0⟩ − |1⟩)/√2
have identical computational-basis probabilities, but they behave differently under other measurements and quantum gates. The minus sign is a relative phase of π, not a global phase.
4. Alternative Bases
The Hadamard basis
The Hadamard or X basis is defined by
|+⟩ = (|0⟩ + |1⟩)/√2, |−⟩ = (|0⟩ − |1⟩)/√2
These states are orthonormal:
⟨+|+⟩ = 1, ⟨−|−⟩ = 1, ⟨+|−⟩ = 0
A state can be expressed in either basis. If
|ψ⟩ = α|0⟩ + β|1⟩ = c₊|+⟩ + c₋|−⟩
then
c₊ = (α + β)/√2, c₋ = (α − β)/√2
Conversely,
α = (c₊ + c₋)/√2, β = (c₊ − c₋)/√2
The Hadamard gate H performs this basis transformation:
H = (1/√2)[[1, 1], [1, −1]]
It satisfies H|0⟩ = |+⟩, H|1⟩ = |−⟩, and H² = I.
The Y basis
The eigenstates of the Pauli-Y operator are
|+ᵧ⟩ = (|0⟩ + i|1⟩)/√2, |−ᵧ⟩ = (|0⟩ − i|1⟩)/√2
They form another orthonormal basis. The phase i does not alter computational-basis probabilities, but it changes interference in measurements in other bases.
Basis transformation as a coordinate change
A ket is an abstract state. Its coordinate column depends on the chosen basis. If B = {|b₀⟩, |b₁⟩} is an orthonormal basis, then
|ψ⟩ = c₀|b₀⟩ + c₁|b₁⟩
with coefficients
cj = ⟨bj|ψ⟩
The coefficients are probability amplitudes for measurement in basis B. Changing basis changes the coordinates, not the physical state.
Basis
Basis states
Associated Pauli measurement
Computational or Z
0⟩,
Hadamard or X
+⟩,
Y basis
+ᵧ⟩,
5. The Bloch-Sphere Representation
Every pure single-qubit state, ignoring global phase, can be represented by a point on the surface of a unit sphere. Using the polar form,
|ψ⟩ = cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩
where 0 ≤ θ ≤ π and 0 ≤ φ < 2π, the corresponding Bloch vector is
r = (sinθ cosφ, sinθ sinφ, cosθ)
The vector has unit length:
rₓ² + rᵧ² + rz² = 1
The north pole (θ = 0) represents |0⟩, and the south pole (θ = π) represents |1⟩. The equator contains equal-magnitude superpositions. In particular, |+⟩ lies on the positive x-axis, |−⟩ on the negative x-axis, |+ᵧ⟩ on the positive y-axis, and |−ᵧ⟩ on the negative y-axis.
Bloch sphere showing computational and alternative basis states
Figure: Bloch sphere showing computational and alternative basis states
Figure: Important pure single-qubit states on the Bloch sphere. The drawing uses perspective; the physical coordinates are defined by r = (sinθ cosφ, sinθ sinφ, cosθ).
Extracting coordinates from amplitudes
For a normalized state |ψ⟩ = α|0⟩ + β|1⟩, the Bloch coordinates are
rₓ = 2 Re(α*β), rᵧ = 2 Im(α*β), rz = |α|² − |β|²
Here α* is the complex conjugate of α, Re denotes real part, and Im denotes imaginary part. These expressions assume a pure normalized state. They are also expectation values of the Pauli operators:
rₓ = ⟨X⟩, rᵧ = ⟨Y⟩, rz = ⟨Z⟩
where
X = [[0,1],[1,0]], Y = [[0,−i],[i,0]], Z = [[1,0],[0,−1]]
For a general mixed state, the density matrix can be written
ρ = (I + rₓX + rᵧY + rzZ)/2
A mixed state satisfies rₓ² + rᵧ² + r_z² ≤ 1. Pure states lie on the sphere surface; mixed states lie inside it. The completely mixed state I/2 is at the centre.
6. Quantum Gates as Geometric Operations
A closed-system quantum operation is represented by a unitary matrix U satisfying
U†U = UU† = I
where U† is the conjugate transpose. Unitary operations preserve normalization and inner products.
The Pauli-X gate exchanges |0⟩ and |1⟩ and corresponds to a π rotation about the x-axis, apart from an overall phase convention. Pauli-Y and Pauli-Z similarly correspond to π rotations about the y- and z-axes. The phase gate
S = [[1,0],[0,i]]
rotates the Bloch vector by π/2 about the z-axis. The T gate
T = [[1,0],[0,eiπ/4]]
rotates it by π/4 about the z-axis.
A general rotation through angle η about unit axis n = (nₓ,nᵧ,n_z) is represented by
Rn(η) = exp(−iη(nₓX + nᵧY + nzZ)/2)
This formula assumes an ideal isolated qubit and a unit vector n. The corresponding Bloch vector undergoes the same ordinary three-dimensional rotation. The matrix description and geometric description are two representations of the same physical transformation, although global phases may differ.
7. Worked Example: Changing Basis and Finding the Bloch Vector
Consider
|ψ⟩ = (√3/2)|0⟩ + (i/2)|1⟩
First, normalization is verified by
|√3/2|² + |i/2|² = 3/4 + 1/4 = 1
Computational-basis probabilities
The probabilities are P(0) = 3/4 and P(1) = 1/4.
Hadamard-basis amplitudes
Using c₊ = (α + β)/√2 and c₋ = (α − β)/√2,
c₊ = (√3 + i)/(2√2), c₋ = (√3 − i)/(2√2)
Their probabilities are
|c₊|² = |c₋|² = 1/2
Thus a Hadamard-basis measurement gives either result with equal probability.
Bloch coordinates
Here α = √3/2 and β = i/2, so α*β = i√3/4. Therefore,
The Bloch vector is (0, √3/2, 1/2), whose length is
√(0² + (√3/2)² + (1/2)²) = 1
The state therefore lies on the positive-y side of the sphere, above the equatorial plane.
8. Physical State Versus Mathematical Representation
Several distinctions are essential in quantum computing:
Abstract state versus coordinates. The ket |ψ⟩ is an abstract vector; [α, β]ᵀ is its coordinate representation in a selected basis.
Global phase versus relative phase. Multiplication of the whole state by e^{iγ} changes no physical prediction. A phase difference between components can change interference.
State versus measurement result. A qubit may be in a superposition, while a measurement produces one classical outcome.
Pure state versus mixed state. A pure state is represented by a state vector and lies on the Bloch-sphere surface. A mixed state represents classical or environmental uncertainty and lies inside the sphere.
Physical qubit versus ideal model. The two-dimensional vector model is ideal. Real devices experience noise, decoherence, calibration error, leakage, and imperfect control.
The density operator of a pure state is
ρ = |ψ⟩⟨ψ|
and is unchanged by global phase:
(eiγ|ψ⟩)(eiγ|ψ⟩)† = |ψ⟩⟨ψ|
This provides a formal explanation for global-phase equivalence.
9. Applied Case: Basis Choice in a Quantum Communication Link
Background
Consider an illustrative BB84-style communication link. A sender encodes information using the computational basis {|0⟩, |1⟩} or the Hadamard basis {|+⟩, |−⟩}. A receiver independently chooses one of these bases for measurement.
Problem
What happens when the receiver uses the wrong basis? Why can an interceptor not reliably measure and resend every qubit without being detected?
Analysis
Suppose the sender transmits |0⟩. A receiver measuring in the computational basis obtains 0 with certainty. In the Hadamard basis,
|0⟩ = (|+⟩ + |−⟩)/√2
so the receiver obtains + or − with probability 1/2. Similarly, |+⟩ gives a random computational-basis result because
|+⟩ = (|0⟩ + |1⟩)/√2
An interceptor who measures in a randomly selected basis and resends the measured state sometimes uses the wrong basis. That measurement changes the state and introduces errors when the legitimate parties later compare the subset for which they used the same basis.
Outcome and learning points
Basis choice is not merely a change in notation: it determines the observable being measured. The same physical state can have definite outcomes in one basis and probabilistic outcomes in another. The example also shows why relative phase and basis transformations are central to quantum information security.
This simplified scenario omits practical issues such as photon loss, detector imperfections, authentication, finite-key statistics, and implementation attacks. It should therefore be understood as a conceptual application, not a complete security proof.
10. Limitations and Best Practices
The Bloch sphere is exact and complete for one pure qubit, but it does not directly visualize the full state space of multiple qubits. A system of n qubits generally requires 2ⁿ complex amplitudes before normalization and global-phase reduction. Entanglement also cannot be represented by assigning an independent Bloch vector to each subsystem.
For reliable calculations:
Normalize every state before interpreting amplitudes as probabilities.
State the measurement basis explicitly.
Use complex conjugation correctly in inner products.
Separate global phase from relative phase.
Check that a pure-state Bloch vector has length one.
Treat basis changes as coordinate transformations, not physical changes by themselves.
Remember that actual hardware may produce mixed states because of noise and environmental interaction.
Use density matrices when classical uncertainty or noise is relevant.
Chapter Summary
A qubit is a normalized vector |ψ⟩ = α|0⟩ + β|1⟩ in a two-dimensional complex Hilbert space. Computational-basis measurement produces 0 and 1 with probabilities |α|² and |β|². Alternative bases, such as the Hadamard and Y bases, provide different measurement perspectives and are related through unitary basis transformations.
Global phase does not affect physical predictions, whereas relative phase affects interference and is physically observable. Every pure single-qubit state corresponds, up to global phase, to a point on the surface of the Bloch sphere. The coordinates are expectation values of the Pauli operators, and unitary gates act geometrically as rotations. Mixed states are represented by points inside the sphere and require density operators rather than state vectors alone.
These ideas support practical reasoning in quantum algorithms, quantum communication, gate design, and experimental interpretation. The essential discipline is to distinguish an abstract physical state from its coordinates, basis, and chosen mathematical representation.
Key Terms
Qubit: A quantum two-level system.
Computational basis: The basis {|0⟩, |1⟩} used for standard binary encoding.
Amplitude: A complex coefficient multiplying a basis state.
Normalization: The condition that total measurement probability equals one.
Superposition: A linear combination of basis states.
Measurement basis: The orthonormal basis whose states define possible measurement outcomes.
Global phase: A common phase factor multiplying an entire state; it has no observable effect.
Relative phase: The phase difference between components of a superposition.
Hadamard basis: The basis {|+⟩, |−⟩}.
Pauli operators: The matrices X, Y, and Z used to describe qubit transformations and observables.
Bloch sphere: A geometric representation of single-qubit pure states.
Bloch vector: The three-dimensional vector locating a qubit on or inside the Bloch sphere.
Unitary operator: A norm-preserving linear operator U satisfying U†U = I.
Pure state: A state represented by one state vector and located on the Bloch-sphere surface.
Mixed state: A statistical mixture represented by a density operator.
Density operator: The matrix ρ used to represent pure or mixed quantum states.
Expectation value: The predicted average measurement value of an observable.
Basis transformation: Re-expression of a state using a different orthonormal basis.
Relative phase interference: The observable effect produced when amplitudes with different phases combine.
Review Questions
Short Answer Questions
What normalization condition must the amplitudes of a qubit satisfy?
Why is global phase not physically observable?
Define the Hadamard-basis states |+⟩ and |−⟩.
Which Bloch-sphere points represent |0⟩ and |1⟩?
State one difference between a pure state and a mixed state.
Long Answer Questions
Explain how a qubit is represented in the computational basis and how measurement probabilities are obtained.
Derive the relationship between computational-basis amplitudes α, β and Hadamard-basis amplitudes c₊, c₋.
Explain the difference between global and relative phase, using |+⟩ and |−⟩ as examples.
Describe how Pauli gates and phase gates can be interpreted geometrically on the Bloch sphere.
Explain why a basis change is both a coordinate transformation and a change in the measurement perspective.
Analytical / Application Questions
For |ψ⟩ = (1/√2)|0⟩ + (e^{iπ/3}/√2)|1⟩, calculate the Bloch-vector coordinates and identify its position relative to the equator.
A qubit has Bloch vector (0, 0, −1). Identify its state, give its computational-basis measurement probabilities, and explain how a Pauli-X operation changes it.
Explain why an observer measuring |0⟩ in the Hadamard basis obtains random outcomes, and relate this fact to the illustrative quantum-communication case.
Multiple Choice Questions with Answers
Question 1
A qubit is in the state |ψ⟩ = (1/√5)|0⟩ + (2i/√5)|1⟩. What is the probability of measuring 1 in the computational basis?
A. 1/5
B. 2/5
C. 4/5
D. 1
Correct Answer: C. 4/5
Question 2
Which transformation leaves the physical pure-qubit state unchanged?
A. Changing the relative phase only
B. Multiplying the entire state by eiγ
C. Changing one amplitude's magnitude
D. Replacing a unitary operation with a measurement
Correct Answer: B. Multiplying the entire state by eiγ
Question 3
What are the Hadamard-basis amplitudes for |ψ⟩ = α|0⟩ + β|1⟩?
A. c₊=(α+β)/√2, c₋=(α−β)/√2
B. c₊=α+β, c₋=α−β
C. c₊=(α−β)/2, c₋=(α+β)/2
D. c₊=α/√2, c₋=β/√2
Correct Answer: A. c₊=(α+β)/√2, c₋=(α−β)/√2
Question 4
Which point on the Bloch sphere represents the state |+⟩?
A. The north pole
B. The south pole
C. The positive x-axis on the equator
D. The positive z-axis inside the sphere
Correct Answer: C. The positive x-axis on the equator
Question 5
For a normalized pure state, what is the length of its Bloch vector?
A. 0
B. 1/2
C. 1
D. 2
Correct Answer: C. 1
Question 6
For |ψ⟩ = (√3/2)|0⟩ + (i/2)|1⟩, what is rᵧ?
A. 0
B. 1/2
C. √3/2
D. 1
Correct Answer: C. √3/2
Question 7
What condition must an ideal quantum gate U satisfy?
A. U = 0
B. U†U = I
C. U†U = 2I
D. U must be real
Correct Answer: B. U†U = I
Question 8
Where are mixed qubit states located in the Bloch representation?
A. Only at the north pole
B. Only on the equator
C. Inside or on the unit sphere
D. Outside the sphere
Correct Answer: C. Inside or on the unit sphere
Question 9
Measuring |0⟩ in the Hadamard basis produces which probabilities?
A. 0 with probability 1 and 1 with probability 0
B. + and − each with probability 1/2
C. + with probability 1 and − with probability 0
D. Both outcomes with probability 1
Correct Answer: B. + and − each with probability 1/2
Question 10
Which statement correctly distinguishes a ket from its coordinate column?
A. They are always physically different objects
B. The ket is abstract, while the column depends on the chosen basis
C. The column is physical but the ket is not mathematical
D. A ket can only be written in the computational basis
Correct Answer: B. The ket is abstract, while the column depends on the chosen basis
Quantum Mechanics for Computer Science
Chapter 4
of 14