Installation - Noro-Official/OQS GitHub Wiki

Installation

This guide walks you through installing OpenQStack in a clean Python environment.

You can install OpenQStack locally on your machine or run it in a cloud notebook platform like Google Colab.


Requirements

  • Python 3.8 or newer
  • pip (Python package manager)
  • Git (recommended for cloning the repository)

Optional:

  • matplotlib (for visualizations)
  • jupyterlab (for interactive notebooks)

Option 1: Local Installation (Recommended)

Clone the repository and install in editable mode:

git clone https://github.com/yourusername/openqstack.git
cd openqstack
pip install -e .

This installs OpenQStack as a local Python package and allows you to modify the code and see changes immediately.


Option 2: Virtual Environment (Clean Setup)

To avoid dependency conflicts, we recommend using a Python virtual environment:

python -m venv qecenv
source qecenv/bin/activate    # On Windows: qecenv\Scripts\activate
pip install -e .

Option 3: Google Colab (No Installation)

Paste this into a Colab cell to clone and install:

!git clone https://github.com/yourusername/openqstack.git
%cd openqstack
!pip install -e .

You can then import OpenQStack modules in subsequent cells.


Verifying the Installation

Run the following command to test that OpenQStack is available:

python -c "from openqstack import BitFlipCode; print(BitFlipCode())"

You should see something like:

<BitFlipCode: 3-qubit single-X correction>

Run the Example Demo

cd examples
python openq_blink.py

This runs a full QEC cycle using the 3-qubit bit-flip code.


Optional: Install Additional Packages

To use visualization or notebooks:

pip install matplotlib jupyterlab

For development:

pip install pytest black flake8

Need Help?

If you run into installation issues, please:

  • Check your Python version
  • Ensure pip is up to date (pip install --upgrade pip)
  • Open an issue on GitHub with error output

Next Step

Run Your First QEC Simulation