Resources for the summer camp at NYU ShabaniLab.
Welcome to the 2022 summer quantum camp. In this summer camp we will be coding a lot to learn about quantum computing, visualizing the concepts, and designing and implementing quantum circuits on quantum hardware. There are some basic tools that we need to learn beforehand. Along with each week's lecture there is a code section in which we try to learn about how to implement problems in code, solve them, and plot the results. There are some basic tools that we need to learn beforehand.
git
: a version control software to organize your code and keep track of the changes.python
: a programming language which all our code is based on.qiskit
: a python library from IBM which helps us design, implement, and analyze quantum circuits.jupyter
: a python library which allows us to organize our notes, codes, and plots in one file.
The first step is the proper installation of these tools on your computer.
To install git
, you just need to follow the installation guide on the git website.
This software has only a command line interface. To check if the installation was successful you just need to run the following command:
git --version
which prints out the version of the software
git version 2.30.0
Here are some useful git
commands.
command | what it does |
---|---|
git log |
prints the log of previous commits to your code |
git status |
prints the status of the current project |
git add my_file |
add my_file to the stage (prepare for commiting changes) |
git commit -m 'my custom comment |
commit the changes with a comment on it |
git push -u origin master |
push the changes to the remote directory |
If you are not familiar with the command line, you may need to take a short online course to familiarize yourself. You will only need to know some basic commands. Here are some commands that are used often.
command (linux/mac) | what it does | command (windows) |
---|---|---|
cd my-folder |
change directory to my-folder/ |
cd my-folder |
cd - |
go back | |
cd .. |
go to the parent directory | cd .. |
cd ~ |
go to home directory | |
pwd |
show current directory | cd |
ls |
show the contents (files and folders) of the current directory | dir |
ls -alt |
list the contents ordered in time | |
mkdir my-new-folder |
make a new directory (folder) called my-new-folder |
mkdir my-new-folder |
If you have a windows machine, you can install the Windows Subsystem for Linux to have a linux terminal (unless you are already familiar and comfortable with windows terminal)
The best way to install python
is to first install Anaconda. You can do so by following the instructions on Anaconda website.
After installing Anaconda you can easily install python using the following command
conda install python
To check if the installation was successful you just need to run the following commands:
conda --version
python --version
which print out the versions of the softwares
conda 4.9.2
Python 3.8.5
After installing python you will need to install the following libraries numpy
, scipy
, and matplotlib
.
These libraries might be already installed if you used Anaconda to install python. If not you can always use pip
to install them as follows
pip install numpy
pip install scipy
pip install matplotlib
Next step is to install qiskit
by following the instructions on qiskit website.
Note: make sure you replace name_of_my_env
with something more meaningful (e.g. qcamp).
Note: make sure everything you install (e.g. python, qiskit, and jupyter) are in the same conda environment. For that you would need to activate the right environment beforehand by running, for instance, conda activate qcamp
in your terminal.
There are lots of tutorials availble on qiskit:
To install jupyter
you can either use conda
.
conda install -c conda-forge notebook
or you can use pip
pip install notebook
You can refer to the jupyter website for more instructions.
Each week you will be provided with a coding exercise that incorporates the concepts in the lecture notes. All the coding exercises and tutorials are available in the folder notebooks/
on the github page.