Google Cirq adapter for IQM's quantum architectures
Project description
Cirq on IQM
Google Cirq adapter for IQM’s quantum architectures.
What is it good for?
Currently Cirq on IQM can
take an arbitrary quantum circuit created in Cirq or load from an OpenQASM 2.0 file
map the circuit into an equivalent one compatible with the chosen IQM quantum architecture
optimize the circuit by commuting and merging gates
simulate the circuit using one of Cirq’s simulators
run the circuit on an IQM quantum computer
See the Jupyter Notebook with examples: examples/usage.ipynb.
How to use
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
Run code on a real quantum computer:
$ export IQM_SERVER_URL="https://example.com"
$ export IQM_SETTINGS_PATH="/path/to/settings.json"
$ python cirq-on-iqm/examples/demo_iqm_execution.py
How to develop
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,testing]"
Build and view the docs:
$ tox -e docs
$ firefox build/sphinx/html/index.html
Run the tests:
$ tox
Copyright
Cirq on IQM is free software, released under the Apache License, version 2.0.
Copyright 2020–2021 Cirq on IQM developers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cirq-iqm-0.7.tar.gz
.
File metadata
- Download URL: cirq-iqm-0.7.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26552f329c282df49de201eebfd1a9672e1dfdd4a7a64df8c38848234304fa19 |
|
MD5 | ccfbbf668ec6b7ed979429471b855dea |
|
BLAKE2b-256 | 296a2594ffdf6216ff34dbedd75b5a721b87cc15576ba51f547cba70cb72d770 |
File details
Details for the file cirq_iqm-0.7-py3-none-any.whl
.
File metadata
- Download URL: cirq_iqm-0.7-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16459530945668dd8612f1a74c4b8fe66ecb946d21650aa916e466b74427294c |
|
MD5 | 11da9dde2ab640266c8061fca1c7d440 |
|
BLAKE2b-256 | 06a9eb53bb62dab816f69cf8328e2cfc3af6a57cc05f525b2a27a3699d48f0d7 |