Skip to main content

Google Cirq adapter for IQM's quantum architectures

Project description

CI badge

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cirq-iqm-0.7.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

cirq_iqm-0.7-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

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

Hashes for cirq-iqm-0.7.tar.gz
Algorithm Hash digest
SHA256 26552f329c282df49de201eebfd1a9672e1dfdd4a7a64df8c38848234304fa19
MD5 ccfbbf668ec6b7ed979429471b855dea
BLAKE2b-256 296a2594ffdf6216ff34dbedd75b5a721b87cc15576ba51f547cba70cb72d770

See more details on using hashes here.

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

Hashes for cirq_iqm-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 16459530945668dd8612f1a74c4b8fe66ecb946d21650aa916e466b74427294c
MD5 11da9dde2ab640266c8061fca1c7d440
BLAKE2b-256 06a9eb53bb62dab816f69cf8328e2cfc3af6a57cc05f525b2a27a3699d48f0d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page