Skip to content

Latest commit

 

History

1,595 Commits

Folders and files

Repository files navigation

Quantum Computing and Quantum Machine Learning

The first part of the course (project 1 and till mid march) has its focus on studies of quantum-mechanical many-particle systems using quantum computing algorithms and quantum computers. The second part depends on the interests and backgrounds of the participants. The lectures cover mainly quantum machine learning algorithms with an emphasis on variational quantum algorithms for NISQ-era quantum computers. The schedule is adaptive and the lecture plan for the spring 2027 (see below) follows the plan from the spring 2026 and reflects the choices which can be made.

During the spring semester of 2026 we have discussed for example quantum machine learning methods such as quantum neural networks, quantum support vector machines, quantum Boltzmann machines and the QAOA algorithm. Fault-tolerant algorithms like quantum Fourier transforms, quantum phase estimation and the HHL algorithm are also discussed. This is also a possibility during spring 2027.

Lecture notes in PDF format, as a Jupyter-book, programs, and weekly material

Other textbooks used:

Interesting online courses and software:

Time: Lectures each Thursday at 1015am-12pm CET and exercise sessions Thursdays at 1215pm-2pm CET (The lecture sessions will be recorded)

-Permanent Zoom link for the whole semester is https://uio.zoom.us/my/mortenhj

Week 1, Thursday January 21, 2027. Overview of first week, Basic Notions of Quantum Mechanics

  • Practicalities, why quantum computing and quantum computing in a nutshell
  • Linear algebra reminder, Dirac notation, basis states and operators
  • Composite systems and tensor products
  • Measurements, operators and unitary transformations
  • Getting started with Qiskit and the QDK: installation and one- and two-qubit gates
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 1, sections 2.1 and 2.2.1-2.2.5 of chapter 2, sections A.2-A.4 of appendix A (Qiskit and the QDK) and section B.2 of appendix B. See also Scherer chapter 2 and/or Hidary chapter 12

Week 2, Thursday January 28, 2027. Composite Systems and Tensor Products: Measurements, Density Matrices and Entanglement

  • Hermitian operators and the spectral decomposition
  • The Bloch sphere
  • Measurements
  • Density matrices, pure and mixed states
  • Two qubits and entanglement
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 2, sections 2.2.6, 2.3, 2.4, 2.5.1 and 2.6.1-2.6.3. See also Scherer chapter 2 and sections 3.1-3.3 and Hundt, Quantum Computing for Programmers, chapter 2.1-2.5. Hundt's text is relevant for the programming part where we build from scratch the ingredients we will need.

Week 3, Thursday February 4, 2027. Density Matrices and Measurements: Entanglement and Entropies

  • The Bell states and their density matrices
  • Pure and mixed states, reduced density matrices and the partial trace
  • Classical entropy and the von Neumann entropy
  • Entanglement entropy, with codes
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 2, sections 2.5.1-2.5.2, 2.6.1-2.6.3 and 2.6.5. See also Olivares chapter 2 and/or Scherer chapter 2, and Hundt chapter 2 for the programming part

Week 4, Thursday February 11, 2027. Quantum Gates, Circuits and Hamiltonians as Pauli Strings

  • Reminder from last week on entanglement, density matrices and entropies
  • The Schmidt decomposition
  • One-qubit and two-qubit gates and circuits
  • Rewriting a Hamiltonian matrix in terms of Pauli strings, with a 2x2 and a 4x4 matrix as examples, and getting started with the first project
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, sections 2.6.4, 2.7, 2.8 and 2.10 of chapter 2, section 3.7.1 of chapter 3 and sections A.5.1-A.5.3 of appendix A. For the discussion of one-qubit, two-qubit and other gates, see also sections 2.6-2.11 and 3.1-3.4 of Hundt's book Quantum Computing for Programmers

Week 5, Thursday February 18, 2027. The Variational Quantum Eigensolver (VQE)

  • The variational principle and the VQE algorithm, parametrized circuits
  • Measurements of Pauli strings with shots and why we measure on all qubits
  • Gradients and the parameter-shift rule
  • The VQE for the one-qubit (2x2) and the two-qubit (4x4) Hamiltonians from last week
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 6, sections 6.1-6.4, 6.5.1, 6.5.3 and 6.6, section 3.8.4 of chapter 3 and section A.5 of appendix A. See also section 6.11 of Hundt's book Quantum Computing for Programmers

Week 6, Thursday February 25, 2027. The Lipkin Model with the VQE and the ADAPT-VQE

  • The Lipkin model and its Hamiltonian rewritten in terms of Pauli strings
  • Circuits from exponentials of Pauli strings
  • Measurements on all qubits
  • The VQE for the Lipkin model with two and four particles
  • The ADAPT-VQE algorithm
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 3, sections 3.3.1, 3.5.4, 3.7.4, 3.8.1 and 3.8.4, and chapter 6, sections 6.3, 6.4, 6.5.3, 6.7.1-6.7.2 and 6.8

Week 7, Thursday March 4, 2027. The Pairing Model with the VQE and the ADAPT-VQE

  • From fermions to qubits, the Jordan-Wigner transformation
  • The pairing model and its Hamiltonian rewritten in terms of Pauli strings
  • Circuits which conserve the number of pairs and measurements on all qubits
  • The VQE and the ADAPT-VQE for the pairing model with four levels
  • Hardware-efficient circuits and barren plateaus
  • The VQE with noisy shots
  • Summary of the VQE and its family of methods (weeks 5-7), material for the first midterm
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 3, sections 3.3.2, 3.6.3, 3.7 (with 3.7.2 and 3.7.4) and 3.8.3-3.8.5, chapter 6, sections 6.3.2, 6.4.1, 6.5.2-6.5.4, 6.7.1-6.7.2 and 6.8, and section A.6 of appendix A

Week 8, Thursday March 11, 2027. Quantum Fourier Transforms

  • Why Fourier transforms on a quantum computer and reminder on the discrete Fourier transform
  • The quantum Fourier transform (QFT): definition, binary fractions and the product form
  • The circuit of the QFT, its cost and its implementation gate by gate
  • What the QFT does to a state (periods and phases) and the approximate QFT
  • Lab/exercise session: work on project 1
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 5, sections 5.1 and 5.2

Week 9, Thursday March 18, 2027. Quantum Phase Estimation with the Lipkin and Pairing Models

  • The phase estimation problem and phase kickback
  • The circuit of the quantum phase estimation (QPE) algorithm, its outcome distribution and its precision
  • From phases to energies with the time evolution operator
  • QPE for the Lipkin model and the pairing model, compared with the VQE and the ADAPT-VQE of weeks 6 and 7
  • Lab/exercise session: Discussion of project 1 and work on finalizing project 1
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 5, sections 5.3, 5.4 and 5.6

Thursday March 25, 2027. Maundy Thursday (Easter break), public holiday in Norway, no classes

Week 10, Thursday April 1, 2027. Quantum Phase Estimation for Model Hamiltonians and the HHL Algorithm

  • The controlled time evolution as a circuit: product formulas, Trotter error and gate counts for the Lipkin and pairing models
  • Phase estimation with one control qubit
  • QPE for the Ising and Heisenberg models and the choice of the input state
  • Start of the HHL algorithm for solving linear algebra problems
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 5, sections 5.3.3, 5.4.2, 5.6, 5.7.1 and 5.7.3, and chapter 4, sections 4.3 and 4.6

Week 11, Thursday April 8, 2027. The HHL Algorithm and the Poisson Equation

  • The circuit of the HHL algorithm, codes and algorithms
  • The condition number, the cost and the limitations of the algorithm
  • Application to the solution of the Poisson equation
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 5, section 5.7, and sections B.2 and B.3 of appendix B

Week 12, Thursday April 15, 2027. The Quantum Approximate Optimization Algorithm (QAOA)

  • Combinatorial optimization and QUBO problems: from a cost function to the Ising model and the cost Hamiltonian, with MaxCut as example
  • The QAOA: mixer and phase separator, the adiabatic origin of the algorithm and the circuit of one layer
  • One layer solved by hand for one edge and for a ring
  • Optimization of the angles, local minima and performance, and comparison with the VQE
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 10, sections 10.1-10.4, section 6.9 of chapter 6 and section 4.8 of chapter 4

Week 13, Thursday April 22, 2027. The QAOA with Applications: A First Encounter with Quantum Machine Learning

  • Gradients for the QAOA and the parameter-shift rule
  • Applications: the selection of a portfolio of stocks and the clustering of data as a MaxCut problem
  • The QAOA as a machine-learning model: what quantum machine learning is, the training loop and combinatorial problems in machine learning
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 10, sections 10.5-10.9, and chapter 8, sections 8.1-8.6

Week 14, Thursday April 29, 2027. Quantum Machine Learning and Quantum Neural Networks

  • Basics of quantum machine learning (QML) and loading classical data into qubits: basis, angle and amplitude encoding
  • Quantum neural networks (QNN): encoding, trainable layers and observable, data re-uploading, and the output as a Fourier series
  • Training with the parameter-shift rule, with a regression and a classification example
  • Links between the QNN, the VQE and the QAOA
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 8 (sections 8.2, 8.3, 8.6 and 8.8), chapter 11, sections 11.1-11.4 and 11.7, and section A.7 of appendix A

Thursday May 6, 2027. Ascension Day, public holiday in Norway, no classes

Week 15, Thursday May 13, 2027. Quantum Neural Networks: Geometry, Barren Plateaus and Differential Equations

  • The quantum Fisher information and the natural gradient, with the links to imaginary-time evolution and stochastic reconfiguration
  • Barren plateaus
  • Quantum Physics Informed Neural Networks (QPINNs): derivatives from shift rules
  • Solving differential equations with QPINNs, with the Poisson equation as example
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 11, sections 11.5, 11.6 and 11.8

Week 16, Thursday May 20, 2027. From Quantum Neural Networks to Generative Models: Boltzmann Machines

  • Generative models: the likelihood, the score function and the Fisher information
  • Boltzmann machines and restricted Boltzmann machines, Gibbs sampling and contrastive divergence
  • Quantum Boltzmann machines and learning a Hamiltonian from its thermal state
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 12, sections 12.1, 12.2, 12.3.1 and 12.5

Week 17, Thursday May 27, 2027. Quantum Boltzmann Machines, Gibbs States and Summary of the Course

  • Quantum Boltzmann machines for classical data (continued from previous week)
  • Preparing Gibbs states on a quantum computer
  • Summary of course and perspectives, and discussion of and work on project 2
  • Weekly material (slides, codes and the exercises of the week): slides in PDF format and Jupyter notebook
  • Reading recommendation: Lecture notes, chapter 12, sections 12.3, 12.4, 12.6 and 12.7, and chapter 14

Releases

Packages

Used by

Contributors

Languages