Tutorials

This page includes practical information for volunteers who decided to attend the tutorial sessions. 

Machine learning and artificial intelligence in experiment and theory

Environment

The tutorial session will be conducted by Antonin Vacheret (LPC Caen) with the help of Kaciel Beraud (PhD LPC Caen). 

It is recommended to prepare virtual environment:

$ python3 -m venv ML

You can activate it by:

For Linux:
$ source ML/bin/activate

For Windows:
C:\> ML/Scripts/activate.bat

Create a text file named 'requirements.txt':

$ echo "jupyter
ipywidgets
ipykernel
numpy
pandas
tables
seaborn
matplotlib
torch
torchaudio
torchvision
lightning
tensorboard" > requirements.txt

Then you can install all the packages:

$ pip install -r requirements.txt

You can then install the virtual environment to Jupyter Notebook:

$ python3 -m ipykernel install --user --name=ML

If you can't install it in the standard path, you can use the following command instead:

$ python3 -m ipykernel install --sys-prefix --name=ML

And you have to tell jupyter where he can find the environment, you have to use the path given in the output of the previous command:

For Linux:
$ export JUPYTER_PATH=/path/to/kernel/share/jupyter/

For Windows:
C:\> $env:JUPYTER_PATH = "C:\path\to\kernel\share\jupyter\"

Then it's done! Just start jupyter notebook and select the ML one.

If you want to remove the virtual environment from jupyter then run:

$ jupyter kernelspec uninstall dataml

You can also list all the available environment installed by:

$ jupyter kernelspec list

Dataset 

The dataset for the Machine Learning tutorial is available here:

https://filesender.renater.fr/?s=download&token=54629bee-ff73-4a86-b8cd-6ed6d7837242

Bayesian methods to predict physics phenomena from observations and theories

The tutorial session will be conducted by Prof. Christian Forssen

This tutorial is designed for participants with little or no prior experience in Bayesian methods. The tutorial is hands-on: participants will work through practical examples directly in Jupyter notebooks during the session.

Participants are required to bring a laptop with the necessary software installed. Prior to attending the tutorial, participants must:

  1. Clone the Git repository for the book,
  2. Set up the specified Python environment, and
  3. Verify that at least one of the provided Jupyter notebooks runs successfully.

 

A step-by-step guide is provided in Appendix C of Learning from data for physicists. 

It is also encouraged that the participants study Part I of the book.

If you encounter difficulties with installation, please contact us.  

Looking forward to the tutorial!

 

Quantum computing

The tutorial session will be conducted by Denis Lacroix with the precious help of Ashutosh Singh (Postdoc IJCLab) and Rémi Bocquet (PhD CEA DAM). 

This tutorial is designed for participants who are not quantum computing experts. Examples will be made using the package qiskit (provided by the IBM company). 
The participants will have their own laptops with some packages already installed 
on their laptop prior to coming to the tutorial.

Installing a dedicated environment using conda  (optional but highly recommended)

Information to install conda can be found here 

Ideally, the installation can be made using conda and jupyter notebook that allows to create a dedicated environment. If you are using conda, you can create the environment here called "Tuto-QC" using the following commands 

 conda create -n Tuto-QC python=3.11  
 source activate Tuto-QC

or 

conda activate  Tuto-QC

Installing jupyter/matplotlib  (necessary)
 pip install jupyter 
 pip install notebook
 pip install jupyterlab
 pip install matplotlib

Once install, jupyter notebook or jupyter lab can be launched simply by typing jupyter notebook or  jupyter lab

 

Installing qiskit (necessary)

To install qiskit, if the environment "Tuto-QC" is activated (see above), type:

 pip install qiskit
 pip install qiskit-aer matplotlib numpy
 pip install pylatexenc

 
Then test that the command

from qiskit import QuantumCircuit

runs successfully in python command line or in a jupyter notebook. 

 

 

The requirements for package versions are:

Requirements :
Recommended Python version: 3.10+
qiskit==2.4.0
qiskit-aer>=0.17
jupyterlab>=4.0
notebook>=7.0
ipykernel>=6.0
matplotlib>=3.8
numpy>=1.26
scipy>=1.13
Versions can be for instance tested using (as command line)
python --version
jupyter --version
...

If you encounter difficulties with installation, please contact us.  

Looking forward to the tutorial !