-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Welcome to openqcp-lab! This guide will help you set up your environment and get started with your first quantum computing tutorial.
- Prerequisites
- Environment Setup
- Framework Selection
- Verification
- Choosing Your First Tutorial
- Common Issues
- Next Steps
Before starting, you should be familiar with:
- Linear Algebra: Vectors, matrices, eigenvalues/eigenvectors, inner products
- Complex Numbers: Basic operations, complex exponentials
- Probability Theory: Basic probability distributions, expectation values
- Calculus: Derivatives (for optimization tutorials)
Recommended Resources:
- Linear Algebra for Quantum Computing (Qiskit Textbook)
- Mathematics for Quantum Computing (Microsoft Learn)
- Python: Basic syntax, data structures, functions, classes
- Jupyter Notebooks: How to run cells, view outputs
- NumPy: Array operations (helpful but not strictly required)
Recommended Resources:
- Python Tutorial (Official Python docs)
- NumPy Quickstart
For Beginners:
- Basic understanding of qubits, superposition, and measurement
- Familiarity with quantum gates (Pauli gates, Hadamard, CNOT)
For Intermediate/Advanced:
- Quantum circuits and algorithms
- Variational methods
- Hamiltonian simulation
Recommended Resources:
- Qiskit Textbook - Comprehensive quantum computing introduction
- Quantum Computing for the Very Curious - Interactive introduction
git clone https://codeberg.org/mkhellat/openqcp-lab.git
cd openqcp-labOr if you prefer GitHub:
git clone https://github.com/mkhellat/openqcp-lab.git
cd openqcp-labWe recommend using Python 3.9 or later. Check your Python version:
python3 --version./setup_env.shThis script will:
- Create a virtual environment in
venv/ - Install all required dependencies
- Print activation instructions
If you have make installed:
make env# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txtLinux/macOS:
source venv/bin/activateWindows:
venv\Scripts\activateYou should see (venv) in your terminal prompt.
jupyter notebookOr if you prefer JupyterLab:
jupyter labThis will open a web browser with the Jupyter interface. Navigate to any tutorial directory to open the notebooks.
This project uses multiple quantum computing frameworks. Each tutorial specifies which framework it uses. Here's a quick guide:
Used in: Tutorials 00, 02, 03, 05
When to use:
- High-level quantum algorithm design
- Automatic circuit synthesis and optimization
- Research and educational purposes
Installation: Included in requirements.txt (installed automatically)
Authentication: Some Classiq features may require API authentication. See the Classiq documentation for details.
Used in: Tutorial 01
When to use:
- Variational quantum algorithms
- Quantum machine learning
- Gradient-based optimization
Installation: Included in requirements.txt (installed automatically)
Used in: Tutorial 04
When to use:
- IBM Quantum hardware access
- Variational Quantum Eigensolvers (VQE)
- QUBO problem solving
Installation: Optional dependency. The notebook will install it automatically if needed, or you can install manually:
pip install qiskit qiskit-optimization| Framework | Best For | Hardware Access | Learning Curve |
|---|---|---|---|
| Classiq | Algorithm design, synthesis | Limited | Moderate |
| PennyLane | Optimization, ML | Multiple backends | Moderate |
| Qiskit | IBM Quantum, VQE | IBM Quantum | Moderate |
For detailed comparison, see the Framework Guide.
After setup, verify your installation:
python3 -c "import numpy, scipy, matplotlib, classiq, pennylane; print('Core packages OK')"Open a new notebook and run:
import numpy as np
import matplotlib.pyplot as plt
print("NumPy version:", np.__version__)
print("Setup verified!")Classiq:
from classiq import *
print("Classiq imported successfully")PennyLane:
import pennylane as qml
print("PennyLane version:", qml.__version__)Qiskit (if installed):
import qiskit
print("Qiskit version:", qiskit.__version__)Start with: Tutorial 00 - Quantum Fourier Transform
Why: Builds fundamental understanding of quantum algorithms and mathematical foundations.
Time: ~2 hours
Next: Tutorial 01 - Minimize Expectation Value
Start with: Tutorial 02 - Quantum Walk
Why: Introduces graph-based quantum algorithms with practical implementations.
Time: ~2-3 hours
Next: Tutorial 03 - Non-Unitary Computing
Start with: Tutorial 04 - Quantum Variational Algorithms
Why: Covers advanced optimization techniques (VQE, QUBO).
Time: ~3-4 hours
Next: Tutorial 05 - Coupled Harmonic Oscillators
Start with: Tutorial 05 - Coupled Harmonic Oscillators
Why: Cutting-edge research application with exponential speedup.
Time: ~4-5 hours
See Learning Paths for detailed guidance and prerequisite chains.
Solution:
- On Windows, try
pythoninstead ofpython3 - Ensure Python 3.9+ is installed
- Add Python to your system PATH
Solution:
chmod +x setup_env.sh
./setup_env.shSolution:
- Ensure virtual environment is activated
- Reinstall dependencies:
pip install -r requirements.txt - For Qiskit (optional):
pip install qiskit qiskit-optimization
Solution:
- Check the terminal for a URL (usually
http://localhost:8888) - Copy the URL and paste it in your browser
- Or use:
jupyter notebook --no-browserand manually open the URL
Solution:
- Install LaTeX distribution (TeX Live, MiKTeX, or MacTeX)
- Install
cm-superpackage for your LaTeX distribution - Or disable LaTeX in the notebook:
plt.rcParams['text.usetex'] = False
Solution:
- Some Classiq features require API authentication
- See Classiq documentation for authentication setup
- Most tutorials work without authentication for basic usage
Solution:
- Reduce the number of shots in quantum simulations
- Use smaller problem sizes for initial testing
- Check if you're using a quantum simulator (expected to be slower than classical)
For more troubleshooting, see the FAQ.
- ✅ Environment set up - You're here!
- 📖 Choose a tutorial - See Tutorial Catalog for details
- 🚀 Start learning - Open your first notebook
- 📚 Explore resources - Check Academic Resources for papers
- 🔄 Reproduce results - See Reproducing Results guide
- Tutorial Catalog - Complete reference for all tutorials
- Learning Paths - Recommended sequences
- Framework Guide - Detailed framework comparison
- Project Structure - Understand repository organization
- Documentation Issues: Open an issue on Codeberg
- Code Issues: Check the main repository's CONTRIBUTING.md
- Questions: See FAQ for common questions
Ready to start? Head to the Tutorial Catalog to choose your first tutorial!