This repository contains materials for the Variational Quantum Algorithms (VQA) Workshop as part of the CQTraining program. The workshop is designed to be interactive and hands-on, focusing on the Variational Quantum Eigensolver (VQE) and its applications in quantum computing using Qiskit.
notebooks/
→ Contains Jupyter notebooks for each chapter of the workshop.utils/
→ Utility functions for the workshop.correctors/
→ Correction materials for exercises.Start.ipynb
→ Entry point to the workshop. Open this first!vqa_env.yml
→ Conda environment file for installation.
The workshop requires Python and Qiskit. It is recommended to use Conda for environment management.
Download and install Miniconda or Anaconda.
Use the following command in the terminal:
# Install Miniconda (lightweight version of Anaconda)
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
Follow the instructions, then restart your terminal.
Clone the repository and navigate into it:
git clone https://github.com/your-repo-name.git
cd your-repo-name
Then, create the environment using the provided vqa_env.yml
file:
conda env create -f vqa_env.yml
Activate the environment:
- Windows:
conda activate vqa_env
- macOS/Linux:
source activate vqa_env
Start Jupyter Notebook:
jupyter notebook
Then, open Start.ipynb
, which will guide you through the workshop.
- Open
Start.ipynb
in Jupyter Notebook. - Follow the instructions in each section.
- The workshop is structured in linked notebooks—simply follow the prompts.
- If you run into issues, ensure you have activated the Conda environment.
If you encounter issues, try the following:
- Environment not found? Run
conda env list
to check installed environments. - Missing packages? Run
conda install -n vqa_env qiskit jupyter
to manually install them. - Kernel not showing in Jupyter? Run
python -m ipykernel install --user --name=vqa_env
.
For further assistance, refer to the Qiskit documentation.
This workshop is provided under the MIT License. Feel free to use and modify it for educational purposes.