Install

Binary Tarball

We provide a traditional binary tarball based on nix-user-chroot. Note that the tarball requires Linux kernel user namespaces to work.

# Check if user namespace is supported for your Linux kernel.
unshare --user --pid echo YES
# Download and unpack tarball.
wget http://www.arclightquantum.com/release/isqc-0.1.0.tar.gz
tar -xvf isqc-0.1.0.tar.gz
# isq dir is here.
cd isq
# use isqc to compile and simulate
./isqc --version
# Add to PATH
export PATH=`pwd`:$PATH

Nix Flake

Install Nix Package Manager

We recommend using Nix installer by Determinate Systems to install Nix with Flakes support out of the box. If you have Nix installed, skip this step.

# Install Nix.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

obtain isQ directly

isQ is built with Nix Flakes, making it super easy to obtain when you have Nix installed.

# Add isQ binary cache to Cachix to prevent building from source.
nix-shell -p cachix --run "cachix use arclight-quantum"
# Enter the environment with isQ installed.
nix shell github:arclight-quantum/isQ-Compiler
# Now isQ is placed in $PATH.
isqc --version

build from source code

We provide necessary tools to build isQ components locally.

git clone git@github.com:arclight-quantum/isQ-Compiler.git && cd isQ-Compiler
# Virtual environment with necessary building tools. The bash prompt should become (nix-isqc:dev).
nix develop
# create isQ installation path ISQ_ROOT, like current dir
echo "export ISQ_ROOT=`pwd`" >> ~/.bashrc
source ~/.bashrc
# build isQ by Makefile
make
# copy lib files to ISQ_ROOT if necessary
sudo mkdir -p  $ISQ_ROOT/lib/ && sudo cp `pwd`/lib/* $ISQ_ROOT/lib/
# add ISQ_ROOT to path if necessary
echo "export PATH=\$ISQ_ROOT/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
# test
isqc --version

Docker Container

We provide two Docker images with isQ compiler builtin: one for normal users providing a full Ubuntu environment, and the other for professional Docker users with only binary files necessary for isQ.

# pull isQ docker
docker pull arclightquantum/isqc:ubuntu-0.0.1
# Ubuntu-based Docker image.
docker run -it arclightquantum/isqc:ubuntu-0.0.1 bash
isqc --version # Run in container.
# Binary only Docker image.
docker run --rm -v $(pwd):/workdir arclightquantum/isqc:0.0.1 isqc --version