Chapter 1: Introduction and Motivation#

These lecture notes accompany the course FYS5419/9419, Quantum Computing and Quantum Machine Learning, at the University of Oslo, and this chapter sets the stage for both of its halves. We explain the exponential growth of the Hilbert space of interacting many-body systems and why an unrestricted representation of a state becomes unmanageable as the system grows, while noting that symmetries and the structure of physical states are exactly what classical methods exploit, so that the exponential wall does not by itself make a given problem classically intractable. The historical context is presented, from Feynman’s original idea through phase estimation and variational algorithms to quantum machine learning and to recent experiments on noisy and error-corrected hardware, with demonstrated results distinguished from scalable advantage. We then state the resource questions that accompany every proposed calculation: state preparation, measurement precision, the accuracy of the operations and, for learning, the loading of the data and the classical competition. The chapter concludes with the models and principles followed throughout, an overview of the two parts of the notes, and the conventions used.

\[ \newcommand{\bm}[1]{\boldsymbol{#1}} \newcommand{\wick}[1]{\overline{#1}} \newcommand{\matr}[1]{\boldsymbol{#1}} \newcommand{\bfv}[1]{\boldsymbol{#1}} \renewcommand{\vec}[1]{\boldsymbol{#1}} \newcommand{\uvec}[1]{\boldsymbol{\hat{#1}}} \newcommand{\op}[1]{\widehat{#1}} \newcommand{\Op}[1]{\boldsymbol{\widehat{#1}}} \newcommand{\OP}[1]{\boldsymbol{\widehat{#1}}} \newcommand{\Det}[1]{|\boldsymbol{#1}|} \newcommand{\bigO}{\mathcal{O}} \newcommand{\var}{\mathrm{Var}} \newcommand{\cov}{\mathrm{Cov}} \newcommand{\real}[1]{\mathrm{Re}\left\{#1\right\}} \newcommand{\ud}[1]{d#1} \newcommand{\udd}[1]{d^2#1} \newcommand{\mean}[1]{\langle #1 \rangle} \newcommand{\overlap}[2]{\langle #1 | #2 \rangle} \newcommand{\bracket}[3]{\langle #1 | #2 | #3 \rangle} \newcommand{\projection}[2]{| #1 \rangle \langle #2 |} \newcommand{\brab}[1]{\big\langle #1 \big|} \newcommand{\ketb}[1]{\big| #1 \big\rangle} \newcommand{\bket}[1]{\vert #1\rangle} \newcommand{\bbra}[1]{\langle #1\vert} \newcommand{\ketbra}[2]{\vert #1\rangle\langle #2\vert} \newcommand{\braket}[2]{\langle #1\vert #2\rangle} \]
# Put every BookPrograms/chapter*/ and BookPrograms/common/ on sys.path
import sys, pathlib
root = pathlib.Path.cwd().resolve()
while not (root / 'BookPrograms').is_dir() and root.parent != root:
    root = root.parent
sys.path[:0] = sorted(str(p) for p in (root / 'BookPrograms').iterdir() if p.is_dir())
import numpy as np

The many-body problem#

Many of the central questions in physics concern interacting particles: electrons in a molecule, nucleons in a nucleus, spins in a magnet, or atoms in an optical lattice. We want binding energies, excitation spectra, response functions and time-dependent observables. A Hamiltonian may have a compact expression while its eigenstates and dynamics remain difficult to compute. The challenge is to extract the physical information we need without explicitly handling every coefficient of a many-body wave function.

Consider \(N\) identical fermions in \(M\) orthonormal single-particle states, including spin. Before exploiting additional symmetries, the fixed-particle-number space has dimension

\[ D_{\mathrm{F}}=\binom{M}{N}, \qquad D_{\mathrm{spin}}=2^n\tag{1.1} \]

for fermions and for \(n\) spin-\(1/2\) degrees of freedom, respectively. The fermionic dimension grows exponentially with \(M\) when the filling fraction \(N/M\) is held fixed away from zero and one. At half filling, for even \(M\), Stirling’s approximation gives

\[ \binom{M}{M/2}\sim \frac{2^M}{\sqrt{\pi M/2}}.\tag{1.2} \]

This qualification matters: at fixed \(N\), the growth with \(M\) is polynomial, \(\binom{M}{N}\sim M^N/N!\).

The resulting spaces are already large for modest model systems. Forty single-particle states at half filling give \(\binom{40}{20}\simeq1.38\times10^{11}\) determinants, while eighty give \(\binom{80}{40}\simeq1.08\times10^{23}\). A half-filled \(6\times6\) Hubbard lattice in the sector with 18 spin-up and 18 spin-down electrons has \(\binom{36}{18}^2\simeq8.24\times10^{19}\) determinants. For \(^{16}\)O, eight protons and eight neutrons distributed over forty single-particle states per species give \(\binom{40}{8}^2\simeq5.91\times10^{15}\) determinants before further symmetry restrictions. Chapter 3 develops these examples. Storing a generic state requires \(D\) amplitudes; storing a dense Hamiltonian requires \(D^2\) entries, although sparse and matrix-free methods avoid that second cost.

This exponential wall concerns the unrestricted representation of a state. It does not prove that every state, observable or Hamiltonian is classically intractable. A product state has a compact description even when it belongs to an exponentially large Hilbert space. Symmetries, conservation laws and the structure of physically relevant states can reduce the computational task substantially.

Classical many-body methods exploit precisely this structure. Hartree–Fock theory approximates a fermionic state by a single Slater determinant: it includes antisymmetry and exchange, but omits correlations beyond that determinant. Perturbation theory and coupled-cluster theory recover further correlations; their familiar polynomial scaling assumes fixed perturbative or excitation order. Configuration interaction becomes exact within a chosen one-particle basis when all determinants are retained, while truncated expansions trade accuracy for cost. Quantum Monte Carlo uses stochastic sampling and can be very effective, although sign or phase cancellations make many important fermionic problems expensive. Some models and parameter regimes are sign-problem free. Tensor networks exploit compressibility and entanglement structure; their cost depends on the required bond dimensions and on contracting the network. They are especially powerful for many one-dimensional problems, and can also be useful beyond one dimension.

These methods set a demanding standard for quantum computation. Strongly correlated fermions, long-time dynamics and competing energy scales can defeat particular classical approximations, but the difficulty depends on the system, observable and required accuracy. Our question is therefore specific: for which many-body tasks can a quantum computer improve on the best suitable classical calculation, once preparation, evolution, measurement and errors are all included?

The learning problem#

The second half of these notes asks a different question of the same machines. Machine learning, the fitting of parametrized models to data, has become a standard tool of the physical sciences in the last decade: neural networks represent the ground states of many-body Hamiltonians, emulate expensive simulations and classify experimental data [MLbook]. A quantum computer with \(n\) qubits works in a state space of \(2^n\) dimensions, more than any feature space a classical machine could work in explicitly, and quantum machine learning is the attempt to use that space for learning [Biamonte2017,Schuld2015,SchuldPetruccione2021].

The two halves are closer than their names suggest. The variational quantum eigensolver of Chapter 6 is already a learning algorithm: a parametrized circuit, a cost measured on a quantum device, and a classical optimizer in a loop. Replace the Hamiltonian by a cost defined by data, and add a circuit that writes a data point into the register, and the eigensolver has become a quantum neural network. Keep only the data-dependent circuit and measure overlaps of the states it prepares, and it supplies the kernel of a support-vector machine. Replace the pure state by the thermal state of a parametrized Hamiltonian, and it is a Boltzmann machine. The circuits, the measurement of Pauli sums, the parameter-shift gradients and the barren plateaus of Part I all return in Part II.

So does the qualification of the preceding section. A large state space is not by itself an advantage: a classical computer can also work implicitly in a very large feature space, through a kernel, and the classical methods of machine learning set a standard at least as demanding as the classical methods of many-body theory. Classical data must moreover be written into the register by a circuit, and every answer is an estimate from repeated measurements. The question of Part II is therefore the twin of the one above: for which learning tasks does a quantum resource reduce the number of experiments, improve the accuracy of an estimate, or lower the total computation at a fixed accuracy? Chapter 8 develops it. Its short answer is that the clearest gains known today concern data that are themselves quantum, such as the states prepared by the simulations of Part I, rather than classical data loaded into a circuit.

Feynman’s idea and what became of it#

At the 1981 conference on the physics of computation, Richard Feynman argued that quantum systems should be simulated using controllable quantum systems themselves [Feynman1982]. An explicit classical description of a general wave function requires exponentially many amplitudes, whereas a quantum device can represent the state physically. This observation motivates quantum simulation; it is not a proof that every quantum evolution is hard to simulate classically.

The gate model made this idea precise. Deutsch developed a universal quantum-computing framework, and Shor’s 1994 factoring algorithm demonstrated a polynomial-time quantum algorithm for a problem with no known polynomial-time classical solution. For many-body physics, Lloyd’s 1996 result established efficient simulation of systems with local interactions [Lloyd1996]. For a suitably specified Hamiltonian built from a polynomial number of efficiently implementable bounded local terms, product formulas approximate the evolution with a cost controlled by the system size, evolution time, interaction strengths and target error. The result concerns implementing an evolution; it does not supply its initial state or all the information in its final state.

Abrams and Lloyd connected simulated evolution to eigenvalue estimation [AbramsLloyd1999], and Aspuru-Guzik and collaborators analyzed molecular-energy calculations using quantum phase estimation [AspuruGuzik2005]. This gives a useful organizing sequence: encode the Hamiltonian, prepare a state, implement controlled evolution and extract an energy estimate. Each step has a cost and an accuracy requirement.

A complementary approach is the variational quantum eigensolver (VQE), demonstrated on a photonic processor in 2014 [Peruzzo2014]. It combines a parametrized circuit, measurements of the energy and a classical optimization loop. The motivation is to use circuits shorter than those required by conventional high-precision phase estimation, accepting additional sampling and optimization costs. Preskill’s discussion of noisy intermediate-scale quantum computing framed the opportunities and limitations of this regime [Preskill2018]. In nuclear physics, the 2018 deuteron calculation demonstrated an effective Hamiltonian, a fermion-to-qubit mapping and a variational calculation on a cloud-accessible superconducting processor [Dumitrescu2018]. Its small model space made it a test of the computational procedure, rather than a demonstration of an advantage over classical nuclear calculations.

Subsequent experiments illustrate progress on distinct fronts. A 2023 experiment studied spin dynamics on a 127-qubit superconducting processor using error mitigation [Kim2023]; the number of qubits alone does not establish superiority over classical methods. Encoded logical processing in neutral-atom arrays [Bluvstein2024] and below-threshold surface-code memories [Acharya2025] demonstrate important ingredients of fault tolerance. A logical memory outperforming a physical qubit is not the same achievement as a complete, scalable, fault-tolerant many-body calculation. Logical gates, decoding, state preparation and total resource costs remain part of that task.

Quantum machine learning grew out of the same two lines. On the fault-tolerant side, the linear-systems algorithm of Harrow, Hassidim and Lloyd [HHL2009], treated in Chapter 5, was applied to the training of support-vector machines [Rebentrost2014], with running times polylogarithmic in the size of the data under assumptions on data access that have since been examined closely [Aaronson2015,Tang2019]. On the near-term side, the quantum approximate optimization algorithm [Farhi2014], circuit learning with parameter-shift gradients [Mitarai2018] and kernels estimated on a superconducting processor [Havlicek2019] carried the variational loop from eigenvalue problems to optimization and classification. The observation that the gradients of generic parametrized circuits vanish exponentially with the number of qubits [McClean2018], and more recent work connecting trainable circuits to efficient classical surrogates [Cerezo2025], have led to a reassessment of what variational circuits are for. Part II presents that reassessment alongside the models themselves.

The field has also become part of nuclear-physics research planning [Beck2023]. These notes are written for graduate students who want to connect quantum algorithms to many-body models, to classical approximations, to machine learning and to executable calculations.

What a quantum computer can contribute#

A register of \(n\) qubits can represent a state in a \(2^n\)-dimensional space. An efficient circuit acts on that state without storing a classical list of amplitudes. This is an opportunity to exploit quantum dynamics and interference, not a prescription for reading exponentially many answers. Most states and unitaries cannot be prepared or implemented by a polynomial-size circuit. Three resource questions must accompany every proposed calculation, and a fourth every learning algorithm.

What state must be prepared? Suppose that the input to an ideal eigenvalue-estimation procedure is

\[ \vert\psi_{\mathrm{in}}\rangle =\sum_j c_j\vert E_j\rangle, \qquad p_j=|\langle E_j\vert\psi_{\mathrm{in}}\rangle|^2=|c_j|^2.\tag{1.3} \]

When the energies are sufficiently resolved, the probability of obtaining the outcome associated with \(E_j\) is approximately \(p_j\). For a nondegenerate target ground state, independent repetitions therefore require order \(1/p_0\) runs to observe it, assuming a fixed conditional success probability for the energy-estimation step. For a degenerate target, the relevant probability is the total weight in the resolved target subspace. A small overlap can erase an otherwise favorable simulation cost, and the cost of preparing the input state must also be counted. Ground-state quantum advantage cannot be inferred from efficient time evolution alone [Lee2023].

What information must be measured, and to what precision? A computational-basis measurement returns a bit string, not the amplitude list. Measurement changes the state according to the measurement operation; it need not destroy the physical register, and an eigenstate of the measured observable can remain unchanged. Fresh preparations are normally needed to collect independent samples of the premeasurement state.

For example, a nontrivial Pauli string \(P\) has outcomes \(\pm1\). From \(N_{\mathrm{shots}}\) independent ideal measurements, its sample-mean estimator has standard deviation

\[ \mathrm{sd}\!\left(\widehat{\langle P\rangle}\right) =\sqrt{\frac{1-\langle P\rangle^2}{N_{\mathrm{shots}}}} \leq \frac{1}{\sqrt{N_{\mathrm{shots}}}}.\tag{1.4} \]

Thus direct sampling has an inverse-square precision cost in the worst case. Measuring an energy, a sum of weighted Pauli strings, also involves the coefficients, measurement settings and allocation of shots. Chapter 6 develops this accounting. The formula describes sampling uncertainty; device noise and model approximations can introduce additional bias.

Phase estimation offers a different precision trade-off. With \(\hbar=1\), let \(U=\exp(-i\hat Ht_0)\) and assume the relevant energy interval is known so that phases can be unwrapped without ambiguity. A conventional \(m\)-qubit phase register has characteristic resolution

\[ \delta E\sim\frac{2\pi}{t_0\,2^m}, \qquad T_{\mathrm{evol}}=t_0\sum_{k=0}^{m-1}2^k =t_0(2^m-1).\tag{1.5} \]

Finer resolution therefore requires longer controlled evolution, with \(T_{\mathrm{evol}}\) of order \(1/\delta E\), before simulation error, confidence amplification and state-preparation costs are included. Exponential improvement with the register size must not be mistaken for an exponential improvement with total computational effort.

How accurately can the operations be implemented? Useful circuit depth depends on error rates, connectivity, parallel scheduling and the observable, so there is no universal gate budget for uncorrected hardware. Fault-tolerant error correction can suppress logical errors when its physical and architectural assumptions are met. Its overhead depends on the computation’s length and target failure probability, as well as physical error rates; it is not a fixed multiplier in qubit count. Error mitigation can reduce biases in estimated observables, often with increased sampling cost, but does not by itself protect an arbitrarily long computation.

How do the data get in, and what is the classical competitor? A quantum computer cannot read a file. In the learning algorithms of Part II every classical data point is written into the register by a circuit, the encoding, and the model is evaluated once per sample and per gradient component, each time to a precision limited by Eq. (1.4). An algorithm whose input is large and whose quantum speedup is a modest polynomial can lose to a classical machine on input and output alone [Hoefler2023], and the circuits that are easy to train are often circuits that a classical computer can emulate. Neither difficulty arises in the same form when the data are quantum states to begin with. Section Variational circuits reconsidered takes up these points.

Within these constraints, real-time dynamics is a particularly important opportunity. For suitable Hamiltonians and efficiently preparable initial states, a quantum computer can implement evolution and estimate selected observables without reconstructing the full wave function. General-purpose classical simulation can be difficult, but some dynamics and observables remain classically accessible. Likewise, quantum algorithms provide valuable alternatives when sign problems obstruct conventional sampling, while state preparation and measurement still require analysis.

We will distinguish an algorithmic scaling advantage, a numerical demonstration on a small model and a practical advantage over the best relevant classical method. These are different claims. The purpose of these notes is to make the assumptions and resource costs behind each claim explicit.

The approach of these notes#

We follow a small set of model Hamiltonians through the main computational steps. The Lipkin, pairing, Hubbard and Heisenberg models represent different forms of collective motion, pairing, itinerant correlations and magnetism. Symmetries reduce the spaces that must be considered; sufficiently small instances can then be diagonalized numerically. This provides reference results within the specified model, rather than an exact solution of the underlying physical system.

Chapter 3 introduces these models and the classical methods and constructs their qubit encodings, and Chapters 5–7 explore eigenvalue estimation, variational methods and filtering on them. We use common benchmarks where possible, but also change system sizes and encodings to expose the requirements of particular algorithms. A comparison is meaningful only when the Hamiltonian, symmetry sector, accuracy and resource definitions are matched.

Model

Physics

Useful symmetry

Representative encoding

Lipkin

Collective motion

Quasispin, parity

\(N=4\): four pseudospin qubits; smaller symmetry encodings are possible.

Pairing

Nuclear pairing, superconductivity

Particle number, seniority

\(L=4\): four pair qubits in the seniority-zero space; eight qubits for the full fermionic encoding.

Hubbard

Correlated electrons, cold atoms

Particle number, \(S^z\)

Four sites: eight spin-orbital qubits before symmetry reduction.

Heisenberg

Quantum magnetism

\(S^z\); total spin for the isotropic model

Four spin-\(1/2\) sites: four qubits.

Table 1.1: Representative benchmarks. Qubit counts refer to the stated encodings, not to a unique or minimal encoding of each model. Classical symmetries can also reduce the reference calculation.

Part II applies the same discipline to learning. Each of Chapters 9 to 12 takes a classical model (a support-vector machine, a combinatorial optimizer, a neural network, a Boltzmann machine), derives it in enough detail that the reader could implement it, replaces one of its components by a quantum circuit, and runs both versions on the same data in the same program. Where a classical surrogate of the quantum model is known, the chapter says what it is.

The second principle is to make the numerical work inspectable. The developed computational chapters provide Python examples using numpy, matplotlib and the standard library, with explicit state-vector simulation, gates, Pauli sums, mappings and optimization routines. The accompanying programs and notebooks let the reader compare a circuit calculation with a classical reference and inspect how errors change with the approximation. A state-vector simulation on a laptop is a way to test an algorithm; it is not itself evidence of quantum computational advantage.

The worked algorithms also prepare the reader to use hardware-oriented software. Translating them to a processor requires attention to native gates, connectivity, bit ordering, noise and measurement conventions; the step cannot be reduced to substituting a framework call for each mathematical operation.

The third principle is to keep guarantees, approximations and empirical observations distinct. We state the assumptions behind an algorithm, compare it with an appropriate classical baseline, and examine failure as well as success. In particular, a favorable result for a few qubits does not establish scalable trainability, efficient preparation of realistic ground states, or a practical advantage at useful accuracy.

A guide to the chapters#

The notes have two parts, which correspond to the two halves of the course, and Table 1.2 lists their chapters.

Part I is about quantum computing. Chapter 2 introduces the gate model, measurement, mixed states and entanglement. Chapter 3 introduces second quantization, the model Hamiltonians and the classical many-body approximations, and in its last two sections the Jordan–Wigner mapping, the symmetry encodings of the models, Pauli rotations and the measurement of Pauli sums. Unitary coupled-cluster circuits connect the many-body and quantum-computing viewpoints. Their general classical evaluation can be costly, but small instances and structured approximations remain classically tractable. Chapter 4 treats time evolution: product formulas of first, second and higher order with their error bounds, the circuits of a Trotter step, energies from a time series of overlaps, adiabatic state preparation and imaginary time. Chapters 5 and 6 treat phase estimation and variational algorithms, including their preparation, approximation and sampling costs. The quantum linear-systems algorithm is discussed as a related application: it prepares information about a solution in a quantum state, rather than printing every component at no cost. Chapter 7 studies resolution refinement and spectral filtering. The efficiency of refinement depends on the interpolation and its spectral gaps; filtering depends on the initial target weight, spectral resolution and acceptance probability.

Part II is about quantum machine learning. Chapter 8 defines the hybrid model of which every later model is a special case, introduces the encodings of classical data, examines the speedup claims of the literature, and presents the reassessment of variational circuits. Chapter 9 treats the support-vector machine and quantum kernels, Chapter 10 the quantum approximate optimization algorithm, Chapter 11 quantum neural networks and their physics-informed variant, and Chapter 12 classical and quantum Boltzmann machines. Chapter 13 is a placeholder for reinforcement learning and its quantum versions. Chapter 14 summarizes both parts and discusses hardware, alternatives to the gate model and open problems.

Two subjects of the book from which Part I is drawn [QCbook] are not part of the course, quantum error correction and a case study in lattice gauge theory, and its comparison of fermion-to-qubit mappings and encodings is condensed here. The text points to that book where they bear on an argument. For the classical side of Part II the companion text is Machine Learning and the Physical Sciences [MLbook], and for the many-body background Quantum Mechanics for Many-particle Systems [MBbook]; Section Relation to Part I and to the companion texts says which of their chapters each part of the notes rests on.

Chapter

Central question

Main tools or topics

Part I: quantum computing

2

How do states, gates and measurements work?

Linear algebra, circuits, density matrices, entanglement.

3

Which many-body quantities do we seek, and how is a Hamiltonian represented on qubits?

Second quantization, model Hamiltonians, FCI, HF, CC; Jordan–Wigner mapping, Pauli strings, symmetry encodings.

4

How can time evolution be implemented accurately?

Product formulas and their errors, Trotter circuits, time series, adiabatic and imaginary-time evolution.

5

How are phases and energies estimated?

QFT, QPE, precision costs and quantum linear systems.

6

What can parametrized circuits achieve?

VQE, measurement, gradients, ADAPT-VQE and QAOA.

7

How can a target eigenstate be selected?

Resolution refinement, rodeo filtering and resource estimates.

Part II: quantum machine learning

8

What is a quantum learning model, and what can it gain?

Hybrid model, data encodings, speedup claims, reassessment of variational circuits.

9

Can a quantum computer supply a useful kernel?

Support-vector machines, feature maps, fidelity kernels, shots, kernel alignment.

10

How is an optimization problem put on a circuit?

QUBO, Ising Hamiltonians, the alternating ansatz and its gradients.

11

Which functions does a circuit represent, and can it be trained?

Data re-uploading, Fourier picture, shift rules, quantum Fisher information, barren plateaus, differential equations.

12

What can a thermal state learn?

Boltzmann machines, contrastive divergence, Gibbs states, relative entropy, variational thermalizer.

13\(^\ast\)

How does an agent learn to act on, or with, a quantum system?

Markov decision processes, policy gradients, circuits as policies, quantum control.

14

Which opportunities and limitations remain?

Summary of both parts, hardware, alternative approaches and open problems.

Table 1.2: Chapter roadmap. An asterisk marks a chapter whose body is still planned; its row describes the intended scope.

How to read these notes#

We assume a first course in quantum mechanics, familiarity with linear algebra and some experience with numerical calculations. Second quantization is useful background, but the many-body primer provides the notation and examples needed here. No prior knowledge of quantum computing is assumed. Readers approaching from quantum information should pay particular attention to the classical methods in Chapter 3; readers approaching from many-body physics should work through the measurement and circuit examples in Chapter 2. For Part II we assume in addition that the reader has met linear regression, gradient descent and the idea of a training and a test set; everything else is derived where it is needed.

The chapters are meant to be read in order: Part I in the first half of the semester and Part II in the second, which uses the qubits, gates, measurements, Hamiltonians and variational algorithms of Part I without rederiving them. The small models allow each step to be checked independently. As you proceed, ask three questions: what quantity is being computed, which assumptions control its error, and what resources are required to obtain it? Exercises and programs in the computational chapters extend these comparisons, and each chapter has a notebook, generated from its text and its programs, in which it can be executed.

Our conventions are fixed throughout. Qubit \(0\) is the leftmost tensor factor and the most significant bit of \(\vert q_0q_1\cdots q_{n-1}\rangle\). In fermionic occupation encodings, \(\vert1\rangle\) denotes an occupied mode; a pair encoding instead uses it for an occupied pair level. Circuits are read from left to right, while operators in a product act from right to left. Rotations are \(R_a(\theta)=\exp(-i\theta\sigma_a/2)\), so \(R_a(2\pi)=-I\): on an isolated register this is an unobservable global phase, whereas relative phases, including those in controlled operations, can be observable. Hamiltonians carry a hat, \(\hat H\), and their qubit representations are Pauli sums \(\sum_\alpha h_\alpha P_\alpha\), with \(P_\alpha\) built from \(I,X,Y,Z\). We use \(\hbar=1\) unless stated otherwise and specify the energy scale of each model. In Part II a sample is \(\vec{x}\in\mathbb{R}^d\), a label \(y=\pm1\), a kernel \(K(\vec{x},\vec{x}')\), the trainable parameters of a circuit are \(\vec{\theta}\), and expectation values are estimated from \(S\) shots; Section Conventions, notation and software collects that notation.

With these conventions, the same calculation can be followed from a many-body basis or a data set to a qubit Hamiltonian or an encoding, a circuit and a measured quantity. Keeping those connections explicit is the central learning goal of the course.