2. Quantum Mechanics and Quantum InformationIntroduction and ContextQuantum artificial intelligence rests on two disciplines that must be understood together. Quantum mechanics provides the physical theory governing microscopic systems, while quantum information theory describes how information is represented, manipulated, transmitted, and measured in such systems. Classical artificial intelligence assumes that information is encoded in bits and processed through deterministic or probabilistic operations. Quantum computing replaces the classical bit with the qubit and uses physical principles such as superposition, interference, and entanglement to create computational resources that have no direct classical equivalent. The purpose of this chapter is not to treat quantum mechanics as a complete physics course. Instead, it develops the mathematical and conceptual foundation required to understand quantum algorithms, quantum machine learning, variational quantum circuits, quantum data encoding, and the interpretation of quantum-model outputs. A strong grasp of these foundations is essential because quantum advantages cannot be understood merely by saying that a quantum computer evaluates many possibilities simultaneously. Quantum states are complex mathematical objects, measurement is probabilistic, and useful computation depends on controlling amplitudes through interference. Learning ObjectivesBy the end of this chapter, the learner should be able to: 1. Explain the structure and interpretation of a qubit and its state vector. 2. Distinguish superposition, interference, and entanglement. 3. Represent pure and mixed states using state vectors and density matrices. 4. Describe measurement, observables, expectation values, and the Born rule. 5. Explain tensor-product systems and the distinction between separable and entangled states. 6. Apply the no-cloning theorem and other quantum information principles to AI and computing. 7. Identify practical, technical, and interpretive limitations of quantum information processing. From Classical Bits to QubitsA classical bit has one of two values, 0 or 1. A qubit is a quantum system with two distinguishable basis states, conventionally written as |0⟩ and |1⟩. The computational basis states are represented by the column vectors |0⟩ = [1, 0]^T, |1⟩ = [0, 1]^T. Unlike a classical bit, a qubit can occupy a coherent superposition of both basis states: |ψ⟩ = α|0⟩ + β|1⟩, where α and β are complex amplitudes satisfying |α|² + |β|² = 1. The amplitudes are not themselves probabilities. Their squared magnitudes are probabilities: measurement in the computational basis yields 0 with probability |α|² and 1 with probability |β|². The relative phase between α and β also matters, even though it cannot be observed directly in a single computational-basis measurement. A useful geometric representation is the Bloch sphere. Every pure single-qubit state can be written, up to a physically irrelevant global phase, as |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ} sin(θ/2)|1⟩. Here θ determines the latitude and φ determines the azimuthal angle. The north and south poles correspond to |0⟩ and |1⟩. Points on the equator represent equal-magnitude superpositions with different relative phases. The Bloch sphere is valuable for visualizing single-qubit gates, but it does not generalize directly as a simple three-dimensional picture for many-qubit systems. A qubit is not simply a classical bit whose value is unknown. A classical uncertainty about a bit means that the bit has a definite value but the observer lacks knowledge of it. A coherent quantum superposition includes phase information and can produce interference. This distinction is central to quantum algorithms. Linear Algebra as the Language of Quantum InformationQuantum states are vectors in complex Hilbert spaces. The inner product of vectors |u⟩ and |v⟩ is written ⟨u|v⟩. A valid state vector has unit norm, so ⟨ψ|ψ⟩ = 1. The conjugate transpose of a column vector is called a bra; the original vector is a ket. Together they form Dirac notation. Quantum operations performed without measurement are represented by unitary operators U. A unitary operator satisfies U†U = I, where U† is the conjugate transpose and I is the identity operator. If a state evolves from |ψ⟩ to |ψ′⟩, then |ψ′⟩ = U|ψ⟩. Unitary evolution preserves normalization and is reversible. This reversibility differentiates quantum gates from many classical machine-learning operations, such as irreversible thresholding or information-discarding transformations. Important single-qubit gates include the Pauli operators X, Y, and Z, and the Hadamard gate H. The X gate exchanges |0⟩ and |1⟩ and is analogous to a bit flip. The Z gate changes the phase of |1⟩ without changing computational-basis probabilities. The Hadamard gate creates and removes balanced superpositions: H|0⟩ = (|0⟩ + |1⟩)/√2, H|1⟩ = (|0⟩ − |1⟩)/√2. The two resulting superpositions have identical computational-basis probabilities but different relative phases. Subsequent operations can distinguish them through interference. Superposition and InterferenceSuperposition allows a quantum state to contain amplitudes associated with multiple basis states. For n qubits, the state space has dimension 2ⁿ: |ψ⟩ = Σ_x α_x|x⟩, where x ranges over all n-bit strings and Σ_x |α_x|² = 1. This exponential state-space dimension is often described as a source of quantum computational power. However, a measurement returns only one outcome, not a readable list of all 2ⁿ amplitudes. Algorithms must therefore transform amplitudes so that desirable outcomes are amplified and undesirable outcomes cancel. This transformation is interference. Amplitudes, unlike probabilities, can be positive, negative, or complex. When alternatives lead to the same outcome, their amplitudes add. They may reinforce one another constructively or cancel destructively. The quantum algorithm is successful only when its circuit creates a useful interference pattern. For example, applying H to |0⟩ produces (|0⟩ + |1⟩)/√2. Applying H again returns the state to |0⟩ because the two paths associated with |0⟩ and |1⟩ interfere constructively for |0⟩ and destructively for |1⟩. This example demonstrates why the phrase “quantum computers try all possibilities at once” is incomplete: the computational resource is coherent amplitude evolution, not unrestricted parallel access to every answer. Multiple Qubits and EntanglementThe state space of a composite system is formed using the tensor product. If qubit A is in |a⟩ and qubit B is in |b⟩, their joint state is |a⟩⊗|b⟩, commonly written |ab⟩. A general two-qubit state is |ψ⟩ = α₀₀|00⟩ + α₀₁|01⟩ + α₁₀|10⟩ + α₁₁|11⟩. A state is separable if it can be written as |ψ_A⟩⊗|ψ_B⟩. Otherwise it is entangled. One of the Bell states is |Φ⁺⟩ = (|00⟩ + |11⟩)/√2. This state cannot be expressed as a product of two single-qubit states. Measuring the first qubit in the computational basis gives 0 or 1 with equal probability, and the second qubit will yield the same result when measured in that basis. The correlation cannot be explained by assigning independent local pure states to the two qubits. Entanglement is not merely strong classical correlation. It is a property of the joint quantum state and may produce correlations that depend on the measurement basis. It is a resource for quantum communication, error correction, simulation, and algorithms. It does not, however, permit faster-than-light communication: local measurement outcomes remain intrinsically random, and useful comparison of results requires classical communication. Measurement and ObservablesMeasurement connects the mathematical state to an observed outcome. In the simplest projective measurement, a state is measured in an orthonormal basis. If |ψ⟩ = α|0⟩ + β|1⟩, computational-basis measurement produces 0 with probability |α|² and 1 with probability |β|². After the measurement, the state is projected onto the observed basis state. Repeated preparation and measurement are therefore needed to estimate probabilities accurately. More generally, an observable is represented by a Hermitian operator A satisfying A† = A. Hermitian operators have real eigenvalues, which represent possible measurement outcomes. If a state is |ψ⟩, the expected value of A is ⟨A⟩ = ⟨ψ|A|ψ⟩. The expectation value is an average over many identically prepared experiments; it is not necessarily the result of one measurement. In quantum machine learning, expectation values are frequently used as model outputs or loss-function components. For example, a variational circuit may prepare |ψ(θ)⟩ and use ⟨ψ(θ)|Z|ψ(θ)⟩ as a scalar prediction. Projective measurement is only one measurement framework. Positive-operator-valued measures, or POVMs, describe more general measurement procedures using positive operators {E_m} satisfying Σ_m E_m = I. The probability of outcome m is ⟨ψ|E_m|ψ⟩ for a pure state. POVMs are important in quantum communication, state discrimination, and realistic measurement modelling. Pure States, Mixed States, and Density MatricesA pure state represents maximal knowledge of the quantum state and can be described by a state vector. A mixed state represents a statistical ensemble of possible pure states. It may arise because a preparation procedure randomly selects among states, or because part of an entangled system is ignored. Mixed states are represented by density operators or density matrices: ρ = Σ_i p_i |ψ_i⟩⟨ψ_i|, where p_i ≥ 0 and Σ_i p_i = 1. A valid density matrix is Hermitian, positive semidefinite, and has trace one. For a pure state, ρ = |ψ⟩⟨ψ| and Tr(ρ²) = 1. For a genuinely mixed state, Tr(ρ²) < 1. This quantity is called purity. The density-matrix formulation unifies state description and measurement. For an observable A, ⟨A⟩ = Tr(ρA). If a composite system AB has density matrix ρ_AB, the state of subsystem A is obtained through the partial trace: ρ_A = Tr_B(ρ_AB). For the Bell state |Φ⁺⟩, the total state is pure, but each individual qubit has reduced state I/2, the maximally mixed single-qubit state. This result illustrates that ignorance about a subsystem can arise from entanglement rather than from an ordinary classical random choice. Density matrices are indispensable in practical quantum AI because real devices experience noise, imperfect initialization, decoherence, and measurement errors. They also allow algorithms to process classical mixtures and quantum data in a single mathematical framework. Quantum Channels and NoiseIdeal unitary gates do not describe all physical processes. A quantum channel is a completely positive, trace-preserving map that transforms an input density matrix into an output density matrix. Noise channels include bit-flip, phase-flip, depolarizing, amplitude-damping, and dephasing channels. Decoherence destroys phase relationships, reducing the ability of a system to interfere. Amplitude damping models energy relaxation, such as decay from |1⟩ toward |0⟩. In an AI application, noise can alter feature maps, distort expectation values, and change the optimization landscape of a variational circuit. Consequently, practical quantum machine learning often uses error mitigation, noise-aware training, circuit simplification, repeated sampling, and calibration. A noisy output should not automatically be interpreted as evidence that a model has learned a meaningful pattern. Statistical uncertainty and hardware noise must be separated from model uncertainty and data uncertainty. The No-Cloning Theorem and Quantum Information PrinciplesThe no-cloning theorem states that no physical operation can produce an identical copy of an arbitrary unknown quantum state. Suppose a unitary operation could clone every state, so that U(|ψ⟩|0⟩) = |ψ⟩|ψ⟩. Applying this operation to two states and preserving inner products leads to a contradiction unless the states are identical or orthogonal. Therefore, unknown quantum information cannot be copied perfectly. No-cloning has several consequences. Quantum data cannot be duplicated for conventional backup in the same way as classical data. Quantum error correction must encode information across entangled systems rather than copy an unknown state into independent replicas. Measurement can also disturb a state, so inspecting quantum information is not a neutral operation. No-cloning does not prohibit copying known basis states or preparing multiple copies when the preparation procedure is known. It prohibits universal perfect cloning of arbitrary unknown states. Related principles include no-deleting, which limits the deletion of an unknown quantum state from a larger system, and no-signalling, which prevents entanglement from being used for superluminal communication. Quantum Information in Artificial IntelligenceQuantum AI uses quantum states and circuits in several ways. In quantum-enhanced machine learning, classical features may be encoded into rotation angles, amplitudes, basis states, or more elaborate data-loading procedures. A parameterized quantum circuit then applies trainable gates, and measurements produce features, class probabilities, or expectation values. Classical optimization algorithms update the circuit parameters. A typical hybrid workflow is: 1. Normalize and preprocess classical data. 2. Encode a data vector x into a quantum state |ψ(x)⟩ or density matrix ρ(x). 3. Apply a parameterized circuit U(θ). 4. Measure one or more observables. 5. Compare the measurements with target values through a loss function. 6. Use a classical optimizer to update θ. The encoding method is a modelling decision, not a minor implementation detail. Amplitude encoding may represent many values compactly in principle, but state preparation can be costly. Angle encoding is often simpler but may require more qubits or repeated layers. The useful resource is determined by the complete pipeline, including data loading, circuit depth, sampling, optimization, and error control. Quantum kernels estimate similarities through overlaps or feature-space measurements. Variational quantum classifiers use trainable circuits to generate decision functions. Quantum generative models attempt to reproduce probability distributions. In all cases, the physical meaning of amplitudes, measurement statistics, and noise must be considered when interpreting results. Illustrative Case Study: A Noisy Quantum ClassifierBackgroundConsider an illustrative research team developing a binary classifier for two classes of sensor records. The dataset has four normalized numerical features. The team proposes a four-qubit variational circuit and expects quantum superposition to provide an automatic advantage. Situation and ProblemThe first prototype achieves inconsistent accuracy across runs. The team initially attributes the variation to the optimizer, but inspection shows that the circuit is deep, the hardware has significant readout error, and only a small number of shots are used per input. In addition, the feature-encoding method places several important features in rotation angles that are later partially cancelled by trainable gates. AnalysisThe problem is not solved by adding more layers. The circuit output is an expectation value estimated from finite samples, so it contains sampling noise. Hardware decoherence changes the prepared density matrix, while readout error changes the observed frequencies. The model also has a trainability issue: a highly expressive circuit may produce gradients too small to guide optimization, a phenomenon often associated with barren plateaus. The team separates three sources of variation: data sampling, quantum measurement sampling, and device noise. It establishes a classical baseline, tests the encoding circuit independently, and examines expectation-value distributions before training. Approach and SolutionThe team reduces circuit depth, uses angle encoding with a carefully selected feature map, and trains on a simulator with a noise model before using hardware. It measures multiple observables and averages results across repeated runs. Readout mitigation is applied, and the model is compared with a classical logistic-regression baseline. The loss function is changed so that its scale is compatible with the measured observables, and parameter initialization is restricted to avoid highly concentrated random circuits. OutcomeThe revised system becomes more stable and its results are easier to interpret. It does not outperform the classical baseline on the available dataset, but the experiment provides a valid assessment of the quantum model rather than an uncontrolled hardware demonstration. Learning PointsThe case illustrates that quantum AI performance depends on the entire information-processing chain. Superposition alone does not guarantee useful learning. State preparation, interference, measurement statistics, noise, optimization, and comparison with appropriate baselines must be evaluated together. Challenges, Limitations, and Common MistakesSeveral misconceptions regularly lead to poor quantum-AI designs. First, a 2ⁿ-dimensional state vector does not mean that 2ⁿ independent classical answers can be extracted from n qubits. Measurement provides limited information. Second, entanglement is not automatically beneficial; creating and maintaining it can increase circuit complexity and sensitivity to noise. Third, quantum speedup is algorithm- and problem-dependent. A quantum circuit may be slower overall if state preparation and measurement repetition dominate the computation. Other common mistakes include confusing amplitudes with probabilities, ignoring relative phase, treating a mixed state as an unknown pure state, reporting one measurement as an expectation value, and comparing a quantum model with a weak classical baseline. Researchers should also distinguish a theoretical asymptotic advantage from an experimentally demonstrated practical advantage. Current hardware has limited qubit counts, finite coherence times, imperfect gates, and noisy readout. Error-corrected quantum computing may eventually reduce these constraints, but it requires substantial overhead and remains an active engineering and research challenge. Professional, Ethical, and Governance ConsiderationsQuantum AI projects should report data-preparation costs, circuit depth, number of shots, hardware configuration, noise conditions, mitigation methods, and uncertainty estimates. Reproducibility requires publishing circuits, parameter settings, random seeds where relevant, and baseline implementations. Ethically, quantum branding should not be used to imply performance that has not been demonstrated. Decisions in healthcare, finance, employment, or public services require validation, interpretability, security, and accountability regardless of whether the model is classical or quantum. Quantum technologies may also affect cryptography, making migration toward post-quantum cryptographic standards an important organizational consideration. Emerging Directions and Best PracticesCurrent work increasingly focuses on hybrid quantum-classical architectures, quantum error mitigation, error-corrected algorithms, quantum kernels, quantum generative modelling, and methods for learning from quantum-generated data. Research is also examining resource-efficient encodings, trainability, symmetry-preserving circuits, and the relationship between quantum feature spaces and classical kernel methods. Best practice is to begin with a clearly defined computational bottleneck, establish a strong classical baseline, select an encoding compatible with the data, minimize unnecessary circuit depth, quantify statistical and hardware uncertainty, and evaluate whether the complete workflow offers a credible advantage. Quantum information should be treated as a constrained computational resource, not as a substitute for careful modelling. Chapter SummaryA qubit is a normalized vector in a complex two-dimensional space, and its amplitudes determine measurement probabilities while relative phase enables interference. Unitary operators describe reversible quantum evolution. Tensor products construct multi-qubit systems, and entanglement describes joint states that cannot be decomposed into independent subsystem states. Measurement is probabilistic and is represented mathematically through observables, projectors, and more general POVMs. Pure states are represented by state vectors, whereas mixed states are represented by density matrices. The density-matrix formalism supports expectation values, partial traces, and realistic descriptions of noise and entanglement. The no-cloning theorem shows that arbitrary unknown quantum states cannot be copied perfectly. In quantum AI, these principles govern data encoding, variational circuits, quantum kernels, measurement-based outputs, and hybrid optimization. Practical success depends not only on quantum phenomena but also on state preparation, noise, sampling, trainability, reproducibility, and fair classical comparison. Key TermsQubit: A two-level quantum system used as the basic unit of quantum information. State vector: A normalized complex vector representing a pure quantum state. Amplitude: A complex coefficient whose squared magnitude contributes to measurement probability. Superposition: A coherent linear combination of basis states. Relative phase: The phase difference between components of a superposition, affecting interference. Unitary operator: A reversible linear operator satisfying U†U = I. Interference: Addition or cancellation of probability amplitudes. Tensor product: Mathematical operation used to construct the state space of composite systems. Entanglement: A nonseparable relationship between parts of a composite quantum state. Measurement: A physical operation that produces probabilistic outcomes and generally changes the state. Observable: A Hermitian operator representing a measurable physical quantity. Expectation value: The statistical average of an observable over repeated measurements. Density matrix: An operator representing a pure state or statistical mixture. Mixed state: A probabilistic ensemble of pure states. Purity: The quantity Tr(ρ²), indicating how pure or mixed a state is. Partial trace: Operation used to obtain the reduced state of a subsystem. Quantum channel: A completely positive, trace-preserving transformation of quantum states. Decoherence: Loss of quantum coherence caused by interaction with the environment. No-cloning theorem: Principle stating that arbitrary unknown quantum states cannot be copied perfectly. POVM: A generalized measurement described by positive operators summing to the identity. Review QuestionsShort Answer Questions1. Why are the coefficients in a qubit state called amplitudes rather than probabilities? 2. What role does relative phase play in quantum computation? 3. Define an entangled state and give one example. 4. What is the difference between a pure state and a mixed state? 5. State the no-cloning theorem. Long Answer Questions1. Explain the Bloch-sphere representation of a single qubit and discuss its limitations for multi-qubit systems. 2. Describe how interference contributes to the success of a quantum algorithm. 3. Explain density matrices, purity, expectation values, and partial trace. 4. Compare projective measurements and POVMs in the context of quantum information. 5. Discuss how quantum information principles influence the design of quantum machine-learning systems. Analytical / Application Questions1. A qubit is prepared as (√3/2)|0⟩ + (1/2)|1⟩. Calculate the probabilities of the two computational-basis outcomes and explain whether the relative phase is specified. 2. A variational quantum classifier produces different accuracies when the number of measurement shots is changed. Analyze the likely cause and propose an experimental procedure to distinguish sampling noise from hardware noise. 3. A team claims that an eight-qubit circuit can provide 256 classical predictions in one measurement because its state space has dimension 256. Evaluate this claim using the principles of measurement, amplitudes, and interference. 22. Multiple Choice Questions with AnswersQuestion 1A qubit is in the state |ψ⟩ = (1/√2)|0⟩ + (1/√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 2Which property primarily enables two superposition components to cancel each other? A. Normalization B. Relative phase C. Classical randomness D. Partial trace Correct Answer: B. Relative phase Question 3Which state is entangled? A. |0⟩⊗|1⟩ B. (|0⟩ + |1⟩)⊗|0⟩ C. (|00⟩ + |11⟩)/√2 D. |1⟩⊗|1⟩ Correct Answer: C. (|00⟩ + |11⟩)/√2 Question 4For an observable A and density matrix ρ, which expression gives the expectation value? A. Tr(ρA) B. Tr(ρ + A) C. ρAρ D. A†A Correct Answer: A. Tr(ρA) Question 5What does a reduced density matrix of I/2 for one qubit of a Bell pair indicate? A. The total Bell state is mixed B. The individual qubit is maximally mixed C. The qubit is definitely in |0⟩ D. The qubits are uncorrelated Correct Answer: B. The individual qubit is maximally mixed Question 6Why does a quantum measurement not generally reveal all amplitudes in an n-qubit state? A. Amplitudes are always real B. Measurement produces a probabilistic outcome and disturbs the state C. Unitary operators destroy normalization D. Entanglement removes all information Correct Answer: B. Measurement produces a probabilistic outcome and disturbs the state Question 7Which operation is required to preserve norm during ideal closed-system quantum evolution? A. A unitary operation B. A threshold function C. An arbitrary nonlinear map D. A classical copy operation Correct Answer: A. A unitary operation Question 8A quantum classifier becomes unstable when circuit depth increases on noisy hardware. Which explanation is most appropriate? A. Deeper circuits can increase decoherence and gate-error accumulation B. Superposition disappears in all circuits with more than one gate C. Density matrices cannot represent noisy systems D. Measurement becomes deterministic in deep circuits Correct Answer: A. Deeper circuits can increase decoherence and gate-error accumulation Question 9What does the no-cloning theorem prohibit? A. Preparing two copies of a known state B. Copying an arbitrary unknown quantum state perfectly C. Measuring a computational-basis state D. Using entanglement in communication Correct Answer: B. Copying an arbitrary unknown quantum state perfectly Question 10Why is a classical baseline important in evaluating a quantum machine-learning model? A. It proves that quantum states are classical B. It determines whether any claimed benefit exceeds ordinary alternatives C. It eliminates measurement noise D. It guarantees quantum advantage Correct Answer: B. It determines whether any claimed benefit exceeds ordinary alternatives
|