Quantum Mechanics for Computer Science

Chapter 1
Quantum Computing and the Physical Foundations of Information

Diploma in Quantum Computing
Quantum Mechanics for Computer Science   •   Diploma

Quantum Computing and the Physical Foundations of Information

Introduction

Computing is often introduced as the manipulation of symbols, numbers, and logical instructions. At a deeper level, however, every computer is a physical system. Information must be represented by physical states, transformed by physical processes, and eventually communicated or measured. Classical computers use physical distinctions such as high and low voltage, magnetization directions, or the presence and absence of charge. Quantum computers use physical systems whose behavior is governed by quantum mechanics.

Quantum computing does not simply mean building a faster conventional computer. It involves a different model of information processing. A quantum device can prepare, transform, and measure quantum states. These states exhibit superposition, interference, entanglement, and measurement effects that have no direct classical equivalent. Such effects may enable computational advantages for selected problems, although they do not make every task faster and do not eliminate the need for classical computing.

This chapter establishes the physical and conceptual foundations required for later study. It compares classical and quantum information, introduces central quantum phenomena, reviews foundational experiments, explains essential terminology, identifies computational motivations, and surveys the current quantum-technology landscape.

Learning Objectives

By the end of this chapter, you should be able to:

  1. Distinguish classical bits from quantum bits and explain why a qubit is not merely a probabilistic bit.
  2. Describe superposition, measurement, interference, entanglement, and decoherence.
  3. Relate major experiments to the development of quantum theory.
  4. Explain basic quantum-computing terminology, including gate, circuit, register, fidelity, noise, and error correction.
  5. Identify problems for which quantum algorithms may provide useful advantages.
  6. Compare major hardware approaches and assess the current state and limitations of quantum technology.
  7. Discuss responsible, secure, and realistic adoption of quantum computing.

1. Information as a Physical Concept

A classical bit is a physical system used to represent one of two distinguishable logical values, conventionally 0 and 1. The abstract bit is not itself a voltage, transistor, or magnetic domain; rather, it is a logical interpretation of a physical state. A reliable device must maintain enough physical distinction between the two states that they can be written, stored, and read with acceptably low error.

A classical register containing n bits can represent one of 2ⁿ possible strings at a time. For example, a three-bit register can hold one string among 000, 001, ..., 111. A probabilistic classical system may assign probabilities to these strings, but a single classical observation still returns one definite string.

A quantum bit, or qubit, is a controllable two-level quantum system. Examples include two energy levels of an ion, two states of a superconducting circuit, or two spin states of an electron. Its general pure state is written as:

|ψ⟩ = α|0⟩ + β|1⟩

Here |0⟩ and |1⟩ are orthogonal basis states, while α and β are complex probability amplitudes. For a normalized state:

|α|² + |β|² = 1

The quantities |α|² and |β|² are probabilities for obtaining 0 or 1 when the qubit is measured in the computational basis. The amplitudes themselves may be negative or complex, so they contain phase information that affects interference.

This expression does not mean that the qubit is simply a classical bit whose value is secretly 0 or 1. A coherent superposition has measurable consequences, particularly when operations cause amplitudes to add or cancel. A classical random mixture and a quantum superposition can have the same measurement probabilities in one basis but behave differently under later transformations.

A compact comparison

FeatureClassical bitQubit
Basic states0 or 1
State descriptionLogical value or probability distributionComplex amplitudes and relative phase
CopyingArbitrary copying is possibleUnknown states cannot generally be copied exactly
MeasurementIdeally reveals stored valueGenerally changes or disturbs the state
CorrelationsClassical correlationsClassical and quantum entanglement correlations
Main engineering issueNoise and fabrication variationNoise, decoherence, control, and measurement

For n qubits, the general pure state is:

|ψ⟩ = ∑x=02n−1 αx|x⟩

where |x⟩ denotes an n-bit computational-basis state and the complex amplitudes satisfy:

∑x=02n−1 |αx|² = 1

The notation does not imply that a quantum computer can directly read all 2ⁿ amplitudes. Measurement produces limited classical information. Quantum algorithms must therefore arrange interference so that useful answers become more likely when measured.

2. The Quantum State and Measurement

Quantum mechanics describes a physical system using a state. For a pure state, the state vector contains the information needed to calculate probabilities for possible measurements. A measurement is associated with possible outcomes and mathematical operators that determine their probabilities.

At diploma level, it is useful to distinguish two ideas:

  • State preparation: creating a desired initial state, often |0⟩ for each qubit.
  • Measurement: converting quantum information into classical data.

For a qubit in state |ψ⟩ = α|0⟩ + β|1⟩, computational-basis measurement yields 0 with probability |α|² and 1 with probability |β|². After an ideal measurement, the state is consistent with the observed outcome. If 0 is observed, a subsequent immediate measurement in the same basis returns 0 with certainty, assuming no intervening disturbance or noise.

Measurement is basis-dependent. A state that is definite in one basis may be a superposition in another. The states

|+⟩ = (|0⟩ + |1⟩)/√2

and

|−⟩ = (|0⟩ − |1⟩)/√2

both produce equal probabilities for 0 and 1 in the computational basis. Nevertheless, their relative phases differ, and a suitable later operation can distinguish them. This is why phase is computationally meaningful even though it is not directly observed in a single computational-basis measurement.

3. Superposition and Interference

Superposition

Superposition is the linear combination of allowed quantum states. It is not a statement that a macroscopic object is necessarily in two ordinary classical conditions in the everyday sense. It means that the state vector contains amplitudes associated with alternative measurement outcomes.

A useful operation is the Hadamard gate, represented by H. Its action on the computational basis is:

H|0⟩ = (|0⟩ + |1⟩)/√2
H|1⟩ = (|0⟩ − |1⟩)/√2

Applying H to |0⟩ produces equal measurement probabilities, but applying H again returns the original state because H² is the identity operation. This illustrates that superposition alone is not computational speedup. The algorithm must exploit phase and interference.

Interference

Quantum amplitudes combine before probabilities are calculated. If two computational paths contribute amplitudes with the same phase, they can reinforce one another. If their phases differ by π radians, they can cancel. This is analogous in form to wave interference, although the amplitudes represent probability amplitudes rather than ordinary water or sound waves.

Suppose two alternatives contribute amplitudes a and b. The probability associated with their combined alternative is:

P = |a + b|²

Expanding the expression gives:

P = |a|² + |b|² + 2Re(a*b)

where a* is the complex conjugate of a and Re denotes the real part. The cross term is the interference contribution. This formula applies when alternatives are coherent and indistinguishable in the relevant experiment. If environmental information distinguishes the alternatives, coherence is lost and the interference term may disappear.

4. Entanglement and Nonclassical Correlation

Two or more quantum systems are entangled when their joint state cannot be expressed as a product of independent states. For example, the Bell state

|Φ⁺⟩ = (|00⟩ + |11⟩)/√2

produces either 00 or 11 when both qubits are measured in the computational basis, each with probability 1/2. Neither individual qubit has a definite computational-basis value before measurement, but the outcomes are strongly correlated.

Entanglement does not permit faster-than-light communication. The local result is random, and useful comparison of results requires an ordinary classical communication channel. Entanglement is nevertheless a resource for quantum teleportation, distributed quantum protocols, error correction, and several quantum algorithms.

A separable two-qubit state has the form:

|ψ⟩A ⊗ |φ⟩B

where the state of each subsystem can be specified independently. The Bell state cannot be written in this form. This difference is operationally important because measurements on entangled systems display correlations that cannot be reproduced by assigning independent pre-existing values to all measurement choices under the assumptions tested by Bell experiments.

5. Foundational Experiments and the Development of Quantum Theory

Quantum computing rests on a century of experimental and theoretical work. Several landmark results changed the understanding of matter and light.

Blackbody radiation and energy quantization

Classical physics predicted an ultraviolet catastrophe when describing thermal radiation. Max Planck introduced energy elements proportional to frequency:

E = hν

where E is the energy of one quantum, h is Planck’s constant, and ν is frequency in hertz. This relation applies to a photon or an energy quantum in the relevant model; it does not state that every object has only one possible energy.

The photoelectric effect

Einstein explained that light transfers energy in discrete photons. A photon’s energy is E = hν. If the photon energy exceeds the material’s work function Φ, the maximum kinetic energy of an emitted electron is:

Kmax = hν − Φ

This equation applies under the idealized photoelectric model and assumes that one photon transfers its energy to one electron, with losses represented by the work function.

Atomic spectra and the Bohr model

Sharp atomic spectral lines indicated that atoms possess discrete energy levels. The Bohr model was historically important but is not the complete modern theory. In contemporary quantum mechanics, allowed energies arise from solutions to a system’s quantum dynamics and boundary conditions.

Electron diffraction

The Davisson–Germer experiment and related experiments showed that electrons can produce diffraction patterns. This supported wave–particle duality and the de Broglie relation:

λ = h/p

where λ is wavelength in metres and p is momentum in kilogram-metres per second. The relation is most significant for microscopic particles; for macroscopic objects the wavelength is normally too small to observe conveniently.

Stern–Gerlach experiment

A beam of silver atoms passing through a nonuniform magnetic field split into discrete components rather than producing a continuous smear. The experiment demonstrated quantized angular-momentum projections and provided an early physical model for a two-level system.

Double-slit interference

Particles such as electrons and photons can form interference patterns when experimental conditions preserve which-path indistinguishability. If path information becomes available through measurement or environmental interaction, the interference pattern is reduced or lost. This experiment motivates the modern concept of quantum coherence.

Bell tests

Bell’s theorem showed that no theory satisfying certain local hidden-variable assumptions can reproduce all quantum predictions. Experiments testing Bell inequalities have observed violations consistent with quantum mechanics. These results do not establish instantaneous signalling; they establish constraints on how quantum correlations can be explained using local classical hidden variables.

6. Quantum Dynamics and Gates

An ideal isolated quantum system evolves reversibly according to unitary dynamics. A unitary operator U satisfies:

U†U = UU† = I

where U† is the conjugate transpose of U and I is the identity operator. Unitary evolution preserves total probability and is reversible, with inverse U†.

A quantum gate is a controlled physical operation represented ideally by a unitary transformation. Common single-qubit gates include X, Y, and Z, which are related to rotations and phase changes. The X gate exchanges computational basis states:

X|0⟩ = |1⟩
X|1⟩ = |0⟩

A controlled-NOT, or CNOT, applies an X operation to a target qubit when a control qubit is |1⟩. Acting on computational-basis inputs:

|a,b⟩ → |a,a ⊕ b⟩

where a and b are bits and ⊕ denotes addition modulo 2. CNOT can create entanglement when its input includes a superposition.

A quantum circuit is an ordered arrangement of gates, measurements, and sometimes classically controlled operations. Quantum gates act on amplitudes, while measurement produces classical outcomes. A useful circuit must be compiled into operations supported by a particular hardware platform, subject to connectivity, timing, calibration, and error constraints.

7. Decoherence, Noise, and Error

Real quantum systems are not perfectly isolated. Interaction with the environment causes decoherence: the loss of phase relationships needed for interference. Energy relaxation can also move a system from an excited state toward a lower-energy state.

Two commonly used times are:

  • T₁: energy-relaxation time, often associated with decay toward the ground state.
  • T₂: coherence or dephasing time, describing the decay of phase coherence. In many systems, T₂ cannot exceed approximately twice T₁, with the exact relationship depending on noise mechanisms.

Quantum errors include bit flips, phase flips, leakage outside the computational subspace, measurement errors, control errors, and correlated errors. Unlike classical redundancy, quantum error correction cannot simply copy an unknown qubit because of the no-cloning theorem. Instead, information is encoded across entangled physical qubits, and carefully chosen measurements reveal error syndromes without directly revealing the encoded logical information.

The physical qubits are the hardware qubits. A logical qubit is an encoded qubit protected by an error-correction scheme. Fault-tolerant quantum computing requires physical error rates, control procedures, and architectures that allow logical operations to be performed reliably as the code size increases. This is a demanding engineering threshold, not an automatic consequence of having many qubits.

8. Why Quantum Computing?

Quantum computing is motivated by the possibility that certain computational problems are naturally connected to quantum evolution or have mathematical structure that quantum algorithms can exploit.

Simulation of quantum systems

Quantum systems become difficult to simulate classically because the number of parameters needed to describe a general n-qubit state grows as 2ⁿ. This does not mean every quantum system is impossible to simulate classically, but it explains why quantum simulation is a central motivation. Applications may include materials discovery, molecular energy estimation, catalysis, and condensed-matter physics.

Integer factoring and cryptography

Shor’s algorithm provides a polynomial-time quantum algorithm for integer factoring and discrete logarithms in the standard mathematical model. Large-scale fault-tolerant implementations could threaten widely used public-key systems based on factoring or discrete logarithms. This is why organizations are adopting post-quantum cryptography, which uses classical algorithms designed to resist known quantum attacks.

Search and amplitude amplification

Grover’s algorithm provides a quadratic query improvement for unstructured search. If a classical method requires O(N) oracle queries in the black-box model, Grover’s method requires O(√N) queries, subject to the assumptions of the oracle model and the cost of implementing the required operations. A quadratic improvement is valuable but is not an exponential speedup, and data loading can dominate practical performance.

Optimization and machine learning

Many proposed quantum optimization and machine-learning methods remain active research topics. Some may provide practical advantages for selected structures, but broad claims should be evaluated using rigorous benchmarks, end-to-end costs, noise analysis, and comparison with strong classical baselines. A quantum component is not automatically superior merely because it uses superposition.

9. The Quantum Technology Landscape

Quantum technology is broader than quantum computing. It includes quantum communication, quantum sensing, quantum simulation, and precision measurement.

Superconducting circuits

Superconducting qubits are electrical circuits operated at cryogenic temperatures. They can support fast gates and are manufactured using techniques related to microfabrication. Challenges include cooling infrastructure, material defects, crosstalk, calibration, and limited coherence.

Trapped ions

Trapped-ion systems use electromagnetic fields to confine ions in vacuum. Internal energy levels encode qubits, and laser or microwave pulses implement operations. These systems can exhibit high-fidelity operations and strong connectivity, but gate speeds and scaling of optical or control systems are significant challenges.

Neutral atoms

Neutral atoms can be held in optical traps and arranged into programmable arrays. Rydberg interactions can create strong, controllable couplings. Research focuses on gate fidelity, atom loss, optical control, and scalable architectures.

Photonic systems

Photons are attractive for communication because they travel well through optical networks and can operate at or near room temperature in parts of the system. Photonic quantum computing faces challenges in deterministic interactions, photon loss, source quality, detection, and resource overhead.

Semiconductor spin and other approaches

Electron or nuclear spins in semiconductor devices may benefit from compact fabrication and long coherence under suitable conditions. Other approaches include quantum dots, defects in diamond or other materials, and topological proposals. No single platform has yet eliminated all major scaling and error-correction challenges.

A meaningful comparison should consider more than the number of qubits. Important metrics include gate fidelity, measurement fidelity, coherence times, connectivity, gate speed, calibration stability, leakage, crosstalk, system availability, logical error rate, and the overhead required for error correction.

10. An Illustrative Application: Planning for Post-Quantum Security

Background

Consider a fictional regional hospital network that stores medical records and operates connected diagnostic devices. Its information systems use public-key cryptography for secure communication, authentication, and long-term archival protection.

Problem

Some medical records must remain confidential for decades. An adversary may capture encrypted traffic today and attempt to decrypt it later when a sufficiently capable quantum computer exists. This is called a “harvest now, decrypt later” risk.

Analysis

The organization cannot assume that quantum computers are already capable of breaking its encryption. However, it must account for the long confidentiality lifetime of health information, the time required to inventory systems, and the possibility that certificates, firmware, vendors, and legacy devices use different cryptographic mechanisms.

Approach and solution

The security team should first inventory cryptographic assets and identify where public-key algorithms based on factoring or discrete logarithms are used. It should classify information by confidentiality lifetime, consult applicable standards, and introduce crypto-agility: the ability to replace cryptographic algorithms without redesigning the entire system. Migration toward standardized post-quantum cryptographic algorithms should be tested in hybrid deployments where appropriate, while preserving authentication, performance, interoperability, and key-management requirements.

Outcome

The organization becomes better prepared regardless of the exact date of a cryptographically relevant quantum computer. It reduces long-term exposure and gains a documented transition plan rather than relying on speculative timelines.

Learning points

Quantum readiness is a governance and systems-engineering issue, not merely a laboratory issue. It requires asset discovery, risk prioritization, standards awareness, vendor coordination, testing, and staged migration. Quantum computing also illustrates an important professional principle: technological uncertainty does not justify ignoring measurable long-term risk.

11. Limitations, Ethics, and Responsible Practice

Quantum computers are sensitive scientific instruments, not universal replacements for classical computers. Current devices are often noisy, have limited qubit counts, require substantial control infrastructure, and may produce results that are difficult to validate. Classical simulation and error analysis remain essential.

Responsible communication should distinguish among:

  • a mathematical speedup proven in an idealized model;
  • an advantage demonstrated experimentally on a specialized benchmark;
  • a practical advantage over the best classical alternative; and
  • a commercially useful advantage after all hardware, data-transfer, and error-correction costs.

Ethical and governance issues include the potential weakening of current public-key security, unequal access to advanced infrastructure, environmental costs of cooling and manufacturing, responsible handling of sensitive quantum research, and avoidance of exaggerated performance claims. Organizations should use reproducible benchmarks, disclose assumptions, protect data, and involve security professionals when quantum systems interact with critical infrastructure.

Chapter Summary

Quantum computing treats information as a property of controllable physical systems governed by quantum mechanics. A classical bit has two logical states, whereas a qubit can occupy a normalized superposition of two basis states with complex amplitudes. Measurement produces classical outcomes according to the squared magnitudes of amplitudes and generally changes the state.

Superposition provides alternative amplitudes, but quantum advantage depends on purposeful interference. Entanglement creates nonseparable correlations and supports important protocols, while no-cloning and measurement disturbance distinguish quantum information from classical information. Experiments involving blackbody radiation, the photoelectric effect, atomic spectra, diffraction, Stern–Gerlach measurements, double-slit interference, and Bell tests established the physical foundations of the subject.

Quantum circuits use reversible unitary gates followed by measurement. Real devices experience decoherence, relaxation, control errors, leakage, and measurement errors. Error correction encodes logical information across physical qubits, but fault tolerance requires substantial engineering overhead. Quantum computing is motivated particularly by quantum simulation, factoring, search, and selected optimization problems; it is not automatically faster for every task.

The technology landscape includes superconducting circuits, trapped ions, neutral atoms, photonics, semiconductor spins, and other platforms. Evaluation must consider fidelity, connectivity, coherence, speed, scalability, and logical error rates rather than qubit count alone. Finally, quantum readiness includes post-quantum cybersecurity, realistic communication, ethical governance, and careful comparison with classical methods.

Key Terms

Qubit: A controllable two-level quantum system used as the basic unit of quantum information.

Classical bit: A physical or logical system representing one of two values, conventionally 0 or 1.

Quantum state: The mathematical description used to predict measurement probabilities for a quantum system.

Amplitude: A generally complex coefficient whose squared magnitude contributes to measurement probability.

Superposition: A linear combination of allowed quantum basis states.

Measurement: An interaction that produces a classical outcome and generally changes the quantum state.

Phase: The angular component of a complex amplitude that affects interference.

Interference: The reinforcement or cancellation of amplitudes when coherent alternatives combine.

Entanglement: A nonseparable relationship between quantum systems.

Unitary operator: A reversible transformation that preserves inner products and total probability.

Quantum gate: A controlled physical operation modeled ideally by a unitary operator.

Quantum circuit: An ordered arrangement of quantum gates, measurements, and control operations.

Decoherence: Loss of quantum coherence caused by environmental interaction.

T₁: A characteristic time associated mainly with energy relaxation.

T₂: A characteristic time associated mainly with loss of phase coherence.

Physical qubit: A hardware implementation of a qubit.

Logical qubit: An error-corrected qubit encoded using multiple physical qubits.

Fidelity: A measure of how closely an implemented state or operation matches the intended one.

Fault tolerance: Reliable computation maintained despite physical errors through architecture and error correction.

Post-quantum cryptography: Cryptographic methods designed to resist attacks from quantum and classical computers.

Review Questions

Short Answer Questions

  1. What is the principal difference between a classical bit and a qubit?
  2. Why are complex amplitudes, rather than only probabilities, needed to describe a qubit?
  3. What is meant by quantum interference?
  4. State one reason why entanglement does not enable faster-than-light communication.
  5. Distinguish between a physical qubit and a logical qubit.

Long Answer Questions

  1. Explain how measurement probabilities arise from the state |ψ⟩ = α|0⟩ + β|1⟩, including the normalization condition and the effect of measurement.
  2. Describe the role of the double-slit experiment and Bell tests in the development of quantum theory.
  3. Explain why superposition alone does not guarantee a quantum computational speedup.
  4. Compare superconducting, trapped-ion, and photonic quantum-computing platforms, including one strength and one challenge for each.
  5. Discuss why quantum error correction is necessary and why it cannot be implemented by simply copying an unknown qubit.

Analytical / Application Questions

  1. A company stores customer records that must remain confidential for 25 years. Design a high-level plan for assessing and reducing its exposure to future quantum attacks.
  2. A proposed quantum benchmark reports performance using only the number of physical qubits. Explain why this metric is insufficient and identify at least four additional metrics that should be examined.
  3. A two-qubit system is prepared in (|00⟩ + |11⟩)/√2. Analyze the possible computational-basis measurement outcomes and explain why the state is entangled rather than a classical independent mixture.

Multiple Choice Questions with Answers

Question 1

Which expression correctly represents a normalized pure qubit state?

A. |ψ⟩ = α|0⟩ + β|1⟩ with |α|² + |β|² = 1

B. |ψ⟩ = α|0⟩ + β|1⟩ with |α| + |β| = 2

C. |ψ⟩ = |0⟩ + |1⟩ without normalization

D. |ψ⟩ = α|0⟩ + β|1⟩ with α and β required to be real only

Correct Answer: A. |ψ⟩ = α|0⟩ + β|1⟩ with |α|² + |β|² = 1

Question 2

What determines the probability of measuring 0 from |ψ⟩ = α|0⟩ + β|1⟩ in the computational basis?

A. α

B. |α|²

C. |β|²

D. α + β

Correct Answer: B. |α|²

Question 3

What is the main computational role of quantum interference?

A. It copies unknown quantum states.

B. It guarantees that every problem is solved exponentially faster.

C. It reinforces useful amplitudes and cancels unwanted amplitudes.

D. It prevents all environmental noise.

Correct Answer: C. It reinforces useful amplitudes and cancels unwanted amplitudes.

Question 4

Which state is an example of a Bell state?

A. |0⟩

B. (|0⟩ + |1⟩)/√2

C. |00⟩

D. (|00⟩ + |11⟩)/√2

Correct Answer: D. (|00⟩ + |11⟩)/√2

Question 5

According to the photoelectric-effect model, the maximum kinetic energy of an emitted electron is:

A. Kmax = hν + Φ

B. Kmax = hν − Φ

C. Kmax = Φ − hν for all frequencies

D. Kmax = h/ν − Φ

Correct Answer: B. Kmax = hν − Φ

Question 6

What condition characterizes an ideal unitary quantum operation U?

A. U + U† = I

B. U² = 0

C. U†U = I

D. det(U) = 0

Correct Answer: C. U†U = I

Question 7

What does decoherence primarily describe?

A. The creation of a classical bit from a transistor

B. The loss of phase relationships through environmental interaction

C. The guaranteed improvement of gate fidelity

D. The conversion of all quantum states into entangled states

Correct Answer: B. The loss of phase relationships through environmental interaction

Question 8

Which statement about Grover’s algorithm is correct in the black-box search model?

A. It provides a quadratic query improvement, from O(N) to O(√N).

B. It always provides an exponential improvement.

C. It factors every integer in constant time.

D. It requires no oracle or problem-dependent operations.

Correct Answer: A. It provides a quadratic query improvement, from O(N) to O(√N).

Question 9

Why is post-quantum cryptography important?

A. Quantum computers have already replaced all classical computers.

B. It is designed to resist relevant quantum and classical attacks.

C. It eliminates the need for authentication.

D. It guarantees that data can never be intercepted.

Correct Answer: B. It is designed to resist relevant quantum and classical attacks.

Question 10

Which metric is especially relevant when assessing whether a quantum processor can support reliable computation?

A. The color of the laboratory equipment

B. The number of pages in its user manual

C. Logical error rate and gate fidelity

D. The physical size of its external casing only

Correct Answer: C. Logical error rate and gate fidelity

Quantum Mechanics for Computer Science
Chapter 1 of 14