Mathematical Language of Quantum MechanicsIntroduction and contextQuantum mechanics describes physical systems whose possible states and measurement outcomes cannot be represented adequately by ordinary Boolean variables alone. For quantum computing, the mathematics is finite-dimensional linear algebra enriched by complex numbers and probability. A qubit is represented by a vector in a complex two-dimensional vector space; quantum gates are matrices; combined systems are described with tensor products; and measurement probabilities are calculated from inner products. This mathematical language is not merely a notation system. It determines what operations are physically possible. State vectors must be normalized, physical transformations must preserve total probability, and measurement outcomes are associated with orthogonal subspaces or eigenvectors of observables. Learning objectivesBy the end of this chapter, you should be able to: - perform arithmetic with complex numbers and interpret their modulus;
- represent quantum states as normalized complex vectors;
- calculate inner products, norms, orthogonality, and probabilities;
- use Dirac ket and bra notation;
- multiply matrices and vectors and recognize unitary matrices;
- determine eigenvalues and eigenvectors in simple finite-dimensional systems;
- construct composite states using tensor products;
- explain measurement using projectors and the Born rule;
- apply these tools to a small quantum-computing problem.
1. Complex numbers: the scalar language of quantum theoryA complex number has the form z = a + bi where a and b are real numbers and i is the imaginary unit satisfying i2 = -1. The real and imaginary parts are Re(z) = a and Im(z) = b. The complex conjugate of z is z* = a - bi The modulus, or absolute value, is |z| = √(zz*) = √(a² + b²) The modulus is a non-negative real number. In quantum mechanics, squared moduli become probabilities or probability contributions. A complex number can also be written in polar form: z = r(cos θ + i sin θ) = reiθ where r = |z| and θ is an argument (phase angle). Euler's identity gives eiθ = cos θ + i sin θ. Multiplication in polar form is especially useful: (reiα)(seiβ) = rsei(α + β) Thus, multiplication combines magnitudes and adds phases. Worked example: complex arithmeticLet z1 = 2 + 3i and z2 = 1 - i. Then z1z2 = (2 + 3i)(1 - i) = 2 - 2i + 3i - 3i² = 5 + i The modulus of the result is |5+i| = √26. The calculation uses i²=-1. A global phase does not change measurement probabilities. For a state vector |ψ⟩, the states |ψ⟩ and eiφ|ψ⟩ represent the same physical state because every amplitude is multiplied by a number of modulus one. Relative phase, however, can change interference and is physically significant. 2. Vector spaces and quantum statesA finite-dimensional complex vector space consists of vectors that can be added and multiplied by complex scalars. A column-vector representation of a qubit is |ψ⟩ = [ α ] [ β ] where α,β ∈ ℂ. The standard computational basis is |0⟩ = [1] [0]
|1⟩ = [0] [1] Every pure qubit state can be expressed as |ψ⟩ = α|0⟩ + β|1⟩ with normalization condition |α|² + |β|² = 1 The normalization condition is required because the total probability of all mutually exclusive outcomes must equal one. More generally, a state in an n-dimensional Hilbert space has the form |ψ⟩ = ∑j=0n-1 cj|j⟩ and is normalized when ∑j=0n-1|cj|² = 1. The basis vectors |j⟩ are assumed orthonormal unless stated otherwise. A vector need not be normalized to be a mathematical vector, but an unnormalized vector is not directly a valid pure-state description. If |v⟩ is nonzero, it can be normalized by |vnormalized⟩ = |v⟩ / √⟨v|v⟩ 3. Inner products, bras, norms, and orthogonalityThe inner product generalizes the dot product to complex vectors. If |u⟩ = [u₁, u₂, …, un]ᵀ |v⟩ = [v₁, v₂, …, vn]ᵀ then ⟨u|v⟩ = ∑j=1n uj* vj The bra ⟨u| is the conjugate transpose of the ket |u⟩. Consequently, ⟨u|v⟩ is generally complex, while ⟨v|u⟩ = ⟨u|v⟩*. The norm of a vector is ‖|v⟩‖ = √⟨v|v⟩ Two vectors are orthogonal if ⟨u|v⟩ = 0. A set is orthonormal if every vector has norm one and distinct vectors are mutually orthogonal. The computational basis is orthonormal because ⟨j|k⟩ = δjk, where the Kronecker delta is one when j=k and zero otherwise. Worked example: inner productLet |u⟩ = [1/√2, i/√2]ᵀ, |v⟩ = [1/√2, -i/√2]ᵀ The bra corresponding to |u⟩ is ⟨u| = [1/√2, -i/√2]. Therefore, ⟨u|v⟩ = 1/2 + (-i)(-i)/2 = 1/2 - 1/2 = 0 Thus the states are orthogonal. The conjugation in the bra is essential. 4. Dirac notation and physical interpretationDirac notation separates the abstract state from a particular coordinate representation. - A ket |ψ⟩ represents a state vector.
- A bra ⟨ψ| is its conjugate transpose.
- ⟨φ|ψ⟩ is an amplitude, or inner product.
- |ψ⟩⟨φ| is an outer product and represents a matrix or linear operator.
For normalized states, the transition probability from |ψ⟩ to a normalized state |φ⟩ is P(φ|ψ) = |⟨φ|ψ⟩|² This is the Born rule for a one-dimensional projector. The amplitude may be negative or complex, but the probability is real and non-negative. The projector onto a normalized state |φ⟩ is P_φ = |φ⟩⟨φ| It satisfies P_φ²=P_φ and P_φ†=P_φ. For an orthonormal basis, the completeness relation is ∑j |j⟩⟨j| = I where I is the identity operator. 5. Measurement and probabilitySuppose a qubit is measured in the computational basis: |ψ⟩ = α|0⟩ + β|1⟩ The probability of outcome zero is |α|², and the probability of outcome one is |β|². These add to one because the state is normalized. Following an ideal measurement, the state becomes the corresponding basis state associated with the observed result. This state update is called projection or collapse in the standard measurement model. For a measurement with orthogonal projectors Pm, the probability of outcome m is p(m) = ⟨ψ|Pm|ψ⟩ For a pure state, the post-measurement state, conditional on outcome m, is |ψm⟩ = Pm|ψ⟩ / √p(m) provided p(m)>0. The projectors must satisfy PmPn=0 for distinct outcomes and ∑mPm=I. Example: measuring a superpositionConsider |ψ⟩ = (|0⟩ + i|1⟩)/√2 The probabilities are |1/√2|²=1/2 and |i/√2|²=1/2. The phase i does not alter this computational-basis distribution, but it can affect results after a gate that mixes basis states. 6. Matrices and linear operatorsA matrix maps vectors to vectors. If A has entries Ajk, then (A|ψ⟩)j = ∑k Ajkψk Matrix multiplication is associative but generally not commutative: (AB)C=A(BC) whereas AB≠BA in general. This matters because the order of quantum gates matters. The adjoint, or conjugate transpose, of A is written A†. A matrix is unitary if A†A = AA† = I Unitary operators preserve inner products and norms: ‖A|ψ⟩‖² = ⟨ψ|A†A|ψ⟩ = ⟨ψ|ψ⟩ Thus unitary matrices preserve total probability and describe reversible closed-system evolution. The inverse of a unitary matrix is A-1=A†. Important one-qubit gates include X = [0 1; 1 0] Z = [1 0; 0 -1] and the Hadamard gate H = (1/√2)[1 1; 1 -1] The gate X exchanges |0⟩ and |1⟩. The Hadamard gate creates and removes equal superpositions: H|0⟩ = (|0⟩ + |1⟩)/√2 H|1⟩ = (|0⟩ - |1⟩)/√2 The minus sign is a relative phase and can produce interference. 7. Eigenvalues, eigenvectors, and observablesA nonzero vector |v⟩ is an eigenvector of A with eigenvalue λ if A|v⟩ = λ|v⟩ Eigenvalues are found from the characteristic equation det(A - λI) = 0 For a Hermitian matrix, A†=A, all eigenvalues are real and eigenvectors associated with distinct eigenvalues are orthogonal. Quantum observables are represented by Hermitian operators. Measurement outcomes are their eigenvalues, and the associated eigenspaces define the possible projections. Worked example: the Pauli-Z observableFor Z = [1 0; 0 -1] we calculate det(Z - λI) = det([1-λ 0; 0 -1-λ]) = (1-λ)(-1-λ) The eigenvalues are λ=+1 and λ=-1. Their eigenvectors are |0⟩ and |1⟩, respectively. A Z measurement therefore gives +1 or −1, not the labels zero and one, although the eigenvectors correspond to those computational basis states. For an observable with spectral decomposition A = ∑a aPa the expected value in state |ψ⟩ is ⟨A⟩ = ⟨ψ|A|ψ⟩ = ∑a a p(a) This formula assumes a normalized state and a projective measurement of the Hermitian observable A. 8. Tensor products and composite systemsA composite quantum system is described by a tensor-product space. If system A has dimension n and system B has dimension m, their joint space has dimension nm. For vectors |u⟩ and |v⟩, the tensor product is written |u⟩⊗|v⟩ or |u⟩|v⟩. For column vectors, the Kronecker product places a scaled copy of the second vector beneath each component of the first: [a; b] ⊗ [c; d] = [ac; ad; bc; bd] The two-qubit computational basis is |00⟩, |01⟩, |10⟩, |11⟩ in that order unless another ordering is explicitly specified. A general two-qubit state is |ψ⟩ = c₀₀|00⟩ + c₀₁|01⟩ + c₁₀|10⟩ + c₁₁|11⟩ with |c₀₀|²+|c₀₁|²+|c₁₀|²+|c₁₁|²=1. Local operators act as A⊗B. Some joint states can be written as |u⟩⊗|v⟩ and are called separable. Others cannot be factored in this way and are entangled. For example, |Φ⁺⟩ = (|00⟩ + |11⟩)/√2 is entangled. It cannot be represented as a product of two single-qubit states. Measuring the first qubit in the computational basis gives zero or one with equal probability; the second qubit is then found to have the same value in the corresponding ideal measurement. Useful tensor-product identities include (A⊗B)(|u⟩⊗|v⟩) = (A|u⟩)⊗(B|v⟩) and, when dimensions are compatible, (A⊗B)(C⊗D) = (AC)⊗(BD) If A and B are unitary, then A⊗B is unitary. 9. Applied case: a two-qubit preparation and measurementBackgroundA small quantum processor must prepare a correlated two-qubit state and estimate the probability of observing matching computational-basis results. ProblemStarting from |00⟩, apply a Hadamard gate to the first qubit and then a controlled-NOT gate whose first qubit is the control and second qubit is the target. Determine the final state and measurement probabilities. Analysis and approachFirst, (H⊗I)|00⟩ = ((|0⟩+|1⟩)/√2)⊗|0⟩ = (|00⟩+|10⟩)/√2 The controlled-NOT leaves |00⟩ unchanged and maps |10⟩ to |11⟩. Therefore, CNOT(H⊗I)|00⟩ = (|00⟩+|11⟩)/√2 = |Φ⁺⟩ The measurement probabilities are P(00)=1/2, P(11)=1/2, and P(01)=P(10)=0. Thus the outcomes always match, although each individual value is random. Outcome and learning pointsThe case illustrates matrix action, tensor products, basis ordering, normalization, and the difference between randomness and correlation. It also shows why quantum algorithms manipulate amplitudes before measurement: interference and entanglement shape the final probability distribution. 10. Limitations, implementation, and best practiceThe finite-dimensional vector model is ideal for qubits and many introductory algorithms, but real devices also involve noise, mixed states, imperfect gates, and measurement errors. Pure state vectors alone cannot represent classical uncertainty about which state was prepared; density matrices are introduced for that purpose in more advanced work. Common errors include omitting complex conjugation in bras, forgetting normalization, reversing tensor-product ordering, treating matrix multiplication as commutative, and interpreting amplitudes themselves as probabilities. A reliable workflow is to state the basis order, write dimensions beside matrices, check normalization before and after a unitary operation, and verify that all probabilities are real, non-negative, and sum to one. Quantum software libraries encode these conventions computationally, but software output does not replace mathematical validation. In professional practice, reproducibility requires recording gate order, qubit ordering, measurement basis, simulator assumptions, and whether noise has been included. Chapter SummaryQuantum mechanics for computer science uses complex vector spaces to represent states, inner products to calculate amplitudes, and squared moduli to calculate probabilities. Kets represent vectors and bras their conjugate transposes. Normalized states have unit norm. Matrices represent operators; unitary matrices preserve norms and model reversible quantum evolution. Hermitian matrices represent observables, whose real eigenvalues are possible measurement results and whose eigenvectors define measurement directions. Tensor products construct composite systems and reveal the distinction between separable and entangled states. These ideas support practical tasks such as preparing, transforming, and measuring qubits, while careful attention to basis order, conjugation, normalization, and gate order prevents common implementation errors. Key TermsComplex number: A number of the form a+bi, with real a,b. Complex conjugate: The number obtained by changing a+bi to a-bi. Modulus: The non-negative magnitude |z| of a complex number. Global phase: A common phase factor that does not affect measurement probabilities. Relative phase: A phase difference between amplitudes that can affect interference. Ket: A vector denoted |ψ⟩. Bra: The conjugate transpose of a ket, denoted ⟨ψ|. Inner product: The complex scalar ⟨u|v⟩. Norm: The length √⟨v|v⟩ of a vector. Orthonormal basis: A set of unit vectors that are mutually orthogonal. Amplitude: A complex coefficient whose squared modulus contributes to probability. Born rule: The rule assigning probability p(m)=⟨ψ|Pm|ψ⟩ to a measurement outcome. Projector: An operator P satisfying P²=P, used to represent a subspace measurement. Unitary matrix: A matrix satisfying A†A=I. Hermitian matrix: A matrix satisfying A†=A. Eigenvalue: A scalar λ satisfying A|v⟩=λ|v⟩ for a nonzero eigenvector. Tensor product: An operation constructing the state space of a composite system. Entanglement: A non-separable relationship between components of a composite quantum state. Observable: A Hermitian operator representing a measurable physical quantity. Review Questions5 Short Answer Questions- Why must a quantum state vector be normalized?
- What operation converts a ket into its corresponding bra?
- State the condition that makes a matrix unitary.
- What is the probability of obtaining a normalized state |φ⟩ when the system is in |ψ⟩?
- What is the dimension of the joint space of a three-dimensional system and a two-dimensional system?
5 Long Answer Questions- Explain complex amplitudes, global phase, relative phase, and their roles in quantum measurement.
- Describe Dirac notation and relate kets, bras, inner products, outer products, and projectors.
- Explain why unitary matrices are appropriate for closed-system quantum evolution.
- Derive the eigenvalues and eigenvectors of the Pauli-Z matrix and interpret them as measurement outcomes.
- Explain tensor products, separable states, entangled states, and basis ordering using two qubits.
3 Analytical / Application Questions- Normalize the vector (1, i, 1)ᵀ and calculate the probability associated with each computational-basis component.
- A qubit is in state (|0⟩+i|1⟩)/√2. Predict the computational-basis probabilities, then explain why a later basis-changing gate could distinguish this state from (|0⟩+|1⟩)/√2.
- Starting from |00⟩, apply a Hadamard gate to the first qubit followed by a controlled-NOT. Calculate all four computational-basis probabilities and explain the correlation.
Multiple Choice Questions with AnswersQuestion 1For a complex number z=a+bi, which expression gives its modulus? A. a²+b² B. √(a²+b²) C. a-b D. a²-b² Correct Answer: B. √(a²+b²) Question 2Which condition must a qubit state α|0⟩+β|1⟩ satisfy? A. |α|+|β|=0 B. |α|²-|β|²=1 C. |α|²+|β|²=1 D. α+β=1 Correct Answer: C. |α|²+|β|²=1 Question 3What is the correct definition of the inner product of two complex vectors? A. Multiply corresponding entries without conjugation and add B. Conjugate the first vector, transpose it, then multiply by the second C. Transpose both vectors and multiply D. Add the norms of the two vectors Correct Answer: B. Conjugate the first vector, transpose it, then multiply by the second Question 4What probability results when a normalized state |ψ⟩ is measured for the outcome associated with normalized state |φ⟩? A. ⟨φ|ψ⟩ B. Re(⟨φ|ψ⟩) C. |⟨φ|ψ⟩|² D. ⟨ψ|ψ⟩+⟨φ|φ⟩ Correct Answer: C. |⟨φ|ψ⟩|² Question 5Which equation characterizes a unitary matrix U? A. U²=U B. U†U=I C. U†=-U D. det(U)=0 Correct Answer: B. U†U=I Question 6The possible measurement results of a Hermitian observable are its: A. column sums B. singular vectors only C. real eigenvalues D. matrix dimensions Correct Answer: C. real eigenvalues Question 7What is the dimension of the tensor-product space of two qubits? A. 2 B. 3 C. 4 D. 8 Correct Answer: C. 4 Question 8In the state (|00⟩+|11⟩)/√2, what is the probability of measuring |01⟩ in the computational basis? A. 0 B. 1/4 C. 1/2 D. 1 Correct Answer: A. 0 Question 9If A|v⟩=λ|v⟩ for a nonzero vector, what is |v⟩ called? A. A projector B. An eigenvector C. A bra D. A tensor factor Correct Answer: B. An eigenvector Question 10Starting with |0⟩, applying a Hadamard gate produces: A. |1⟩ B. (|0⟩+|1⟩)/√2 C. (|0⟩-|1⟩)/2 D. 0 Correct Answer: B. (|0⟩+|1⟩)/√2
|