Home

Awesome

Qonduit

pypi

An open-source Python widget library and dashboard workflow for quantum computing that utilizes the best of what’s available. Our hope is that this package can go wherever you or your projects go, enabling you to:

It utilizes a novel UI for pulse-level control, pulsemaker, but can support other pulse-level control UIs as long as they are Jupyter widgets.

Currently, there is support for Qiskit and Cirq. We hope to support more quantum computing integrations based on what is requested by the community.

Example

Getting Started

Installation

To install use pip (JupyterLab 3 recommended):

$ pip install qonduit

For a development installation,

$ git clone https://github.com/adgt/qonduit.git
$ cd pyQuirk
$ pip install -e .

Additionally, you need Qiskit or Cirq installed and the following if you wish to make use of the Dashboards feature:

Example

Take a look at example.ipynb for a simple example.

Otherwise, you can simply run (assumes Qiskit is installed):

from qonduit.dashboard import Default
from qiskit import QuantumCircuit
Default(QuantumCircuit(2))

If you have pyQuirk installed, then the Circuit Designer will show up with an interactive widget.

If you have pulsemaker installed, then you can make use of the Schedule Designer and Pulse Designer tabs, too. There are tutorials for each of those.

API

qonduit.visualization.circuit

qonduit.visualization.metrics

qonduit.visualization.pulse

qonduit.visualization.state

qonduit.dashboard

Development

Follow the instructions above for a development installation. Then, to actively developing on your machine, run Jupyter Lab with the command:

$ jupyter lab

Library files are located under the qonduit folder. If you are doing work in JupyterLab or notebooks, then it is recommended to use the following for auto-reloading changes to the Python files:

%load_ext autoreload
%autoreload 2

Software Architecture Design

Quantum computing is still in an experimental stage and as such tools such as Jupyter Lab / Notebooks are used for performing experiments and communicating to / educating others. There are wide discrepancies between what visualizations a quantum platform provides out-of-the-box with some being text-based (e.g. Cirq), others being static visuals (Qiskit), and some even being interactive. As new visualization / tool needs are required, such as pulse visualizations, many quantum platforms will need these tools. Perhaps some of the platform teams will build them or maybe they won’t and only provide programmatic, API level access. Ideally, a developer would be able to use our library with any backend and have a full suite of visualization and metric tools regardless of whether the quantum platform has any built-in support.

Qonduit was built with reliance on "duck typing" in Python. The idea is that you can have optional dependencies that, if installed, may get used based on a priority list we are defining in code. Eventually, this could be something customizable with a settings configuration. When an API call is made to qonduit, then it will try the first package in the priority list to service the API request. If it is not installed, then it falls back to the next one and so on. There's the possibility to provide default implementations, too, in qonduit, but that hasn't been a priority. A "backend" is defined as a layer that services any subset of the API that exists. Examples are located in the _backend folder.