Google Cirq descriptions of IQM's quantum architectures.
Currently Cirq on IQM can
- load an arbitrary quantum circuit from a QASM file
- map it into an equivalent circuit compatible with the chosen IQM architecture
- optimize the circuit by commuting and merging gates
- simulate the circuit using one of Cirq's simulators
See the Jupyter Notebook with examples.
The recommended way is to install the distribution package cirq-iqm
directly from the
Python Package Index (PyPI). You can either add cirq-iqm
as a dependency to your project
using setup.cfg
, or install it manually:
pip install cirq-iqm
Alternatively, you can clone the repository, and build and install the distribution package yourself. Note the trailing slash to install from the local directory.
git clone git@github.com:iqm-finland/cirq-on-iqm.git
pip install cirq-on-iqm/
Import the module in your Python code:
import cirq_iqm
Run the demo:
python cirq-on-iqm/examples/demo_adonis.py
Running a Jupyter notebook in virtualenv takes a bit of extra work, you will need to create a custom Jupyter kernel for your virtual environment:
virtualenv my_virtualenv
source my_virtualenv/bin/activate
pip install --user ipykernel
python -m ipykernel install --user --name=my_virtualenv
Clone the repository and install it in editable mode with all the extras:
git clone git@github.com:iqm-finland/cirq-on-iqm.git
cd cirq-on-iqm
pip install -e ".[dev,docs]"
Build and view the docs:
python setup.py docs
firefox build/sphinx/html/index.html
Run the tests:
tox
Cirq on IQM is free software, released under the Apache License, version 2.0.
Copyright 2020–2021 Cirq on IQM developers.