Welcome to CS435 Quantum Programming 1.
This course combines theoretical foundations of quantum computing with practical implementation using IBM’s Qiskit SDK based on the Python programming language.
The material is based on QWorld’s educational notebooks: bronze-qiskit (beginner), nickel (intermediate), and silver (intermediate), primarily developed by Dr. Abuzer Yakaryılmaz (University of Latvia) and Dr. Özlem Salehi Köken.
In order to work with these jupyter notebooks, you need a number of packages. The following instructions ensure that the python verson and package versions are consistent and work with the notebooks.
- Download this repository and extract it somewhere.
Then either use Conda, venv or virtualenv as follows.
The following two steps are for installing the required packages.
- Open a terminal or command prompt at the directory where you extracted the files.
- Run the following command to create a new Conda environment and install all necessary packages.
conda env create -f environment.ymlThe following steps should be followed every time you want to work on the notebooks.
- Activate the Conda environment.
conda activate cs435After activation, your command prompt or terminal prompt should change to indicate that you are now working within the virtual environment.
- You can now launch jupyter notebook.
jupyter lab- Deactivate the Conda environment when you're done.
conda deactivate- Make sure you are using Python 3.10.8.
- Open a terminal or command prompt at the directory where you extracted the files.
- Run one of the following commands (depending on whether you want to use venv or virtualenv) to create a virtual environment.
# create environment using venv
python -m venv cs435venv
# OR create environment using virtualenv
pip install virtualenv
virtualenv cs435venv- Activate the virtual environment.
On Windows
cs435venv\Scripts\activateOn macOS or Linux:
source cs435venv/bin/activateAfter activation, your command prompt or terminal prompt should change to indicate that you are now working within the virtual environment.
- Install packages using pip.
pip install -r requirements.txtIf you are a Mac OS user you might need to install the qiskit[visualization] in the following way
pip install 'qiskit[visualization]'- You can now launch jupyter notebook.
jupyter notebook- Deactivate the Conda environment when you're done.
conda deactivateEvery time you work on the notebooks, you should reexecute steps 4, 6 and 7, remembering to switch to the directory where you created the virtual environment.
Please check credits and references.
The code of this project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The text and figures of this work is licensed under a Creative Commons Attribution 4.0 International License, available at https://creativecommons.org/licenses/by/4.0/legalcode.